I'm bulk-creating items using the bulkCreateOrReplaceInventoryItem
API. Some of my products are listed under the wrong categories. I can't find any field in the request payload by which I can mention the category id of each item.
Here are the API docs: https://developer.ebay.com/api-docs/sell/inventory/resources/inventory_item/methods/bulkCreateOrReplaceInventoryItem
Can anyone help me provide the category details while creating new items on eBay?
Here is my request payload:
foreach ($data as $key => $item) {
$o = array(
"sku" => $item['sku'],
"locale" => $item['locale'],
"product" => array(
"title" => $item['title'],
"description" => $item['description'],
"aspects" => array(),
"brand" => $item['brand'],
"mpn" => $item['mpn'],
"imageUrls" => $item['images'],
"aspects" => $item['aspects']
),
"condition" => $item['condition'],
// "conditionDescription" => $item['conditionDescription'],
"availability" => array(
"shipToLocationAvailability" => array(
"quantity" => $item['quantity']
)
),
);
if ($item['condition'] != 'NEW') {
$o['conditionDescription'] = $item['conditionDescription'];
}
$object[] = $o;
}
$object = array('requests' => $object);