Overview / Stock & supply / Create a category

Create a category

post https://api.flactrum.com/v1/stock-item-categories
Required scope stock_items.write
Success status201
Returns One StockItemCategory object

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 POST 'https://api.flactrum.com/v1/stock-item-categories' \
  -H 'Authorization: Bearer flk_your_key:your_secret' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Kahve"
}'

HTTP 201 · application/json

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