Create a category
post
https://api.flactrum.com/v1/product-categories
| Required scope | categories.write |
| Success status | 201 |
| Returns | One ProductCategory object |
Request body
| Field | Type | Description |
|---|---|---|
| name * | string | — |
| parent_id | string|null | Parent category. A category cannot be its own parent. |
| sort_order | integer | — |
| is_active | boolean | — |
| translations | object | Language code → fields. Only languages configured for the brand are accepted; an empty value removes that translation. Translatable here: name. |
Response fields
| Field | Type | Description |
|---|---|---|
| id | string | — |
| name | string | Follows ?lang. |
| slug | string|null | — |
| parent_id | string|null | — |
| sort_order | integer | — |
| is_active | boolean | — |
| product_count | integer | — |
| translations | object | All translations keyed by language code. |
| created_at | string | — |
| updated_at | string | — |
Examples
Recorded from the test suite — these are real requests and their real responses.
curl -X POST 'https://api.flactrum.com/v1/product-categories' \
-H 'Authorization: Bearer flk_your_key:your_secret' \
-H 'Content-Type: application/json' \
-d '{
"name": "Soğuk kahve",
"sort_order": 2
}'
HTTP 201 · application/json
{
"data": {
"id": "01m43mxnd2v71nm182xgn3t8dw",
"name": "Soğuk kahve",
"slug": "soguk-kahve",
"parent_id": null,
"sort_order": 2,
"is_active": true,
"product_count": 0,
"translations": [],
"created_at": "2026-10-04T14:26:09+00:00",
"updated_at": "2026-10-04T14:26:09+00:00"
}
}