Update a Product Catalog
curl --request PUT \
--url https://api.hakumedia.ai/v2/publishers/{publisher_id}/product-db/catalogs/{catalog_id} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"label": "Default Catalog Name",
"field_list": [
"sku",
"title",
"brand",
"description",
"price"
]
}
'const options = {
method: 'PUT',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
label: 'Default Catalog Name',
field_list: ['sku', 'title', 'brand', 'description', 'price']
})
};
fetch('https://api.hakumedia.ai/v2/publishers/{publisher_id}/product-db/catalogs/{catalog_id}', 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}"
payload = {
"label": "Default Catalog Name",
"field_list": ["sku", "title", "brand", "description", "price"]
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(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}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'label' => 'Default Catalog Name',
'field_list' => [
'sku',
'title',
'brand',
'description',
'price'
]
]),
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
}Product DB · Catalog
Update a Product Catalog
Update a catalog to change fields, or key field values. You may not change the key fields (any field ending with _field) once the catalog leaves the SETUP state (eg. while it’s in IMPORT state, or ACTIVE state). You may change the field_list values as long as you aren’t removing any key fields.
PUT
/
publishers
/
{publisher_id}
/
product-db
/
catalogs
/
{catalog_id}
Update a Product Catalog
curl --request PUT \
--url https://api.hakumedia.ai/v2/publishers/{publisher_id}/product-db/catalogs/{catalog_id} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"label": "Default Catalog Name",
"field_list": [
"sku",
"title",
"brand",
"description",
"price"
]
}
'const options = {
method: 'PUT',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
label: 'Default Catalog Name',
field_list: ['sku', 'title', 'brand', 'description', 'price']
})
};
fetch('https://api.hakumedia.ai/v2/publishers/{publisher_id}/product-db/catalogs/{catalog_id}', 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}"
payload = {
"label": "Default Catalog Name",
"field_list": ["sku", "title", "brand", "description", "price"]
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(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}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'label' => 'Default Catalog Name',
'field_list' => [
'sku',
'title',
'brand',
'description',
'price'
]
]),
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
}Autorizaciones
Parámetros de ruta
Cuerpo
application/json
Respuesta
default - application/json
successful operation