How to use danh_muc_hang_hoa in create payload with api?

QuestionsCategory: ProductHow to use danh_muc_hang_hoa in create payload with api?
integrations@anchanto.com asked 2 years ago

When we are creating products using the following curl request, the product is getting created but the values of this attribute danh_muc_hang_hoa are not displayed under Categories. Please check and let us know how to apply this attribute while creating a product.

curl --location --request POST 'https://api.tiki.vn/integration/v2/requests' \
--header 'Authorization: Bearer ***' \
--header 'Content-Type: application/json' \
--data-raw '{
"category_id": 5344,
"name": "ProdFromPostMan31 TEST",
"description": "<html>\n <head></head>\n <body>\n <p>TestProductDescriptione</p>\n </body>\n</html>",
"market_price": 200,
"active": "1",
"attributes": {
"danh_muc_hang_hoa": "163785,163783",
"brand_country": "BONAIRE, SAINT EUSTATIUS AND SABA",
"bulky": 1,
"origin": "my",
"product_top_features": "Test Product Demo Product Top Features",
"brand": "OEM",
"case_diameter": "37 millimeters",
"brand_origin": "viet nam",
"book_cover": "Art and Craft Kit",
"all_time_quantity_sold": null,
"product_height": 40,
"product_length": 20,
"product_weight": 9,
"product_width": 20,
"product_weight_kg": 8,
"description": "<html>\n <head></head>\n <body>\n <p>TestProductDescriptione</p>\n </body>\n</html>",
"is_warranty_applied": 0,
"po_type": 48697
},
"image": "https://salt.tikicdn.com/ts/product/bb/9b/eb/0c4d75657d4c17d1d523e8c7b291840f.jpg",
"images": [
"https://salt.tikicdn.com/ts/product/bb/9b/eb/0c4d75657d4c17d1d523e8c7b291840f.jpg"
],

"option_attributes": [],
"variants": [
{
"sku": "TestFromPostManSKu32",
"price": 984000,
"market_price": 984000,
"inventory_type": "dropship",
"quantity": 200,
"brand_origin": "viet nam",
"cloth_material": "Jacquard",
"image": "https://salt.tikicdn.com/ts/product/bb/9b/eb/0c4d75657d4c17d1d523e8c7b291840f.jpg",
"images": [
"https://salt.tikicdn.com/ts/product/bb/9b/eb/0c4d75657d4c17d1d523e8c7b291840f.jpg"
],
"brand_country": "BONAIRE, SAINT EUSTATIUS AND SABA"
}
],
"meta_data": {
"is_auto_turn_on": true
}
}'