> ## 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.

# Get category by ID

> Retrieve a single menu category with optional hierarchy metadata



## OpenAPI

````yaml /api-reference/v2/openapi.json get /categories/{id}
openapi: 3.1.0
info:
  title: Clopos Open API v2
  description: >-
    The **Clopos Open API v2** provides secure and unified access to the Clopos
    ecosystem, enabling seamless integration of POS, ordering, payments, and
    restaurant management services.
  contact:
    email: dev@clopos.com
  version: 2.0.0
  license:
    name: ''
servers:
  - url: https://integrations.clopos.com/open-api/v2
    description: '**Base Url**'
security:
  - xToken: []
tags:
  - name: Authentication
  - name: Venues
  - name: Users
  - name: Customers
  - name: Menu
  - name: Stations
  - name: Products
  - name: Price Lists
  - name: Sales
  - name: Orders
  - name: Receipts
paths:
  /categories/{id}:
    get:
      tags:
        - Menu
      summary: Get category by ID
      description: Retrieve a single menu category with optional hierarchy metadata
      parameters:
        - name: id
          in: path
          description: Category ID
          required: true
          schema:
            type: string
        - name: include_children
          in: query
          description: Include nested child categories in the response
          schema:
            type: boolean
            default: true
      responses:
        '200':
          description: Category retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CategoryResponse'
        '404':
          description: Category not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    CategoryResponse:
      type: object
      properties:
        success:
          type: boolean
        data:
          $ref: '#/components/schemas/Category'
        time:
          type: integer
        timestamp:
          type: string
          format: date-time
        unix:
          type: integer
    Error:
      type: object
      required:
        - error
        - message
      properties:
        error:
          type: string
        message:
          type: string
        details:
          type: object
    Category:
      type: object
      properties:
        id:
          type: integer
        parent_id:
          type: integer
          nullable: true
        name:
          type: string
        slug:
          type: string
          nullable: true
        type:
          type: string
          enum:
            - PRODUCT
            - INGREDIENT
            - ACCOUNTING
        color:
          type: string
        status:
          type: integer
        depth:
          type: integer
        _lft:
          type: integer
        _rgt:
          type: integer
        properties:
          type: object
        children:
          type: array
          items:
            $ref: '#/components/schemas/Category'
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
  securitySchemes:
    xToken:
      type: apiKey
      in: header
      name: x-token
      description: JWT access token obtained from /v2/auth endpoint

````