Update a Product Catalog Item
curl --request PUT \
--url https://api.hakumedia.ai/v2/publishers/{publisher_id}/product-db/catalogs/{catalog_id}/items/{identifier} \
--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: 'PUT',
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/{identifier}', 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/{identifier}"
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.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}/items/{identifier}",
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([
'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
Update a Product Catalog Item
PUT
/
publishers
/
{publisher_id}
/
product-db
/
catalogs
/
{catalog_id}
/
items
/
{identifier}
Update a Product Catalog Item
curl --request PUT \
--url https://api.hakumedia.ai/v2/publishers/{publisher_id}/product-db/catalogs/{catalog_id}/items/{identifier} \
--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: 'PUT',
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/{identifier}', 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/{identifier}"
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.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}/items/{identifier}",
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([
'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.
The unique identifier defined for this catalog item.
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"