867 B
867 B
PATCH /category/{id}
Protected. Requires a valid session cookie (credentials: 'include').
Rename category
Renames a category the user is authorized for (updates name and re-slugifies in the company default language).
Path parameters
| Param | Required | Type | Description |
|---|---|---|---|
id |
yes | integer | Category id |
Body (JSON)
{
"name": "Renamed category"
}
Response 200
Renamed category
{
"category": { … }
}
Errors
| Status | Description |
|---|---|
| 400 | Validation error (name required) — {"error":"…"} |
| 401 | Unauthorized — {"error":"…"} |
| 403 | Not authorized — {"error":"…"} |
| 404 | Category not found — {"error":"…"} |
Generated from @openapi JSDoc. Do not edit by hand — run npm run docs:api.