Skip to main content

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

GET https://integrations.clopos.com/open-api/v2/categories/{id}
This endpoint requires authentication. Include your JWT in the x-token header. See Authentication for how to obtain a token and Errors for error responses.

Request Example

curl -X GET "https://integrations.clopos.com/open-api/v2/categories/1?include_children=true" \
  -H "x-token: oauth_example_token" \

Response

200 OK — Category found

{
  "success": true,
  "data": {
    "id": 1,
    "name": "Pizza",
    "status": 1,
    "hidden": false,
    "type": "PRODUCT",
    "position": null,
    "parent_id": null,
    "depth": 0,
    "color": "00bcd4",
    "children": [],
    "media": [
      {
        "uuid": "1d76f22b-c209-4fac-be3a-cfde7b8f0d74",
        "mime_type": "image/jpeg",
        "size": 87281,
        "urls": {
          "original": "https://cdn.clopos.com/omega/1d76f22b-.../original.jpg",
          "extra_large": "https://cdn.clopos.com/omega/1d76f22b-.../extra_large.jpg",
          "thumb": "https://cdn.clopos.com/omega/1d76f22b-.../thumb.jpg"
        },
        "blur_hash": "LEIpFsE%t1}TxpENEgaK0iowRktQ",
        "dimensions": {
          "width": 612,
          "height": 459
        }
      }
    ],
    "created_at": "2026-01-28T18:23:53.000000Z",
    "updated_at": "2026-01-28T18:23:53.000000Z"
  }
}

404 Not Found — Category does not exist

{
  "success": false,
  "error": "resource_not_found",
  "message": "Category not found"
}

Field Reference

Category Object

FieldTypeDescription
idintegerUnique identifier.
namestringCategory name.
statusinteger1 = active, 0 = inactive.
typestringPRODUCT, INGREDIENT, or ACCOUNTING.
positioninteger (nullable)Display order position.
parent_idinteger (nullable)Parent category ID, null for root categories.
_lftintegerLeft boundary in the nested-set tree. Useful for ordering and subtree queries.
_rgtintegerRight boundary in the nested-set tree. A category’s descendants have _lft and _rgt values between its own.
depthintegerHierarchy level (0 = root).
colorstringHEX color code (without # prefix).
hiddenbooleanWhether the category is hidden from menus.
childrenarraySubcategories (same structure, nested recursively).
mediaarrayImage attachments. See Media object.
created_atstringCreation timestamp (ISO 8601).
updated_atstringLast update timestamp (ISO 8601).

Notes

  • The include_children=false parameter returns only a single category record; recommended for performance in large trees.
  • The returned children array recursively uses the same schema; be careful when processing the tree structure repeatedly on the client side.
  • Based on the type field 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.