Skip to main content
PATCH/product-categories/:id/

Update product category

You can update a product category.

Attributes

Optional unless marked required

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

Request​

curl -X PATCH "https://<your_app_subdomain>.user.com/api/public/product-categories/:id/" \
-H "Authorization: Token <your_64_char_api_key>" \
-H "Accept: */*; version=2" \
-H "Content-Type: application/json" \
-d '{
"name": "Outdoor gear",
"description": "Tents, backpacks and everything for camping."
}'

Response examples​

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

Response fields​

Fields returned in the 200 OK response body.

idinteger
A unique identifier for the product which is given by User automatically.
namestring
A product name.
custom_idstring
A unique identifier for the product which is provided by the client. Usually related to the product’s SKU.
descriptionstring
A product category description.
note

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