Creates Primary or Alternate category to organize items into logical groups.
Note:
1) To add Primary category, only name is required in the request.
2) To add a child category, both name and parentNodeId are required. For child category, you can additionally specify order of display.
3) To add an Alternate category, both name and type are required.
Note: Category details including category ID received in the response are required for subsequent calls. For example, it’s required to Create item (POST /v1/product/bulk/insert).
S2S access token (JWT) from fabric Identity service (during Login)
The x-site-context header is a JSON object that contains information about the source you wish to pull from. The mandatory account is the 24 character identifier found in Copilot. The channel (Sales channel ID), stage (environment name), and date attributes can be used to further narrow the scope of your data source.
"{\"date\": \"2023-01-01T00:00:00.000Z\", \"channel\": 12, \"account\": \"1234abcd5678efgh9ijklmno\",\"stage\":\"production\"}"
Category name
"notes"
true: Category is Active
false: Category is Inactive
Note: When type is Primary, status must be Active. Inactive status is not applicable for Primary category.
true
Numeric ID of parent category. If omitted, new category is created under the root category.
1
The order in which this child category appears among the sibling categories (of the same parent).
Note:
1) Applicable only for children categories.
2) Order 0 means this child category appears at the beginning of other sibling categories.
3) Unless order is specified, the child category appears at the end.
3
Category type. Specify this field to create a new root category. Applicable only if parentNodeId is omitted.
ALTERNATE, PRIMARY OK
A 24-character system-generated category ID. nodeId and id are the two identifier of a category, and one of them must be specified.
"6170135a49b4af38190970fe"
Numeric category ID. nodeId and id are the two identifier of a category, and one of them must be specified.
12
Category name
"Furniture"
Time of category creation (UTC format)
"2021-12-01T00:00:00.000Z"
Time when category was last updated (UTC format)
"2021-12-01T00:00:00.000Z"
Path of categories leading to root of category