See the Business Hierarchy feature page for UI guidance and conceptual overview.
Base path
Categories
List categories
ordinal ascending. Each category includes its sub-categories with offer counts.
Query parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
limit | No | integer | Maximum results per page. Default 25. |
cursor | No | string | Cursor for keyset pagination. |
Response 200
Create a category
Request body
| Field | Required | Type | Description |
|---|---|---|---|
name | Yes | string (1-255) | Unique category name. |
description | No | string | Category description. |
icon | No | string | Icon identifier (e.g., Lucide icon name). |
color | No | string | Display color. Default "blue". |
status | No | enum | draft, active (default), paused, archived. |
ordinal | No | integer (>= 0) | Sort order. Default 0. |
customFields | No | array | Custom field definitions (see below). Max 500 items. |
Custom field object
| Field | Required | Type | Description |
|---|---|---|---|
key | Yes | string | Machine-readable field key. |
label | Yes | string | Human-readable label. |
type | Yes | string | Field type: text, number, boolean, select, computed. |
defaultValue | No | any | Default value for the field. |
formula | Conditional | string | Formula expression. Required when type is computed. |
outputType | Conditional | enum | number or text. Required when type is computed. |
Example request
Response 201
Returns the created category with sub-categories relation.
Error codes
| Code | Reason |
|---|---|
400 | Validation error (missing name, invalid computed field). |
409 | A category with that name already exists. |
415 | Content-Type is not application/json. |
Update a category
Request body
| Field | Required | Type | Description |
|---|---|---|---|
id | Yes | string | Category ID to update. |
Response 200
Returns the updated category object.
Delete a category
409 if offers or sub-categories still reference the category.
Query parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
id | Yes | string | Category ID to delete. |
Response 204
Empty body on success.
Error codes
| Code | Reason |
|---|---|
400 | Missing id query parameter. |
409 | Category still has offers or sub-categories. Reassign them first. |
Sub-categories
Sub-categories live under a category and group related offers.List sub-categories
Query parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
categoryId | No | string | Filter to a specific parent category. |
limit | No | integer | Maximum results per page. Default 25. |
cursor | No | string | Cursor for keyset pagination. |
Response 200
Create a sub-category
Request body
| Field | Required | Type | Description |
|---|---|---|---|
categoryId | Yes | string | Parent category ID. |
name | Yes | string | Sub-category name. |
description | No | string | Description. |
icon | No | string | Icon identifier. |
status | No | enum | draft, active (default), paused, archived. |
ordinal | No | integer (>= 0) | Sort order. Default 0. |
customFields | No | array | Custom field definitions (same schema as categories). |
Response 201
Returns the created sub-category with its parent category relation.
Update a sub-category
Request body
| Field | Required | Type | Description |
|---|---|---|---|
id | Yes | string | Sub-category ID to update. |
Response 200
Returns the updated sub-category object.
Delete a sub-category
Query parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
id | Yes | string | Sub-category ID to delete. |
Response 204
Empty body on success.
Role requirements
| Method | Minimum role |
|---|---|
| GET | viewer |
| POST | editor |
| PUT | editor |
| DELETE | editor |
Business Hierarchy
Learn more about organising categories and sub-categories in the platform UI.