curl --request POST \
--url https://api.hakumedia.ai/v2/publishers/{publisher_id}/product-db/catalogs \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"label": "Default Catalog Name",
"field_list": [
"sku",
"title",
"brand",
"description",
"price",
"subtype_name",
"type_name",
"rating",
"upc",
"availability_status",
"vendor_name",
"seller_id",
"vendor_id"
]
}
'const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
label: 'Default Catalog Name',
field_list: [
'sku',
'title',
'brand',
'description',
'price',
'subtype_name',
'type_name',
'rating',
'upc',
'availability_status',
'vendor_name',
'seller_id',
'vendor_id'
]
})
};
fetch('https://api.hakumedia.ai/v2/publishers/{publisher_id}/product-db/catalogs', 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"
payload = {
"label": "Default Catalog Name",
"field_list": ["sku", "title", "brand", "description", "price", "subtype_name", "type_name", "rating", "upc", "availability_status", "vendor_name", "seller_id", "vendor_id"]
}
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",
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([
'label' => 'Default Catalog Name',
'field_list' => [
'sku',
'title',
'brand',
'description',
'price',
'subtype_name',
'type_name',
'rating',
'upc',
'availability_status',
'vendor_name',
'seller_id',
'vendor_id'
]
]),
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;
}{
"label": "Default Catalog Name",
"source": "database",
"identifier_field": "sku",
"title_field": "title",
"description_field": "description",
"seller_id_field": "seller_id",
"gtin_field": "upc",
"field_list": [
"sku",
"title",
"brand",
"description",
"price"
],
"object": "product-catalog",
"self": "/v2/publishers/18667/product-db/catalogs/123456",
"id": 123456,
"state": "ACTIVE",
"publisher_id": 18667,
"item_count": 212234
}Create a Product Catalog
curl --request POST \
--url https://api.hakumedia.ai/v2/publishers/{publisher_id}/product-db/catalogs \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"label": "Default Catalog Name",
"field_list": [
"sku",
"title",
"brand",
"description",
"price",
"subtype_name",
"type_name",
"rating",
"upc",
"availability_status",
"vendor_name",
"seller_id",
"vendor_id"
]
}
'const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
label: 'Default Catalog Name',
field_list: [
'sku',
'title',
'brand',
'description',
'price',
'subtype_name',
'type_name',
'rating',
'upc',
'availability_status',
'vendor_name',
'seller_id',
'vendor_id'
]
})
};
fetch('https://api.hakumedia.ai/v2/publishers/{publisher_id}/product-db/catalogs', 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"
payload = {
"label": "Default Catalog Name",
"field_list": ["sku", "title", "brand", "description", "price", "subtype_name", "type_name", "rating", "upc", "availability_status", "vendor_name", "seller_id", "vendor_id"]
}
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",
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([
'label' => 'Default Catalog Name',
'field_list' => [
'sku',
'title',
'brand',
'description',
'price',
'subtype_name',
'type_name',
'rating',
'upc',
'availability_status',
'vendor_name',
'seller_id',
'vendor_id'
]
]),
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;
}{
"label": "Default Catalog Name",
"source": "database",
"identifier_field": "sku",
"title_field": "title",
"description_field": "description",
"seller_id_field": "seller_id",
"gtin_field": "upc",
"field_list": [
"sku",
"title",
"brand",
"description",
"price"
],
"object": "product-catalog",
"self": "/v2/publishers/18667/product-db/catalogs/123456",
"id": 123456,
"state": "ACTIVE",
"publisher_id": 18667,
"item_count": 212234
}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.
Body
A text label used to identify this catalog
255"Default Catalog Name"
A list of all columns that will be available for submission when adding or uploading catalog items.
255[
"sku",
"title",
"brand",
"description",
"price",
"subtype_name",
"type_name",
"rating",
"upc",
"availability_status",
"vendor_name",
"seller_id",
"vendor_id"
]
Source of data used to populate this catalog. Currently only 'database' is supported.
database, api "database"
CSV column name for the unique identifier field (ie. to uniquely identify a product). Must be defined in the 'field_list' as well.
255"sku"
CSV column name for the product title. Must be defined in the 'field_list' as well.
255"title"
CSV column name for the product description. Must be defined in the 'field_list' as well.
255"description"
CSV column name for the internal seller id (advertiser). Must be defined in the 'field_list' as well.
255"seller_id"
A column name for the GTIN field (ex. a UPC). Must be defined in the 'field_list' as well.
255"upc"
Response
successful operation
A text label used to identify this catalog
255"Default Catalog Name"
Source of data used to populate this catalog. Currently only 'database' is supported.
database, api "database"
CSV column name for the unique identifier field (ie. to uniquely identify a product). Must be defined in the 'field_list' as well.
255"sku"
CSV column name for the product title. Must be defined in the 'field_list' as well.
255"title"
CSV column name for the product description. Must be defined in the 'field_list' as well.
255"description"
CSV column name for the internal seller id (advertiser). Must be defined in the 'field_list' as well.
255"seller_id"
A column name for the GTIN field (ex. a UPC). Must be defined in the 'field_list' as well.
255"upc"
A list of all columns that will be available for submission when adding or uploading catalog items.
255[
"sku",
"title",
"brand",
"description",
"price"
]
A string denoting the current resource being requested or affected.
"product-catalog"
The relative URL of the current resource being requested or affected.
"/v2/publishers/18667/product-db/catalogs/123456"
The current resource identifier (ID).
123456
The current state of the catalog. Will be one of: 'SETUP', 'IMPORT', 'ACTIVE'
SETUP, IMPORT, ACTIVE "ACTIVE"
The publisher ID that owns this catalog.
18667
The number of items in this catalog.
212234