Documentation Index
Fetch the complete documentation index at: https://developer.clopos.com/llms.txt
Use this file to discover all available pages before exploring further.
Purpose
Returns a single category, regardless of whether it is a root or subcategory, and optionally its child nodes.HTTP Request
Request Example
Response
200 OK — Category found
404 Not Found — Category does not exist
Field Reference
Category Object
| Field | Type | Description |
|---|---|---|
id | integer | Unique identifier. |
name | string | Category name. |
status | integer | 1 = active, 0 = inactive. |
type | string | PRODUCT, INGREDIENT, or ACCOUNTING. |
position | integer (nullable) | Display order position. |
parent_id | integer (nullable) | Parent category ID, null for root categories. |
_lft | integer | Left boundary in the nested-set tree. Useful for ordering and subtree queries. |
_rgt | integer | Right boundary in the nested-set tree. A category’s descendants have _lft and _rgt values between its own. |
depth | integer | Hierarchy level (0 = root). |
color | string | HEX color code (without # prefix). |
hidden | boolean | Whether the category is hidden from menus. |
children | array | Subcategories (same structure, nested recursively). |
media | array | Image attachments. See Media object. |
created_at | string | Creation timestamp (ISO 8601). |
updated_at | string | Last update timestamp (ISO 8601). |
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, ingredient, 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.