Create a Product Catalog Item
curl --request POST \
--url https://api.hakumedia.ai/v2/publishers/{publisher_id}/product-db/catalogs/{catalog_id}/items \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"item_data": {
"sku": "777111222333",
"title": "John's Rainbow Light Up Shoes",
"brand": "John's Shoes",
"description": "This coolest shoes you'll ever wear!",
"price": "99.99",
"subtype_name": "clothing",
"type_name": "APPAREL",
"rating": "4",
"upc": "1456484",
"availability_status": "IN STOCK",
"vendor_name": "John's Shoe Awesome Vendor",
"seller_id": "8675309",
"vendor_id": "2506678509"
}
}
EOFconst options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
item_data: {
sku: '777111222333',
title: 'John\'s Rainbow Light Up Shoes',
brand: 'John\'s Shoes',
description: 'This coolest shoes you\'ll ever wear!',
price: '99.99',
subtype_name: 'clothing',
type_name: 'APPAREL',
rating: '4',
upc: '1456484',
availability_status: 'IN STOCK',
vendor_name: 'John\'s Shoe Awesome Vendor',
seller_id: '8675309',
vendor_id: '2506678509'
}
})
};
fetch('https://api.hakumedia.ai/v2/publishers/{publisher_id}/product-db/catalogs/{catalog_id}/items', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.hakumedia.ai/v2/publishers/{publisher_id}/product-db/catalogs/{catalog_id}/items"
payload = { "item_data": {
"sku": "777111222333",
"title": "John's Rainbow Light Up Shoes",
"brand": "John's Shoes",
"description": "This coolest shoes you'll ever wear!",
"price": "99.99",
"subtype_name": "clothing",
"type_name": "APPAREL",
"rating": "4",
"upc": "1456484",
"availability_status": "IN STOCK",
"vendor_name": "John's Shoe Awesome Vendor",
"seller_id": "8675309",
"vendor_id": "2506678509"
} }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.hakumedia.ai/v2/publishers/{publisher_id}/product-db/catalogs/{catalog_id}/items",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'item_data' => [
'sku' => '777111222333',
'title' => 'John\'s Rainbow Light Up Shoes',
'brand' => 'John\'s Shoes',
'description' => 'This coolest shoes you\'ll ever wear!',
'price' => '99.99',
'subtype_name' => 'clothing',
'type_name' => 'APPAREL',
'rating' => '4',
'upc' => '1456484',
'availability_status' => 'IN STOCK',
'vendor_name' => 'John\'s Shoe Awesome Vendor',
'seller_id' => '8675309',
'vendor_id' => '2506678509'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"item_data": {
"sku": "777111222333",
"title": "John's Rainbow Light Up Shoes",
"brand": "John's Shoes",
"description": "This coolest shoes you'll ever wear!",
"price": "99.99",
"subtype_name": "clothing",
"type_name": "APPAREL",
"rating": "4",
"upc": "1456484",
"availability_status": "IN STOCK",
"vendor_name": "John's Shoe Awesome Vendor",
"seller_id": "8675309",
"vendor_id": "2506678509"
},
"object": "product-catalog-item",
"self": "/v2/publishers/466478/product-db/catalogs/123456/items/777111222333",
"id": "777111222333"
}Product DB · Catalog Items
Create a Product Catalog Item
POST
/
publishers
/
{publisher_id}
/
product-db
/
catalogs
/
{catalog_id}
/
items
Create a Product Catalog Item
curl --request POST \
--url https://api.hakumedia.ai/v2/publishers/{publisher_id}/product-db/catalogs/{catalog_id}/items \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"item_data": {
"sku": "777111222333",
"title": "John's Rainbow Light Up Shoes",
"brand": "John's Shoes",
"description": "This coolest shoes you'll ever wear!",
"price": "99.99",
"subtype_name": "clothing",
"type_name": "APPAREL",
"rating": "4",
"upc": "1456484",
"availability_status": "IN STOCK",
"vendor_name": "John's Shoe Awesome Vendor",
"seller_id": "8675309",
"vendor_id": "2506678509"
}
}
EOFconst options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
item_data: {
sku: '777111222333',
title: 'John\'s Rainbow Light Up Shoes',
brand: 'John\'s Shoes',
description: 'This coolest shoes you\'ll ever wear!',
price: '99.99',
subtype_name: 'clothing',
type_name: 'APPAREL',
rating: '4',
upc: '1456484',
availability_status: 'IN STOCK',
vendor_name: 'John\'s Shoe Awesome Vendor',
seller_id: '8675309',
vendor_id: '2506678509'
}
})
};
fetch('https://api.hakumedia.ai/v2/publishers/{publisher_id}/product-db/catalogs/{catalog_id}/items', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.hakumedia.ai/v2/publishers/{publisher_id}/product-db/catalogs/{catalog_id}/items"
payload = { "item_data": {
"sku": "777111222333",
"title": "John's Rainbow Light Up Shoes",
"brand": "John's Shoes",
"description": "This coolest shoes you'll ever wear!",
"price": "99.99",
"subtype_name": "clothing",
"type_name": "APPAREL",
"rating": "4",
"upc": "1456484",
"availability_status": "IN STOCK",
"vendor_name": "John's Shoe Awesome Vendor",
"seller_id": "8675309",
"vendor_id": "2506678509"
} }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.hakumedia.ai/v2/publishers/{publisher_id}/product-db/catalogs/{catalog_id}/items",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'item_data' => [
'sku' => '777111222333',
'title' => 'John\'s Rainbow Light Up Shoes',
'brand' => 'John\'s Shoes',
'description' => 'This coolest shoes you\'ll ever wear!',
'price' => '99.99',
'subtype_name' => 'clothing',
'type_name' => 'APPAREL',
'rating' => '4',
'upc' => '1456484',
'availability_status' => 'IN STOCK',
'vendor_name' => 'John\'s Shoe Awesome Vendor',
'seller_id' => '8675309',
'vendor_id' => '2506678509'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"item_data": {
"sku": "777111222333",
"title": "John's Rainbow Light Up Shoes",
"brand": "John's Shoes",
"description": "This coolest shoes you'll ever wear!",
"price": "99.99",
"subtype_name": "clothing",
"type_name": "APPAREL",
"rating": "4",
"upc": "1456484",
"availability_status": "IN STOCK",
"vendor_name": "John's Shoe Awesome Vendor",
"seller_id": "8675309",
"vendor_id": "2506678509"
},
"object": "product-catalog-item",
"self": "/v2/publishers/466478/product-db/catalogs/123456/items/777111222333",
"id": "777111222333"
}Authorizations
API key en el header Authorization: Basic TU_API_KEY. La key va tal cual, sin codificar en base64. Las credenciales se entregan al comenzar la integración.
Path Parameters
Identifier of the Publisher.
Identifier of the Product Catalog.
Body
application/json
Show child attributes
Show child attributes
Response
default - application/json
successful operation
Show child attributes
Show child attributes
A string denoting the current resource being requested or affected.
Example:
"product-catalog-item"
The relative URL of the current resource being requested or affected.
Example:
"/v2/publishers/466478/product-db/catalogs/123456/items/777111222333"
The unique identifier defined for this catalog item.
Example:
"777111222333"