PATCH /v1/categories/{id}
Scope
write_items
Request parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | required | ID of the target resource. |
Idempotency-Key | header | string | required | Idempotency key (required). A UUID v4 is recommended. Resending the same key replays the original result, and the response carries Idempotent-Replay: true. Sending a different body with the same key returns 422, so always retry with the identical request. |
parent_id | body | object | optional | ⚠️ Not editable. Moving a category to a different parent is not supported; sending it returns 400. |
name | body | string | optional | Category name, 1-40 characters. |
status | body | enum(active | inactive) | optional |
sort | body | integer | optional | Display order within the same level (lower comes first). Assigned automatically at the end on creation. |
Response example
{
"data": {
"id": "1",
"parent_id": "string",
"name": "string",
"status": "active",
"sort": 0
}
}
Description
Edit a category (name / status / sort). Moving a category to a different parent is not supported. (write_items)
Error response example
{
"error": {
"code": "insufficient_scope",
"message": "requires scope 'write_items'",
"request_id": "req_01H..."
}
}
Possible errors: 400 / 401 / 403 / 404 / 422 / 503