Purpose
Returns a single category, regardless of whether it is a root or subcategory, and optionally its child nodes.HTTP Request
Authorization
The following headers are required:x-tokenx-brandx-venue
Request Example
Response
200 OK — Category found
404 Not Found — Category does not exist
Field Reference
Top-Level Fields
| Field | Type | Description |
|---|---|---|
success | boolean | Indicates the success status of the request. |
data | object | Category details. |
time | number | Response time. |
timestamp | string | ISO 8601 formatted time. |
unix | number | Unix timestamp. |
Category Object
| Field | Type | Description |
|---|---|---|
id | integer | Category ID. |
parent_id | integer | Parent category ID, null for root. |
name | string | Category name. |
slug | string | URL-friendly identifier. |
type | string | PRODUCT, INGREDIENT, ACCOUNTING. |
status | integer | 1 = active, 0 = inactive. |
depth | integer | Hierarchy level. |
_lft, _rgt | integer | Nested set boundaries. |
color | string | HEX color. |
properties | object | Additional visibility/setting info. |
children | array | List of subcategories. |
created_at | string | Creation time. |
updated_at | string | Last update time. |
Notes
- The
include_children=falseparameter returns only a single category record; recommended for performance in large trees. - The returned
childrenarray recursively uses the same schema; be careful when processing the tree structure repeatedly on the client side. - Based on the
typefield in the response, you can read menu, content, or accounting categories from the same endpoint. - If the category is not found, it returns
404; add fallback or remapping logic on the client side.
Authorizations
Access token obtained from /auth endpoint
Brand identifier
Venue identifier
Path Parameters
Category ID
Query Parameters
Include nested child categories in the response