Create a product category

POST /productcategories

Create a new product category with specified attributes and receive the details of the newly created category in the response.

Headers

application/json

Body Required

  • An alternative user-defined reference for the category.

  • name string Required

    The name of the category.

  • parentId number

    A reference to the ID of the parent category.

    Default value is 0.

Responses

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 example
# 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"
}