Overview / Stock & supply / Update a category

Update a category

patch https://api.flactrum.com/v1/stock-item-categories/{category}
Required scope stock_items.write
Success status200
Returns One StockItemCategory object

Parameters

NameInTypeDescription
category * path string ULID of the record.

Request body

FieldTypeDescription
name * string —
parent_id string|null Parent category. A category cannot sit under itself or its own children.

Response fields

FieldTypeDescription
id string —
name string —
slug string|null —
parent_id string|null Parent category; null for a root category.
stock_item_count integer —

Examples

Recorded from the test suite — these are real requests and their real responses.

curl -X PATCH 'https://api.flactrum.com/v1/stock-item-categories/01m43mzhy70xgv3t4cjbavkd3r' \
  -H 'Authorization: Bearer flk_your_key:your_secret' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Kahveler"
}'

HTTP 200 · application/json

{
    "data": {
        "id": "01m43mzhy70xgv3t4cjbavkd3r",
        "name": "Kahveler",
        "slug": "kahve",
        "parent_id": null,
        "stock_item_count": 1,
        "created_at": "2026-10-04T14:27:11+00:00",
        "updated_at": "2026-10-04T14:27:11+00:00"
    }
}