Create a product category
Create a new product category with specified attributes and receive the details of the newly created category in the response.
Body Required
Request body for creating a product category
-
alternativeReference string
An alternative user-defined reference for the category.
-
The name of the category.
-
parentId number
A reference to the ID of the parent category.
Default value is
0
.
POST
/productcategories
curl \
-X POST https://rest.api.24sevenoffice.com/v1/productcategories \
-H "Content-Type: application/json" \
-H "Authorization: string" \
-d '{"alternativeReference":"dk-45-34","name":"Shoe accessories","parentId":0}'
Request examples
# Headers
Authorization: string
# Payload
{
"alternativeReference": "dk-45-34",
"name": "Shoe accessories",
"parentId": 0
}
Response examples (201)
# Headers
Access-Control-Allow-Origin: string
Access-Control-Allow-Credentials: string
X-Trace-Id: string
# Payload
{
"id": 12,
"alternativeReference": "dk-45-34",
"name": "Shoe accessories",
"parentId": 0,
"modifiedAt": "2023-12-31 18:00:00.000Z"
}