You can call this operation to update the categories of a product. Calling this operation overwrites the last updated categories.

API

POST ${API_PREFIX}/commodity/{id}/cat
Content-Type: application/json;charset=utf-8

URL Path Param

Request Body

[
  "3FO4K4BX0DRK",
  "3FO4K4BX0KGM"
]

Note: The request body is a string array of category IDs.
Setting the request body to an empty array deletes all existing categories of a product.
Call the Obtain Product Categories operation to retrieve the categories of a product.

Response

{
  "c": "0",
  "m": ""
}
Did this answer your question?