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

  • Authorization string Required

    Authorization header

application/json

Body Required

Request body for creating a product category

  • alternativeReference string

    An alternative user-defined reference for the category.

  • name string

    The name of the category.

  • parentId number

    A reference to the ID of the parent category.

    Default value is 0.

Responses

  • 201 application/json

    Created

    Hide headers attributes Show headers attributes
    • Access-Control-Allow-Origin string
    • Access-Control-Allow-Credentials string
    • X-Trace-Id string
    Hide response attributes Show response attributes object

    A single product category

    • id number

      A unique identifier for the product category within 24SevenOffice ERP modules.

    • alternativeReference string

      An alternative user-defined reference for the category.

    • name string

      The name of the category.

    • parentId number

      A reference to the ID of the parent category.

      Default value is 0.

    • modifiedAt string

      A timestamp for when one of the properties of a record was last modified, in ISO 8601 format.

POST /productcategories
curl \
 --request POST 'https://rest.api.24sevenoffice.com/v1/productcategories' \
 --header "Content-Type: application/json" \
 --header "Authorization: string" \
 --data '{"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"
}