Skip to main content
POST/product-categories-by-id/

Create product category

You can create a product category.

Attributes

Optional unless marked required

custom_idstring
A unique identifier for the product which is provided by the client.
descriptionstring
A product category description.
namestringrequired
A category name.

Request​

curl -X POST "https://<your_app_subdomain>.user.com/api/public/product-categories-by-id/" \
-H "Authorization: Token <your_64_char_api_key>" \
-H "Accept: */*; version=2" \
-H "Content-Type: application/json" \
-d '{
"name": "Running",
"custom_id": "running",
"description": "Shoes and clothing for runners."
}'

Response examples​

{
"id": 30,
"name": "my category",
"custom_id": "my_id",
"description": "category description"
}

Response fields​

Fields returned in the 201 Created response body.

idinteger
ID of the product category.
namestring
A product name.
custom_idstring
A unique identifier for the product category which is provided by the client.
descriptionstring
A product category description.
note

Errors that can come from any endpoint (401, 429, 500, 502, 504) are described in HTTP response codes.