# Update product category
You can update a product category.
PATCH
/product-categories/:id/
Attributes | Type | Required | Description |
---|---|---|---|
custom_id | string | no | A unique identifier for the product which is provided by the client. |
id | integer | yes | A unique identifier for the product category which is given by User.com automatically. |
description | string | no | A product category description. |
name | string | yes | A category name. |
# Request
- CURL
- JavaScript
- PHP
- Python
curl -X POST
"https://<your_app_subdomain>.user.com/api/public/product-categories/:id/"
-H 'authorization: Token <your_64_char_api_key>'
-H 'content-type: application/json'
-d '{
"name": "updated category name",
"custom_id": "my_id",
"description": "category description"
}'
# Response
{
"id": 30,
"name": "updated category name",
"custom_id": "my_id",
"description": "category description"
}