openapi: 3.0.0
info:
  title: Public API PoloTab
  description: |
    # PoloTab API

    ## Overview

    PoloTab is a powerful restaurant management platform designed for all kinds of food and beverage establishments ranging from single location coffee shops to multi-location and multi-brand chains. Our API enables management of restaurant operations, from table sessions to menu management.

    ## Key Features

    - **Restaurant Management**: Manage multiple restaurants under a single group
    - **Order Management**: Listen, update and create orders in real-time
    - **Menu Management**: Update restaurant menus

    ## APIs Coming Soon

    - **Cash Register Management**: Real-time cash register operations
    - **Inventory Management**: Real-time inventory operations
    - **Employee Management**: Manage employees and their clocking in and out
    - **Payment Processing**: Handle customer orders efficiently

    ## Tools Coming Soon

    - **POS Simulator**: Simulate a POS environment
    - **Developer Console**: Self-service portal for developers to create apps, manage app API keys and register webhooks

    ## Getting Started

    To integrate with PoloTab's restaurant management system, please contact our team at **developer-support@polotab.com** to request API access so we can provide you with the necessary credentials as well as a test account.

    ## Authentication

    PoloTab supports two API key credential types:

    - **App API key**: Identifies a public API app. Use this when your integration is installed by restaurants and needs app-specific capabilities and multi-account/group distribution.
    - **Account API key**: Identifies a restaurant account/group credential. Use this when the admin portal creates an API key directly for an account without creating an app.

    Both credential types are sent in the same header format:

    ```
    Authorization: Bearer API_KEY
    ```

    Use either API key type with `POST /auth/v1/restaurants/token` to generate a restaurant bearer token. App API keys can generate tokens for restaurants that installed the app. Account API keys can generate tokens for restaurants explicitly allowed for that account API key when the API key was created in the admin portal. Use the returned restaurant bearer token for restaurant-scoped API requests.

    ## Quickstart

    1. Generate a restaurant token with your app API key or account API key:

    ```bash
    curl -X POST "https://api.polotab.com/auth/v1/restaurants/token" \
      -H "Authorization: Bearer API_KEY" \
      -H "Content-Type: application/json" \
      -d '{"restaurantId":"RESTAURANT_ID"}'
    ```

    2. Use the returned `token` as the bearer token for restaurant-scoped requests:

    ```bash
    curl "https://api.polotab.com/restaurants/v1/restaurant" \
      -H "Authorization: Bearer RESTAURANT_TOKEN"
    ```

    3. Continue with a common workflow:

    ```bash
    curl "https://api.polotab.com/orders/v1/orders?limit=25" \
      -H "Authorization: Bearer RESTAURANT_TOKEN"
    ```

    For AI assistants and generated clients, prefer the documented `operationId` values and the exact parameter names shown in each endpoint. Path and query parameters use UUID strings unless a schema says otherwise.

    ## Base URL

    ```
    https://api.polotab.com/
    ```

    ## Support

    For technical support or questions about our restaurant management API:
    - Email: developer-support@polotab.com
    - API Documentation: https://developer.polotab.com

    ---

    2022-2026 PoloPay Inc. All rights reserved.
  version: 1.0.0
  contact:
    name: PoloTab Developer Support
    email: developer-support@polotab.com
servers:
  - url: 'https://api.polotab.com/'
    description: ''
components:
  securitySchemes:
    ApiKey:
      type: apiKey
      name: Authorization
      in: header
      description: 'API key authentication. Send either an app API key or an account API key using Bearer format: `Authorization: Bearer API_KEY`.'
    RestaurantToken:
      type: http
      scheme: bearer
      name: Authorization
      in: header
      bearerFormat: JWT
      example: 'Bearer RESTAURANT_TOKEN'
      description: Bearer Token for authentication with the restaurant's API token
  schemas:
    Table:
      type: object
      description: |
        Represents a restaurant table with its properties and active orders
      required:
        - id
        - ownerId
        - ownerType
        - name
        - capacity
        - enabled
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for the table
        replicaId:
          type: string
          format: uuid
          nullable: true
          description: ID of the table replica if applicable
        socialMediaTable:
          type: boolean
          description: Whether this is a social media table
        takeoutTable:
          type: boolean
          description: Whether this is a takeout table
        groupId:
          type: string
          format: uuid
          description: ID of the group this table belongs to
        ownerId:
          type: string
          format: uuid
          description: ID of the owner (restaurant, chain, etc.)
        ownerType:
          type: string
          enum: [restaurant, court]
          description: Type of the owner
        name:
          type: string
          description: Name or identifier of the table (e.g., "M1")
        capacity:
          type: integer
          description: Number of people the table can accommodate
        enabled:
          type: boolean
          description: Whether the table is currently enabled
        short_url:
          type: string
          description: Short URL identifier for the table
        createdAt:
          type: string
          format: date-time
          description: ISO 8601 timestamp when the table was created
        updatedAt:
          type: string
          format: date-time
          description: ISO 8601 timestamp when the table was last updated
        deletedAt:
          type: string
          format: date-time
          nullable: true
          description: ISO 8601 timestamp when the table was deleted, if applicable
        activeOrders:
          type: array
          description: List of active order IDs associated with this table
          items:
            type: string
            format: uuid

    TableListResponse:
      type: array
      description: List of tables
      items:
        $ref: '#/components/schemas/Table'

    TableResponse:
      $ref: '#/components/schemas/Table'
    MenuGroupWebhookEventType:
      type: string
      enum:
        - menu_groups.created
        - menu_groups.updated
        - menu_groups.deleted
      description: |
        Type of event that triggered this menu group webhook

    MenuGroupWebhookPayload:
      $ref: ./schemas/webhooks/MenuGroupWebhookPayload.yaml
      x-group-name: Webhooks
      type: object
      description: |
        Structure for menu group webhook event payloads
      required:
        - id
        - restaurantId
        - appId
        - type
        - timestamp
        - data
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for this webhook event
        restaurantId:
          type: string
          format: uuid
          description: ID of the restaurant where the event occurred
        appId:
          type: string
          format: uuid
          description: ID of the app receiving this webhook
        type:
          $ref: '#/components/schemas/MenuGroupWebhookEventType'
        timestamp:
          type: string
          format: date-time
          description: ISO 8601 timestamp when the event occurred
        data:
          type: object
          required:
            - id
            - ownerId
            - ownerType
          properties:
            id:
              type: string
              format: uuid
              description: ID of the menu group
            ownerId:
              type: string
              format: uuid
              description: ID of the owner entity
            ownerType:
              type: string
              description: Type of the owner entity
          description: Menu group specific data payload
    menuBulkCreateBody:
      title: menuBulkCreateBody
      x-group-name: Menu
      type: object
      required:
        - ownerId
        - ownerType
        - channelId
        - menus
      properties:
        ownerId:
          type: string
          format: uuid
        ownerType:
          type: string
        channelId:
          type: string
          format: uuid
        menus:
          $ref: '#/components/schemas/menuDataBulkCreate'
    menuCreateBody:
      title: menuCreateBody
      x-group-name: Menu
      type: object
      required:
        - ownerId
        - ownerType
        - channelId
        - type
      properties:
        ownerId:
          type: string
          format: uuid
        ownerType:
          enum:
            - chain
            - restaurant
            - virtual_location
        channelId:
          type: string
          format: uuid
        name:
          type: string
        description:
          type: string
        type:
          enum:
            - food
            - drinks
    WebhookEventType:
      type: string
      enum:
        - items.created
        - items.updated
        - items.deleted
        - apps.installed
        - apps.uninstalled
        - day_schedules.created
        - day_schedules.updated
        - day_schedules.deleted
        - modifier_groups.created
        - modifier_groups.updated
        - modifier_groups.deleted
        - virtual_locations.created
        - virtual_locations.updated
        - virtual_locations.deleted
        - orders.created
        - orders.updated
        - orders.status_changed
        - menus.created
        - menus.updated
        - menus.deleted
        - size_groups.created
        - size_groups.updated
        - size_groups.deleted
        - menu_groups.created
        - menu_groups.updated
        - menu_groups.deleted
        - promotions.created
        - promotions.updated
        - promotions.deleted
        - virtual_location_app.updated
        - unavailable_entity.created
        - unavailable_entity.updated
        - unavailable_entity.deleted
      description: |
        Type of event that triggered this webhook. Format is `resource.event`

        Examples:
        - `items.created`
        - `menu_groups.updated`

    MenuWebhookEventType:
      type: string
      enum:
        - menus.created
        - menus.updated
        - menus.deleted
      description: |
        Type of event that triggered this menu webhook

    AppWebhookEventType:
      type: string
      enum:
        - apps.installed
        - apps.uninstalled
      description: |
        Type of event that triggered this app webhook

    SizeGroupWebhookEventType:
      type: string
      enum:
        - size_groups.created
        - size_groups.updated
        - size_groups.deleted
      description: |
        Type of event that triggered this size group webhook

    ItemWebhookEventType:
      type: string
      enum:
        - items.created
        - items.updated
        - items.deleted
      description: |
        Type of event that triggered this item webhook

    ModifierGroupChannelRuleWebhookEventType:
      type: string
      enum:
        - modifier_group_channel_rules.created
        - modifier_group_channel_rules.updated
        - modifier_group_channel_rules.deleted
      description: |
        Type of event that triggered this modifier group channel rule webhook

    ModifierGroupWebhookEventType:
      type: string
      enum:
        - modifier_groups.created
        - modifier_groups.updated
        - modifier_groups.deleted
      description: |
        Type of event that triggered this modifier group webhook

    VirtualLocationWebhookEventType:
      type: string
      enum:
        - virtual_locations.created
        - virtual_locations.updated
        - virtual_locations.deleted
      description: |
        Type of event that triggered this virtual location webhook

    OrderWebhookEventType:
      type: string
      enum:
        - orders.created
        - orders.updated
      description: |
        Type of event that triggered this order webhook

    DayScheduleWebhookEventType:
      type: string
      enum:
        - day_schedules.created
        - day_schedules.updated
        - day_schedules.deleted
      description: |
        Type of event that triggered this day schedule webhook

    SortingOrderWebhookEventType:
      type: string
      enum:
        - sorting_orders.updated
      description: |
        Type of event that triggered this sorting order webhook

    SizeChannelRuleWebhookEventType:
      type: string
      enum:
        - size_channel_rules.created
        - size_channel_rules.updated
        - size_channel_rules.deleted
      description: |
        Type of event that triggered this size channel rule webhook

    PriceWebhookEventType:
      type: string
      enum:
        - prices.created
        - prices.deleted
      description: |
        Type of event that triggered this price webhook

    SizeWebhookEventType:
      title: SizeWebhookEventType
      x-group-name: Webhooks
      type: string
      enum:
        - sizes.updated
    PromotionWebhookEventType:
      title: PromotionWebhookEventType
      x-group-name: Webhooks
      type: string
      enum:
        - promotions.created
        - promotions.updated
        - promotions.deleted
    VirtualLocationAppWebhookEventType:
      title: VirtualLocationAppWebhookEventType
      x-group-name: Webhooks
      type: string
      enum:
        - virtual_location_app.updated
    UnavailableEntityWebhookEventType:
      title: UnavailableEntityWebhookEventType
      x-group-name: Webhooks
      type: string
      enum:
        - unavailable_entity.created
        - unavailable_entity.updated
        - unavailable_entity.deleted
      description: |
        Type of event that triggered this unavailable entity webhook
    PromotionWebhookPayload:
      title: PromotionWebhookPayload
      x-group-name: Webhooks
      type: object
      description: |
        Structure for promotion webhook event payloads
      required:
        - id
        - restaurantId
        - appId
        - type
        - timestamp
        - data
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for this webhook event
        restaurantId:
          type: string
          format: uuid
          description: ID of the restaurant where the event occurred
        appId:
          type: string
          format: uuid
          description: ID of the app receiving this webhook
        type:
          $ref: '#/components/schemas/PromotionWebhookEventType'
        timestamp:
          type: string
          format: date-time
          description: ISO 8601 timestamp when the event occurred
        data:
          type: object
          required:
            - id
            - ownerType
            - ownerId
            - name
            - targetType
            - discountAmount
            - discountType
          properties:
            id:
              type: string
              format: uuid
              description: ID of the promotion
            ownerType:
              type: string
              description: Type of the promotion owner (restaurant, chain)
            ownerId:
              type: string
              format: uuid
              description: ID of the owner
            name:
              type: string
              description: Name of the promotion
            targetType:
              type: string
              description: Type of target for the promotion (item, order)
            discountAmount:
              type: number
              format: float
              description: Amount of the discount
            discountType:
              type: string
              description: Type of discount (percentage, fixed)
            createdAt:
              type: string
              format: date-time
              description: When the promotion was created
            updatedAt:
              type: string
              format: date-time
              description: When the promotion was last updated
            deletedAt:
              type: string
              format: date-time
              nullable: true
              description: When the promotion was deleted, if applicable
            targetItems:
              type: array
              description: Items targeted by this promotion
              items:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                    description: ID of the item
                  name:
                    type: string
                    description: Name of the item
                  description:
                    type: string
                    description: Description of the item
                  chainId:
                    type: string
                    format: uuid
                    description: ID of the chain
                  price:
                    type: number
                    format: float
                    description: Price of the item
                  available:
                    type: boolean
                    description: Whether the item is available
                  createdAt:
                    type: string
                    format: date-time
                    description: When the item was created
                  updatedAt:
                    type: string
                    format: date-time
                    description: When the item was last updated
                  deletedAt:
                    type: string
                    format: date-time
                    nullable: true
                    description: When the item was deleted, if applicable
            chain:
              type: object
              properties:
                id:
                  type: string
                  format: uuid
                  description: ID of the chain
                name:
                  type: string
                  description: Name of the chain
                createdAt:
                  type: string
                  format: date-time
                  description: When the chain was created
                updatedAt:
                  type: string
                  format: date-time
                  description: When the chain was last updated
                deletedAt:
                  type: string
                  format: date-time
                  nullable: true
                  description: When the chain was deleted, if applicable
            restaurant:
              type: object
              properties:
                id:
                  type: string
                  format: uuid
                  description: ID of the restaurant
                name:
                  type: string
                  description: Name of the restaurant
                chainId:
                  type: string
                  format: uuid
                  description: ID of the chain
                address:
                  type: string
                  description: Address of the restaurant
                city:
                  type: string
                  description: City of the restaurant
                state:
                  type: string
                  description: State of the restaurant
                zipCode:
                  type: string
                  description: Zip code of the restaurant
                country:
                  type: string
                  description: Country of the restaurant
                phoneNumber:
                  type: string
                  description: Phone number of the restaurant
                email:
                  type: string
                  description: Email of the restaurant
                timezone:
                  type: string
                  description: Timezone of the restaurant
                status:
                  type: string
                  description: Status of the restaurant
                createdAt:
                  type: string
                  format: date-time
                  description: When the restaurant was created
                updatedAt:
                  type: string
                  format: date-time
                  description: When the restaurant was last updated
                deletedAt:
                  type: string
                  format: date-time
                  nullable: true
                  description: When the restaurant was deleted, if applicable
          description: Promotion specific data payload
      example:
        id: '550e8400-e29b-41d4-a716-446655440000'
        restaurantId: 'a98d7f65-3210-4bca-8765-4321abcd0000'
        appId: '12345678-abcd-4321-9876-fedcba098765'
        type: 'promotions.created'
        timestamp: '2025-08-07T19:15:44.000Z'
        data:
          id: '33333333-3333-3333-3333-333333333333'
          ownerType: 'restaurant'
          ownerId: 'a98d7f65-3210-4bca-8765-4321abcd0000'
          name: 'Summer Special Discount'
          targetType: 'item'
          discountAmount: 15.00
          discountType: 'percentage'
          createdAt: '2025-08-07T19:00:00.000Z'
          updatedAt: '2025-08-07T19:14:42.000Z'
          deletedAt: null
          targetItems:
            - id: '44444444-4444-4444-4444-444444444444'
              name: 'Hamburger'
              description: 'Classic beef hamburger with lettuce and tomato'
              chainId: '55555555-5555-5555-5555-555555555555'
              price: 10.99
              available: true
              createdAt: '2025-01-01T00:00:00.000Z'
              updatedAt: '2025-01-01T00:00:00.000Z'
              deletedAt: null
            - id: '66666666-6666-6666-6666-666666666666'
              name: 'Cheeseburger'
              description: 'Classic beef hamburger with cheese, lettuce and tomato'
              chainId: '55555555-5555-5555-5555-555555555555'
              price: 12.99
              available: true
              createdAt: '2025-01-01T00:00:00.000Z'
              updatedAt: '2025-01-01T00:00:00.000Z'
              deletedAt: null
          chain:
            id: '55555555-5555-5555-5555-555555555555'
            name: 'Burger Chain'
            createdAt: '2024-01-01T00:00:00.000Z'
            updatedAt: '2024-01-01T00:00:00.000Z'
            deletedAt: null
          restaurant:
            id: 'a98d7f65-3210-4bca-8765-4321abcd0000'
            name: 'Downtown Burger Joint'
            chainId: '55555555-5555-5555-5555-555555555555'
            address: '123 Main St'
            city: 'San Francisco'
            state: 'CA'
            zipCode: '94105'
            country: 'USA'
            phoneNumber: '+14155551234'
            email: 'downtown@burgerchain.com'
            timezone: 'America/Los_Angeles'
            status: 'active'
            createdAt: '2024-02-01T00:00:00.000Z'
            updatedAt: '2024-02-01T00:00:00.000Z'
            deletedAt: null

    VirtualLocationAppWebhookPayload:
      title: VirtualLocationAppWebhookPayload
      x-group-name: Webhooks
      type: object
      description: |
        Structure for virtual location app webhook event payloads
      required:
        - id
        - restaurantId
        - appId
        - type
        - timestamp
        - data
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for this webhook event
        restaurantId:
          type: string
          format: uuid
          description: ID of the restaurant where the event occurred
        appId:
          type: string
          format: uuid
          description: ID of the app receiving this webhook
        type:
          $ref: '#/components/schemas/VirtualLocationAppWebhookEventType'
        timestamp:
          type: string
          format: date-time
          description: ISO 8601 timestamp when the event occurred
        data:
          type: object
          required:
            - virtualLocationId
            - appId
            - ordersEnabled
            - autoAcceptOrdersOnClientAck
            - preparationTime
            - ordersInjectorStatus
            - createdAt
            - updatedAt
          properties:
            virtualLocationId:
              type: string
              format: uuid
              description: ID of the virtual location
            appId:
              type: string
              format: uuid
              description: ID of the app
            ordersEnabled:
              type: boolean
              description: Whether orders are enabled for this virtual location app
            autoAcceptOrdersOnClientAck:
              type: boolean
              description: Whether orders are automatically accepted on client acknowledgment
            preparationTime:
              type: integer
              description: Preparation time in minutes
            ordersInjectorStatus:
              type: string
              description: Status of the orders injector (connected, disconnected)
            createdAt:
              type: string
              format: date-time
              description: When the virtual location app was created
            updatedAt:
              type: string
              format: date-time
              description: When the virtual location app was last updated
          description: Virtual location app specific data payload
      example:
        id: '550e8400-e29b-41d4-a716-446655440000'
        restaurantId: 'a98d7f65-3210-4bca-8765-4321abcd0000'
        appId: '12345678-abcd-4321-9876-fedcba098765'
        type: 'virtual_location_app.updated'
        timestamp: '2025-08-07T21:30:17.000Z'
        data:
          virtualLocationId: '99999999-9999-9999-9999-999999999999'
          appId: '12345678-abcd-4321-9876-fedcba098765'
          ordersEnabled: true
          autoAcceptOrdersOnClientAck: true
          preparationTime: 15
          ordersInjectorStatus: 'connected'
          createdAt: '2025-01-01T00:00:00.000Z'
          updatedAt: '2025-08-07T21:30:17.000Z'

    UnavailableEntityWebhookPayload:
      title: UnavailableEntityWebhookPayload
      x-group-name: Webhooks
      type: object
      description: |
        Structure for temporarily unavailable entity webhook event payloads (e.g. out-of-stock items)
      required:
        - id
        - restaurantId
        - appId
        - type
        - timestamp
        - data
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for this webhook event
        restaurantId:
          type: string
          format: uuid
          description: ID of the restaurant where the event occurred
        appId:
          type: string
          format: uuid
          description: ID of the app receiving this webhook
        type:
          $ref: '#/components/schemas/UnavailableEntityWebhookEventType'
        timestamp:
          type: string
          format: date-time
          description: ISO 8601 timestamp when the event occurred
        data:
          type: object
          required:
            - id
            - ownerId
            - entityId
            - ownerType
            - entityType
            - unavailableUntil
            - createdAt
            - updatedAt
          properties:
            id:
              type: string
              format: uuid
              description: ID of the unavailable entity record
            ownerId:
              type: string
              format: uuid
              description: ID of the owner (e.g. restaurant) this unavailability applies to
            entityId:
              type: string
              format: uuid
              description: ID of the entity marked unavailable (e.g. menu item)
            ownerType:
              type: string
              description: Type of the owner (e.g. restaurant, chain)
            entityType:
              type: string
              description: Type of entity marked unavailable (e.g. item)
            unavailableUntil:
              type: string | null
              format: date-time
              description: ISO 8601 time until which the entity should be treated as unavailable. If null, the entity is available.
            createdAt:
              type: string
              format: date-time
              description: When the unavailability record was created
            updatedAt:
              type: string
              format: date-time
              description: When the unavailability record was last updated
            deletedAt:
              type: string
              format: date-time
              nullable: true
              description: When the unavailability record was removed, if applicable
          description: Unavailable entity specific data payload
      example:
        id: 'abcd1234-0001-4001-8001-000000000001'
        restaurantId: 'abcd1234-0002-4002-8002-000000000002'
        appId: 'abcd1234-0003-4003-8003-000000000003'
        type: 'unavailable_entity.updated'
        timestamp: '2025-10-31T12:09:50.698Z'
        data:
          id: 'abcd1234-0004-4004-8004-000000000004'
          ownerId: 'abcd1234-0002-4002-8002-000000000002'
          entityId: 'abcd1234-0005-4005-8005-000000000005'
          ownerType: 'restaurant'
          entityType: 'item'
          unavailableUntil: '2099-10-31T12:09:35.478Z'
          createdAt: '2025-10-04T14:19:33.000Z'
          updatedAt: '2025-10-31T12:09:50.698Z'
          deletedAt: null

    menuCreateResponse:
      title: menuCreateResponse
      x-group-name: Menu
      type: object
      properties:
        id:
          type: string
          format: uuid
        ownerId:
          type: string
          format: uuid
        ownerType:
          type: string
        name:
          type: string
        description:
          type: string
        type:
          enum:
            - food
            - drinks
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        deletedAt:
          type: string
          format: date-time
          nullable: true
    menuDataBulkCreate:
      title: menuDataBulkCreate
      x-group-name: Menu
      type: object
      properties:
        name:
          type: string
        type:
          enum:
            - food
            - drinks
        description:
          type: string
        items:
          type: array
          description: items ids
          items:
            type: string
            format: uuid
    menuDeleteBody:
      title: menuDeleteBody
      x-group-name: Menu
      type: object
      required:
        - ownerId
        - ownerType
      properties:
        ownerId:
          type: string
          format: uuid
        ownerType:
          enum:
            - chain
            - restaurant
            - virtual_location
    menuExpandedResponse:
      title: menuExpandedResponse
      x-group-name: Menu
      type: object
      properties:
        id:
          type: string
          format: uuid
        ownerId:
          type: string
          format: uuid
        ownerType:
          type: string
        name:
          type: string
        description:
          nullable: true
        type:
          enum:
            - food
            - drinks
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        deletedAt:
          type: string
          format: date-time
          nullable: true
        channels:
          type: array
          items:
            $ref: '#/components/schemas/channelResponse'
        items:
          $ref: '#/components/schemas/fullItemResponse'
        schedules:
          type: array
          items:
            $ref: '#/components/schemas/schedulesResponse'
        menuSortingOrder:
          type: array
          items:
            $ref: '#/components/schemas/itemSortingOrderResponse'
        modifierGroups:
          type: array
          items:
            $ref: '#/components/schemas/modifierGroupResponse'
    menuGetOneResponse:
      title: menuGetOneResponse
      x-group-name: Menu
      type: object
      properties:
        id:
          type: string
          format: uuid
        ownerId:
          type: string
          format: uuid
        ownerType:
          enum:
            - chain
            - restaurant
            - virtual_location
        name:
          type: string
        description:
          type: string
        type:
          type: string
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        deletedAt:
          type: string
          format: date-time
          nullable: true
        items:
          $ref: '#/components/schemas/itemUpdateResponse'
    menuResponse:
      title: menuResponse
      x-group-name: Menu
      type: object
      properties:
        id:
          type: string
          format: uuid
        ownerId:
          type: string
          format: uuid
        ownerType:
          enum:
            - chain
            - restaurant
            - virtual_location
        name:
          type: string
        description:
          type: string
        type:
          enum:
            - food
            - drinks
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        deletedAt:
          type: string
          format: date-time
          nullable: true
        menuVisibilityRule:
          type: array
          items:
            $ref: '#/components/schemas/menuVisibilityRules'
        menuSortingOrder:
          type: array
          items:
            $ref: '#/components/schemas/itemSortingOrderResponse'
    menuUpdateBody:
      title: menuUpdateBody
      x-group-name: Menu
      type: object
      required:
        - type
      properties:
        name:
          type: string
        description:
          type: string
        type:
          enum:
            - food
            - drinks
    menuVisibilityRules:
      title: menuVisibilityRules
      x-group-name: Menu
      type: object
      properties:
        id:
          type: string
          format: uuid
        entityId:
          type: string
          format: uuid
        entityType:
          type: string
          default: menu
        ownerId:
          type: string
          format: uuid
        ownerType:
          enum:
            - chain
            - restaurant
            - virtual_location
        visible:
          type: boolean
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    channelResponse:
      title: channelResponse
      type: object
      properties:
        id:
          type: string
          format: uuid
        type:
          type: string
        name:
          type: string
        supportsMenuGroups:
          type: boolean
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        deletedAt:
          type: string
          format: date-time
          nullable: true
    badRequest:
      title: badRequest
      type: object
      properties:
        code:
          type: string
          default: BAD_REQUEST
        message:
          type: string
    forbiddenError:
      title: forbiddenError
      type: object
      properties:
        code:
          type: string
          default: FORBIDDEN
        message:
          type: string
    notFound:
      title: notFound
      type: object
      properties:
        code:
          type: string
          default: NOT_FOUND
        message:
          type: string
    serverError:
      title: serverError
      type: object
      properties:
        code:
          type: string
          default: INTERNAL_SERVER_ERROR
        message:
          type: string
    unauthorizedError:
      title: unauthorizedError
      type: object
      code:
        type: string
        default: UNAUTHORIZED
      message:
        type: string
      properties:
        code:
          type: string
          default: UNAUTHORIZED
        message:
          type: string
    fullItemResponse:
      title: fullItemResponse
      type: object
      description: Expanded item response including menu relationship data, size group data, quantity constraints, and prices.
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier of the item.
        chainId:
          type: string
          format: uuid
          description: Chain that owns the item.
        sizeGroupId:
          type: string
          format: uuid
          nullable: true
          description: Size group assigned to the item, if any.
        name:
          type: string
          description: Item display name.
        image:
          type: string
          description: Item image URL.
        featured:
          type: boolean
          description: Whether the item is featured.
        description:
          type: string
          description: Item description shown to customers.
        sku:
          type: string
          nullable: true
          description: Optional item SKU.
        alergies:
          type: string
          description: Allergy information for the item.
        preparationTime:
          type: integer
          description: Estimated preparation time in minutes.
        tags:
          type: array
          nullable: true
          items:
            type: string
          description: Tags associated with the item.
        taxId:
          type: string
          format: uuid
          nullable: true
          description: Tax rate assigned to the item.
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        deletedAt:
          type: string
          format: date-time
          nullable: true
        menuItem:
          type: object
          properties:
            menuId:
              type: string
              format: uuid
            itemId:
              type: string
              format: uuid
            createdAt:
              type: string
              format: date-time
            updatedAt:
              type: string
              format: date-time
        sizeGroup:
          type: object
          properties:
            id:
              type: string
              format: uuid
            chainId:
              type: string
              format: uuid
            name:
              type: string
            defaultSizeId:
              type: string
              format: uuid
              nullable: true
            createdAt:
              type: string
              format: date-time
            updatedAt:
              type: string
              format: date-time
            deletedAt:
              type: string
              format: date-time
              nullable: true
            sizes:
              type: array
              items:
                type: object
                properties:
                  id:
                    type: string
                  sizeGroupId:
                    type: string
                  name:
                    type: string
                  createdAt:
                    type: string
                    format: date-time
                  updatedAt:
                    type: string
                    format: date-time
                  deletedAt:
                    type: string
                    format: date-time
                    nullable: true
                  prices:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        ownerId:
                          type: string
                        ownerType:
                          type: string
                        entityId:
                          type: string
                        entityType:
                          type: string
                        channelId:
                          nullable: true
                        contextType:
                          nullable: true
                        contextId:
                          nullable: true
                        amount:
                          type: number
                          format: float
                        currency:
                          type: string
                          nullable: true
                        info:
                          type: string
                          nullable: true
                        createdAt:
                          type: string
                          format: date-time
                        updatedAt:
                          type: string
                          format: date-time
                        deletedAt:
                          type: string
                          format: date-time
                          nullable: true
                        channel:
                          nullable: true
        itemSortingOrder:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              entityId:
                type: string
              entityType:
                type: string
              ownerId:
                type: string
              ownerType:
                type: string
              lexorank:
                type: string
              createdAt:
                type: string
                format: date-time
              updatedAt:
                type: string
                format: date-time
        schedules:
          type: array
          items:
            type: object
        prices:
          type: array
          items:
            $ref: '#/components/schemas/fullPriceResponse'
        modifierGroups:
          type: array
          items:
            type: object
    itemResponse:
      title: itemResponse
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier of the item
        chainId:
          type: string
          format: uuid
          description: Identifier of the chain it belongs to
        sizeGroupId:
          type: string
          format: uuid
          nullable: true
          description: Identifier of the size group assigned to the item
        name:
          type: string
          description: Item name
        image:
          type: string
          nullable: true
          description: Item image URL
        featured:
          type: boolean
          description: Indicates if the item is featured
        description:
          type: string
          description: Item description
          nullable: true
        sku:
          type: string
          nullable: true
          description: Optional item SKU
        alergies:
          type: string
          nullable: true
          description: Allergy information for the item
        preparationTime:
          type: integer
          description: Estimated preparation time
        tags:
          type: array
          nullable: true
          items:
            type: string
        prices:
          type: array
          description: Prices associated with the item
          items:
            $ref: '#/components/schemas/fullPriceResponse'
        taxId:
          type: string
          format: uuid
          description: Associated tax identifier
          nullable: true
        createdAt:
          type: string
          format: date-time
          description: Creation date and time
        updatedAt:
          type: string
          format: date-time
          description: Last update date and time
        deletedAt:
          type: string
          format: date-time
          nullable: true
    fullPriceResponse:
      title: fullPriceResponse
      type: object
      properties:
        id:
          type: string
          format: uuid
        ownerId:
          type: string
          format: uuid
        ownerType:
          type: string
        entityId:
          type: string
          format: uuid
        entityType:
          type: string
        channelId:
          type: string
          format: uuid
        contextType:
          type: string
        contextId:
          type: string
          format: uuid
        amount:
          type: number
          format: float
        currency:
          type: string
        info:
          type: string
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        deletedAt:
          type: string
          format: date-time
          nullable: true
    priceResponse:
      title: priceResponse
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier of the price
        amount:
          type: number
          format: float
          description: Price amount
        ownerId:
          type: string
          format: uuid
          nullable: true
          description: Owner identifier for the price
        ownerType:
          type: string
          description: Owner type for the price
        entityId:
          type: string
          format: uuid
          nullable: true
          description: Identifier of the priced entity
        entityType:
          type: string
          description: Type of priced entity
        channelId:
          type: string
          format: uuid
          nullable: true
          description: Identifier of the associated channel
        contextType:
          type: string
          nullable: true
        contextId:
          type: string
          format: uuid
          nullable: true
        currency:
          type: string
          nullable: true
        info:
          type: string
          nullable: true
        createdAt:
          type: string
          format: date-time
          description: Creation date and time
        updatedAt:
          type: string
          format: date-time
          description: Last update date and time
        deletedAt:
          type: string
          format: date-time
          nullable: true
    quantityConstraintsResponse:
      title: quantityConstraintsResponse
      type: object
      properties:
        id:
          type: string
          format: uuid
        entityId:
          type: string
          format: uuid
        entityType:
          type: string
        contextId:
          type: string
          format: uuid
          nullable: true
        contextType:
          type: string
          nullable: true
        min:
          type: integer
        max:
          type: integer
        chargeAbove:
          type: integer
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        deletedAt:
          type: string
          format: date-time
          nullable: true
    schedulesResponse:
      title: schedulesResponse
      type: object
      properties:
        id:
          type: string
          format: uuid
        day:
          type: string
          enum:
            - monday
            - tuesday
            - wednesday
            - thursday
            - friday
            - saturday
            - sunday
        ownerId:
          type: string
          format: uuid
        ownerType:
          type: string
          enum:
            - restaurant
            - virtual_location
        inheritsFromOwnerId:
          type: string
          format: uuid
          nullable: true
        enabled:
          type: boolean
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        deletedAt:
          type: string
          format: date-time
          nullable: true
        hours:
          type: array
          items:
            $ref: '#/components/schemas/schedulesHours'
    sizeGroupResponse:
      title: sizeGroupResponse
      type: object
      properties:
        id:
          type: string
          format: uuid
        chainId:
          type: string
          format: uuid
        name:
          type: string
        defaultSizeId:
          type: string
          format: uuid
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        deletedAt:
          type: string
          format: date-time
          nullable: true
        sizes:
          type: array
          items:
            $ref: '#/components/schemas/sizeWithPricesResponse'
    sizeResponse:
      title: sizeResponse
      type: object
      properties:
        id:
          type: string
          format: uuid
        sizeGroupId:
          type: string
          format: uuid
        name:
          type: string
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        deletedAt:
          type: string
          format: date-time
          nullable: true
    sizeWithPricesResponse:
      title: sizeWithPricesResponse
      type: object
      properties:
        id:
          type: string
          format: uuid
        sizeGroupId:
          type: string
          format: uuid
        name:
          type: string
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        deletedAt:
          type: string
          format: date-time
          nullable: true
        prices:
          type: array
          items:
            $ref: '#/components/schemas/fullPriceResponse'
        sizeSortingOrder:
          $ref: '#/components/schemas/itemSortingOrderResponse'
    itemUpdateResponse:
      title: itemUpdateResponse
      type: object
      properties:
        id:
          type: string
          format: uuid
        chainId:
          type: string
          format: uuid
        sizeGroupId:
          type: string
        name:
          type: string
        image:
          type: string
        featured:
          type: boolean
        description:
          type: string
        sku:
          type: string
          nullable: true
        alergies:
          type: string
        tags:
          type: array
          items:
            type: string
        preparationTime:
          type: integer
        taxId:
          type: string
          format: uuid
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        deletedAt:
          type: string
          format: date-time
          nullable: true
    itemSortingOrderResponse:
      title: itemSortingOrderResponse
      type: object
      properties:
        id:
          type: string
          format: uuid
        entityId:
          type: string
          format: uuid
        entityType:
          type: string
        ownerId:
          type: string
          format: uuid
        ownerType:
          type: string
        lexorank:
          type: string
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    itemGetOneResponse:
      type: object
      x-examples:
        Example 1:
          id: fd1fbf0a-6df8-4f40-87dc-a107e58ba3d0
          chainId: 9e4e812d-849a-40ef-9a7e-5346e3370ffb
          sizeGroupId: null
          name: Cacao 70%
          image: null
          featured: false
          description: null
          sku: null
          alergies: null
          preparationTime: 120
          tags: null
          taxId: 794b43f1-560d-11ef-adab-4201ac1a5137
          createdAt: '2025-02-18T03:16:48.000Z'
          updatedAt: '2025-02-18T03:16:48.000Z'
          deletedAt: null
          prices:
            - id: 3ee10ef5-907b-462b-a18d-b4f0958b98d3
              ownerId: 9e4e812d-849a-40ef-9a7e-5346e3370ffb
              ownerType: chain
              entityId: fd1fbf0a-6df8-4f40-87dc-a107e58ba3d0
              entityType: item
              channelId: null
              contextType: modifier_group
              contextId: b86c855d-eacf-410c-9351-8e8ae0eb985d
              amount: 0
              currency: null
              info: null
              createdAt: '2025-07-16T23:42:00.000Z'
              updatedAt: '2025-07-16T23:42:00.000Z'
              deletedAt: null
      properties:
        id:
          type: string
          format: uuid
        chainId:
          type: string
          format: uuid
        sizeGroupId:
          type: string
          format: uuid
          nullable: true
        name:
          type: string
        image:
          type: string
          format: uri
        featured:
          type: boolean
        description:
          type: string
        sku:
          type: string
          nullable: true
        alergies:
          type: string
        preparationTime:
          type: integer
        tags:
          type: array
          items:
            type: string
        taxId:
          type: string
          format: uuid
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        deletedAt:
          type: string
          format: date-time
          nullable: true
        prices:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              ownerId:
                type: string
              ownerType:
                type: string
              entityId:
                type: string
              entityType:
                type: string
              channelId:
                nullable: true
              contextType:
                type: string
              contextId:
                type: string
              amount:
                type: number
                format: float
              currency:
                nullable: true
              info:
                nullable: true
              createdAt:
                type: string
                format: date-time
              updatedAt:
                type: string
                format: date-time
              deletedAt:
                type: string
                format: date-time
                nullable: true
    tax:
      title: Tax
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier of the tax
        taxRateId:
          type: string
          format: uuid
          nullable: true
          description: Identifier of the associated tax rate
        groupId:
          type: string
          format: uuid
          description: Identifier of the group it belongs to
        name:
          type: string
          description: Tax name
        taxIncluded:
          type: boolean
          description: Indicates if the tax is included in the listed price
        prodServCode:
          type: string
          nullable: true
          description: Product/service code for the tax
        iepsRate:
          type: number
          format: float
          nullable: true
          description: IEPS tax rate, when applicable
        taxRate:
          $ref: '#/components/schemas/taxRate'
        createdAt:
          type: string
          format: date-time
          description: Creation date and time
        updatedAt:
          type: string
          format: date-time
          description: Last update date and time
        deletedAt:
          type: string
          format: date-time
          nullable: true
    taxRate:
      title: taxRate
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier of the tax rate
        rate:
          type: number
          format: float
          description: Value of the tax rate
        name:
          type: string
          description: Tax rate name
        country:
          type: string
          description: Country code for the tax rate
        goblType:
          type: string
          nullable: true
        goblKey:
          type: string
          nullable: true
        goblPercent:
          type: string
          nullable: true
        state:
          type: string
          nullable: true
        city:
          type: string
          nullable: true
        countryDefault:
          type: boolean
        stateDefault:
          type: boolean
        cityDefault:
          type: boolean
        createdAt:
          type: string
          format: date-time
          description: Creation date and time
        updatedAt:
          type: string
          format: date-time
          description: Last update date and time
        deletedAt:
          type: string
          format: date-time
          nullable: true
    schedulesHours:
      title: schedulesHours
      type: object
      properties:
        id:
          type: string
          format: uuid
        dayScheduleId:
          type: string
          format: uuid
        menuGroupId:
          type: string
          format: uuid
        from:
          type: integer
        to:
          type: integer
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        deletedAt:
          type: string
          format: date-time
          nullable: true
    restaurant:
      title: restaurant
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier of the restaurant
        groupId:
          type: string
          format: uuid
          description: Identifier of the group this restaurant belongs to
        chainId:
          type: string
          format: uuid
          description: Identifier of the chain this restaurant belongs to
        name:
          type: string
          description: Restaurant name
        language:
          type: string
          description: Default language for the restaurant
        neighborhood:
          type: string
          description: Neighborhood
        address:
          type: string
          description: Street address
        address_secondary:
          type: string
          description: Secondary address information
        city:
          type: string
          description: City
        state:
          type: string
          description: State or province
        country:
          type: string
          description: Country code
        county:
          type: string
          description: County or district
        zipcode:
          type: string
          description: Postal or ZIP code
        latitude:
          type: number
          format: double
          nullable: true
          description: Restaurant latitude.
        longitude:
          type: number
          format: double
          nullable: true
          description: Restaurant longitude.
        timezone:
          type: string
          description: Restaurant timezone
        currency:
          type: string
          description: Currency code used by the restaurant.
        companyTaxIdNumber:
          type: string
          nullable: true
          description: Tax identification number of the restaurant.
        taxEntityName:
          type: string
          nullable: true
          description: Legal tax entity name for the restaurant.
        fiscalRegime:
          type: string
          nullable: true
          description: Fiscal regime code for the restaurant.
        chain:
          $ref: '#/components/schemas/chain'
        group:
          $ref: '#/components/schemas/group'
        createdAt:
          type: string
          format: date-time
          description: Creation date and time
        updatedAt:
          type: string
          format: date-time
          description: Last update date and time
        deletedAt:
          type: string
          format: date-time
          description: 'Deletion date and time, if the restaurant has been soft-deleted'
          nullable: true
    chain:
      title: chain
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier of the chain
        groupId:
          type: string
          format: uuid
          description: Identifier of the group this chain belongs to
        name:
          type: string
          description: Chain name
        businessType:
          type: string
          nullable: true
          description: Business type for the chain.
        defaultTaxId:
          type: string
          format: uuid
          nullable: true
          description: Default tax identifier for the chain
        restaurantCount:
          type: integer
          description: Number of enabled restaurants in this chain
        createdAt:
          type: string
          format: date-time
          description: Creation date and time
        updatedAt:
          type: string
          format: date-time
          description: Last update date and time
    group:
      title: group
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier of the group
        name:
          type: string
          description: Group name
        countryCode:
          type: string
          description: ISO country code
        state:
          type: string
          description: State or province
        city:
          type: string
          description: City
        address:
          type: string
          description: Street address
        zipcode:
          type: string
          description: Postal or ZIP code
        createdAt:
          type: string
          format: date-time
          description: Creation date and time
        updatedAt:
          type: string
          format: date-time
          description: Last update date and time
    orderItemNoteRequestBody:
      title: orderItemNoteRequestBody
      type: object
      properties:
        content:
          type: string
        price:
          type: object
          nullable: true
          properties:
            amount:
              type: number
              format: float
    orderItemNoteUpdateRequestBody:
      title: orderItemNoteUpdateRequestBody
      type: object
      properties:
        content:
          type: string
        price:
          type: object
          properties:
            amount:
              type: number
              format: float
    orderResponse:
      title: orderResponse
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier of the order
        masterOrderId:
          type: string
          format: uuid
          description: Identifier of the main order (for split orders)
          nullable: true
        dayOrderNumber:
          type: integer
          description: Order number of the day
        internalOrderId:
          type: integer
          description: Internal order identifier
        customerCount:
          type: integer
          description: Number of customers
        customerName:
          type: string
          description: Customer name
        appId:
          type: string
          format: uuid
          description: Identifier of the application that created the order
        externalOrderReference:
          type: string
          description: External order reference
        estimatedPickupAt:
          type: string
          format: date-time
          description: Estimated pickup date and time
          nullable: true
        pickedUpAt:
          type: string
          format: date-time
          description: Date and time when the order was picked up
          nullable: true
        type:
          type: string
          enum:
            - direct_sale
            - takeout
            - delivery
            - table_service
          description: Order type
        terminalId:
          type: string
          format: uuid
          description: Terminal identifier
          nullable: true
        restaurantId:
          type: string
          format: uuid
          description: Restaurant identifier
        virtualLocationId:
          type: string
          format: uuid
          description: Virtual location identifier
          nullable: true
        status:
          type: string
          enum:
            - completed
            - void
            - draft
            - needs_approval
            - in_progress
            - waiting_for_pickup
          description: Order status
        vip:
          type: boolean
          description: Indicates if the order is VIP
        tableId:
          type: string
          format: uuid
          description: Table identifier
          nullable: true
        startedAt:
          type: string
          format: date-time
          description: Order start date and time
          nullable: true
        finishedAt:
          type: string
          format: date-time
          description: Order completion date and time
          nullable: true
        totalAmount:
          type: number
          format: float
          description: Total order amount
        taxAmount:
          type: number
          format: float
          description: Tax amount
        subtotalAmount:
          type: number
          format: float
          description: Order subtotal
        discountAmount:
          type: number
          format: float
          description: Discount amount
        itemsDiscountAmount:
          type: number
          format: float
          description: Items discount amount
        seat:
          type: integer
          description: Seat number
          nullable: true
        voidReason:
          type: string
          description: Void reason
          nullable: true
        notes:
          type: string
          description: Order notes
          nullable: true
        voidedBy:
          type: string
          format: uuid
          description: Identifier of who voided the order
          nullable: true
        voidedAt:
          type: string
          format: date-time
          nullable: true
          description: Date and time when the order was voided
        metadata:
          type: object
          description: Additional order metadata
          additionalProperties:
            type: string
        orderItems:
          type: array
          description: Order items
          items:
            $ref: '#/components/schemas/orderItem'
        discounts:
          type: array
          description: Discounts applied to the order
          items:
            $ref: '#/components/schemas/discount'
        payments:
          type: array
          description: Payments associated with the order
          items:
            $ref: '#/components/schemas/payments'
        createdAt:
          type: string
          format: date-time
          description: Creation date and time
        updatedAt:
          type: string
          format: date-time
          description: Last update date and time
        versionNumber:
          type: integer
          description: Internal optimistic version number for the order.
        deletedAt:
          type: string
          format: date-time
          nullable: true
    discount:
      title: discount
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier of the discount
        orderId:
          type: string
          format: uuid
          nullable: true
          description: Order identifier (if discount is at order level)
        orderItemId:
          type: string
          format: uuid
          nullable: true
          description: Item identifier (if discount is at item level)
        promotionId:
          type: string
          format: uuid
          nullable: true
          description: Identifier of the associated promotion
        terminalId:
          type: string
          format: uuid
          nullable: true
          description: Terminal identifier associated with the discount
        employeeId:
          type: string
          format: uuid
          nullable: true
          description: Employee identifier associated with the discount
        description:
          type: string
          nullable: true
          description: Discount description
        amount:
          type: number
          format: float
          description: Discount amount
        type:
          type: string
          enum:
            - percentage
            - fixed
          description: Discount type (percentage or fixed amount)
        terminalDate:
          type: string
          format: date-time
          nullable: true
          description: Terminal date for the discount
        promotion:
          type: object
          nullable: true
          description: Information about the associated promotion
          properties:
            id:
              type: string
              format: uuid
            name:
              type: string
            code:
              type: string
        createdAt:
          type: string
          format: date-time
          description: Creation date and time
        updatedAt:
          type: string
          format: date-time
          description: Last update date and time
        deletedAt:
          type: string
          format: date-time
          nullable: true
    orderItem:
      title: orderItem
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier of the order item
        orderId:
          type: string
          format: uuid
          description: Identifier of the order it belongs to
        userId:
          type: string
          format: uuid
          nullable: true
          description: Identifier of the user associated with the order item
        itemId:
          type: string
          format: uuid
          description: Identifier of the menu item
          nullable: true
        priceId:
          type: string
          format: uuid
          description: Price identifier
          nullable: true
        sizeId:
          type: string
          format: uuid
          nullable: true
        menuId:
          type: string
          format: uuid
          nullable: true
        sizePriceId:
          type: string
          format: uuid
          nullable: true
        scheduleRuleId:
          type: string
          format: uuid
          nullable: true
        taxId:
          type: string
          format: uuid
          nullable: true
        quantity:
          type: integer
          description: Quantity
        totalAmount:
          type: number
          format: float
          description: Total item amount
        subtotalAmount:
          type: number
          format: float
          description: Subtotal
        discountAmount:
          type: number
          format: float
          description: Discount amount
        taxAmount:
          type: number
          format: float
          description: Tax amount
        status:
          type: string
          enum:
            - kitchen
            - in_process
            - rush
            - canceled
            - completed
            - retaken
            - payment_required
            - returned
            - in_cart
          description: Item status
        canceledBy:
          type: string
          format: uuid
          nullable: true
        returnedBy:
          type: string
          format: uuid
          nullable: true
        inProcessAt:
          type: string
          format: date-time
          nullable: true
        rushAt:
          type: string
          format: date-time
          nullable: true
        completedAt:
          type: string
          format: date-time
          nullable: true
        canceledAt:
          type: string
          format: date-time
          nullable: true
        retakenAt:
          type: string
          format: date-time
          nullable: true
        returnedAt:
          type: string
          format: date-time
          nullable: true
        seat:
          type: integer
          description: Seat number
          nullable: true
        masterOrderItemId:
          type: string
          format: uuid
          nullable: true
        terminalDate:
          type: string
          format: date-time
          nullable: true
        price:
          $ref: '#/components/schemas/priceResponse'
        sizePrice:
          $ref: '#/components/schemas/priceResponse'
        item:
          $ref: '#/components/schemas/itemResponse'
        size:
          $ref: '#/components/schemas/sizeResponse'
        tax:
          $ref: '#/components/schemas/tax'
        note:
          type: object
          nullable: true
        orderItemModifiers:
          type: array
          description: Item modifiers
          items:
            $ref: '#/components/schemas/orderItemModifier'
        discounts:
          type: array
          description: Discounts applied to the item
          items:
            $ref: '#/components/schemas/discount'
        createdAt:
          type: string
          format: date-time
          description: Creation date and time
        updatedAt:
          type: string
          format: date-time
          description: Last update date and time
        deletedAt:
          type: string
          format: date-time
          nullable: true
    orderItemModifier:
      title: orderItemModifier
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier of the modifier
        orderItemId:
          type: string
          format: uuid
          description: Identifier of the order item it belongs to
        orderItemModifierId:
          type: string
          format: uuid
          nullable: true
          description: Parent modifier identifier, when nested.
        itemId:
          type: string
          format: uuid
          description: Identifier of the modifier item
          nullable: true
        priceId:
          type: string
          format: uuid
          description: Price identifier
          nullable: true
        sizeId:
          type: string
          format: uuid
          nullable: true
        modifierGroupId:
          type: string
          format: uuid
          nullable: true
        sizePriceId:
          type: string
          format: uuid
          nullable: true
        taxId:
          type: string
          format: uuid
          description: Tax identifier
          nullable: true
        quantity:
          type: integer
          description: Quantity of modifiers
        item:
          $ref: '#/components/schemas/itemResponse'
        price:
          $ref: '#/components/schemas/priceResponse'
        sizePrice:
          $ref: '#/components/schemas/priceResponse'
        size:
          $ref: '#/components/schemas/sizeResponse'
        tax:
          $ref: '#/components/schemas/tax'
        createdAt:
          type: string
          format: date-time
          description: Creation date and time
        updatedAt:
          type: string
          format: date-time
          description: Last update date and time
        deletedAt:
          type: string
          format: date-time
          nullable: true
    payments:
      title: payments
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier of the payment
        orderId:
          type: string
          format: uuid
          description: Identifier of the associated order
        restaurantId:
          type: string
          format: uuid
          description: Restaurant identifier
        paymentMethod:
          type: string
          enum:
            - cash
            - card
            - courtesy
            - gift_card
            - loyalty
            - bank_transfer
            - delivery_platform
            - app
            - other
          description: Payment method
        userId:
          type: string
          format: uuid
          nullable: true
        employeeId:
          type: string
          format: uuid
          nullable: true
        terminalId:
          type: string
          format: uuid
          description: Terminal identifier
          nullable: true
        appId:
          type: string
          format: uuid
          description: Identifier of the application that processed the payment
          nullable: true
        paymentTerminalMetadatumId:
          type: string
          format: uuid
          description: Terminal metadata identifier
          nullable: true
        paymentTerminalCardTypeId:
          type: string
          format: uuid
          description: Card type identifier
          nullable: true
        paymentAuthCode:
          type: string
          nullable: true
        paymentCardId:
          type: string
          format: uuid
          nullable: true
        tipAmount:
          type: number
          format: float
          nullable: true
        taxAmount:
          type: number
          format: float
          nullable: true
        totalAmount:
          type: number
          format: float
          description: Payment amount including tax and excluding tip
        changeAmount:
          type: number
          format: float
          nullable: true
        currency:
          type: string
          nullable: true
        gatewayPaymentId:
          type: string
          nullable: true
        status:
          type: string
          enum:
            - initiated
            - in_progress
            - completed
            - failed
            - refunded
            - internal_error
          description: Payment status
        captured:
          type: boolean
          nullable: true
        terminalDate:
          type: string
          format: date-time
          nullable: true
        refunds:
          type: array
          description: Refunds associated with the payment
          items:
            $ref: '#/components/schemas/refund'
        paymentBankTransfer:
          type: object
          description: Bank transfer information
          nullable: true
          properties:
            id:
              type: string
              format: uuid
            accountNumber:
              type: string
            bankName:
              type: string
            reference:
              type: string
        createdAt:
          type: string
          format: date-time
          description: Fecha y hora de creación
        updatedAt:
          type: string
          format: date-time
          description: Fecha y hora de última actualización
        deletedAt:
          type: string
          format: date-time
          nullable: true
    refund:
      title: refund
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier of the refund
        orderId:
          type: string
          format: uuid
          nullable: true
          description: Identifier of the associated order
        employeeId:
          type: string
          format: uuid
          nullable: true
          description: Employee identifier associated with the refund
        terminalId:
          type: string
          format: uuid
          nullable: true
          description: Terminal identifier associated with the refund
        description:
          type: string
          nullable: true
          description: Refund description
        terminalDate:
          type: string
          format: date-time
          nullable: true
          description: Terminal date for the refund
        amount:
          type: number
          format: float
          description: Refund amount
        createdAt:
          type: string
          format: date-time
          description: Creation date and time
        updatedAt:
          type: string
          format: date-time
          description: Last update date and time
        deletedAt:
          type: string
          format: date-time
          nullable: true
    itemWithoutPriceResponse:
      type: object
      x-examples:
        Example 1:
          id: 003a5832-b19c-4bcb-9b5f-1ab918843cc6
          chainId: 9e4e812d-849a-40ef-9a7e-5346e3370ffb
          sizeGroupId: null
          name: Leche Entera
          image: null
          featured: false
          description: null
          sku: null
          alergies: null
          preparationTime: 180
          tags: null
          taxId: 794b43f1-560d-11ef-adab-4201ac1a5137
          createdAt: '2025-05-19T22:22:05.000Z'
          updatedAt: '2025-05-19T22:22:05.000Z'
          deletedAt: null
      properties:
        id:
          type: string
          format: uuid
        chainId:
          type: string
        sizeGroupId:
          type: string
        name:
          type: string
        image:
          type: string
        featured:
          type: boolean
        description:
          type: string
        sku:
          type: string
          nullable: true
        alergies:
          type: string
        preparationTime:
          type: integer
        tags:
          type: array
          items:
            type: string
        taxId:
          type: string
          format: uuid
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        deletedAt:
          type: string
          format: date-time
          nullable: true
    itemUpdateBody:
      type: object
      x-examples:
        Example 1:
          name: Updated Burger Deluxe
          description: A juicy burger with premium toppings and special sauce
          image: 'https://example.com/images/burger-deluxe.jpg'
          featured: true
          alergies:
            - dairy
            - gluten
          preparationTime: 15
          tags:
            - burger
            - lunch
            - bestseller
          taxId: tax-uuid-here
          price:
            ownerId: restaurant-uuid-here
            ownerType: restaurant
            amount: 12.99
            info: hola hola
            channelId: channel-uuid-here
      properties:
        name:
          type: string
        description:
          type: string
        image:
          type: string
          nullable: true
        featured:
          type: boolean
        alergies:
          type: string
        preparationTime:
          type: integer
        tags:
          type: array
          items:
            type: string
        taxId:
          type: string
          format: uuid
        price:
          type: object
          properties:
            ownerId:
              type: string
              format: uuid
              nullable: true
            ownerType:
              type: string
            amount:
              type: number
            info:
              type: string
            channelId:
              type: string
              format: uuid
    menuGroupsResponse:
      type: object
      x-examples:
        Example 1:
          id: 4eef41fa-fa51-4a84-8415-dc911c1f9f51
          ownerId: 9e4e812d-849a-40ef-9a7e-5346e3370ffb
          ownerType: chain
          name: Menú Desayuno
          description: null
          createdAt: '2025-03-10T16:38:47.000Z'
          updatedAt: '2025-07-21T19:36:06.000Z'
          deletedAt: null
          menus:
            - id: 2f3870e8-c47a-4f17-8b64-cfa11ec19641
              ownerId: 9e4e812d-849a-40ef-9a7e-5346e3370ffb
              ownerType: chain
              name: Especiales
              description: null
              type: drinks
              createdAt: '2025-03-10T18:18:35.000Z'
              updatedAt: '2025-03-10T18:18:38.000Z'
              deletedAt: null
              menuGroupMenu:
                createdAt: '2025-04-22T17:35:59.000Z'
                updatedAt: '2025-04-22T17:35:59.000Z'
                menuGroupId: 4eef41fa-fa51-4a84-8415-dc911c1f9f51
                menuId: 2f3870e8-c47a-4f17-8b64-cfa11ec19641
            - id: d07d1839-06c8-4373-a44b-7dd1b7d938aa
              ownerId: 9e4e812d-849a-40ef-9a7e-5346e3370ffb
              ownerType: chain
              name: Calientes
              description: null
              type: drinks
              createdAt: '2025-03-10T16:42:04.000Z'
              updatedAt: '2025-03-10T16:42:08.000Z'
              deletedAt: null
              menuGroupMenu:
                createdAt: '2025-04-24T17:59:59.000Z'
                updatedAt: '2025-04-24T17:59:59.000Z'
                menuGroupId: 4eef41fa-fa51-4a84-8415-dc911c1f9f51
                menuId: d07d1839-06c8-4373-a44b-7dd1b7d938aa
            - id: dfb28ad7-00e6-419c-a6b0-8a67826c52c8
              ownerId: 9e4e812d-849a-40ef-9a7e-5346e3370ffb
              ownerType: chain
              name: Desayunos
              description: null
              type: food
              createdAt: '2025-03-10T16:39:10.000Z'
              updatedAt: '2025-03-10T16:41:06.000Z'
              deletedAt: null
              menuGroupMenu:
                createdAt: '2025-03-10T16:39:19.000Z'
                updatedAt: '2025-03-10T16:39:19.000Z'
                menuGroupId: 4eef41fa-fa51-4a84-8415-dc911c1f9f51
                menuId: dfb28ad7-00e6-419c-a6b0-8a67826c52c8
            - id: ed25d352-92b0-485b-a697-791d3fb77b15
              ownerId: d18dcccd-0dfc-4750-a240-43820e35bd69
              ownerType: restaurant
              name: Comidas
              description: null
              type: food
              createdAt: '2024-02-02T21:32:41.000Z'
              updatedAt: '2024-02-02T21:32:41.000Z'
              deletedAt: null
              menuGroupMenu:
                createdAt: '2025-07-21T19:36:06.000Z'
                updatedAt: '2025-07-21T19:36:06.000Z'
                menuGroupId: 4eef41fa-fa51-4a84-8415-dc911c1f9f51
                menuId: ed25d352-92b0-485b-a697-791d3fb77b15
            - id: f3544e1d-66e1-47c4-935f-708a93938d49
              ownerId: 9e4e812d-849a-40ef-9a7e-5346e3370ffb
              ownerType: chain
              name: Postres
              description: null
              type: food
              createdAt: '2025-03-10T18:21:26.000Z'
              updatedAt: '2025-03-10T18:21:29.000Z'
              deletedAt: null
              menuGroupMenu:
                createdAt: '2025-04-22T17:36:00.000Z'
                updatedAt: '2025-04-22T17:36:00.000Z'
                menuGroupId: 4eef41fa-fa51-4a84-8415-dc911c1f9f51
                menuId: f3544e1d-66e1-47c4-935f-708a93938d49
      properties:
        id:
          type: string
          format: uuid
        ownerId:
          type: string
          format: uuid
        ownerType:
          type: string
        name:
          type: string
        description:
          nullable: true
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        deletedAt:
          type: string
          format: date-time
          nullable: true
        menus:
          type: array
          items:
            $ref: '#/components/schemas/menuMenuGroupResponse'
    menuMenuGroupResponse:
      type: object
      x-examples:
        Example 1:
          id: 2f3870e8-c47a-4f17-8b64-cfa11ec19641
          ownerId: 9e4e812d-849a-40ef-9a7e-5346e3370ffb
          ownerType: chain
          name: Especiales
          description: null
          type: drinks
          createdAt: '2025-03-10T18:18:35.000Z'
          updatedAt: '2025-03-10T18:18:38.000Z'
          deletedAt: null
      properties:
        id:
          type: string
          format: uuid
        ownerId:
          type: string
          format: uuid
        ownerType:
          type: string
        name:
          type: string
        description:
          nullable: true
        type:
          type: string
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        deletedAt:
          type: string
          format: date-time
          nullable: true
      description: Only show if we use expand menus
    menuGroupCreateBody:
      type: object
      x-examples:
        Example 1:
          ownerId: 9e4e812d-849a-40ef-9a7e-5346e3370ffb
          ownerType: chain
          channelId: channel-uuid-here
          name: Menú Desayuno
          description: Menús disponibles para el desayuno
      required:
        - ownerId
        - ownerType
        - channelId
      properties:
        ownerId:
          type: string
          format: uuid
        ownerType:
          enum:
            - chain
            - restaurant
            - virtual_location
        channelId:
          type: string
          format: uuid
        name:
          type: string
        description:
          type: string
    menuGroupCreateResponse:
      type: object
      x-examples:
        Example 1:
          id: 7c056e0b-15cc-4004-9cf1-484322bf9207
          ownerId: 9e4e812d-849a-40ef-9a7e-5346e3370ffb
          ownerType: chain
          name: Menú Desayuno
          description: Menús disponibles para el desayuno
          createdAt: '2025-08-04T17:04:10.000Z'
          updatedAt: '2025-08-04T17:04:10.000Z'
          deletedAt: null
      properties:
        id:
          type: string
          format: uuid
        ownerId:
          type: string
          format: uuid
        ownerType:
          enum:
            - chain
            - restaurant
            - virtual_location
        name:
          type: string
        description:
          type: string
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        deletedAt:
          nullable: true
    menuGroupUpdateBody:
      type: object
      properties:
        name:
          type: string
        description:
          type: string
      x-examples:
        Example 1:
          name: test refactor update
          description: Updated menu group description 1
    menuGroupDeleteBody:
      title: menuGroupDeleteBody
      type: object
      required:
        - ownerId
        - ownerType
      properties:
        ownerId:
          type: string
          format: uuid
        ownerType:
          enum:
            - chain
            - restaurant
            - virtual_location
    menuGroupAddMenuBody:
      title: menuGroupAddMenuBody
      type: object
      required:
        - ownerId
        - menus
      properties:
        ownerId:
          type: string
        menus:
          type: array
          description: Menu ids
          items:
            type: string
    menuGroupRemoveMenuBody:
      title: menuGroupRemoveMenuBody
      type: object
      required:
        - ownerId
        - ownerType
      properties:
        ownerId:
          type: string
          format: uuid
        ownerType:
          enum:
            - chain
            - restaurant
            - virtual_location
    menuGroupSetSortingOrderMenuBody:
      type: object
      x-examples:
        Example 1:
          ownerId: ''
          ownerType: ''
          beforeMenuId: ed25d352-92b0-485b-a697-791d3fb77b15
          afterMenuId: f3544e1d-66e1-47c4-935f-708a93938d49
      required:
        - ownerId
        - ownerType
      properties:
        ownerId:
          type: string
          format: uuid
        ownerType:
          enum:
            - chain
            - restaurant
            - virtual_location
        beforeMenuId:
          type: string
          format: uuid
        afterMenuId:
          type: string
          format: uuid
    modifierGroupCreateBody:
      type: object
      x-examples:
        Example 1:
          name: Tamaños
          description: Selecciona el tamaño de tu bebida
          quantityConstraint:
            min: 1
            max: 1
            chargeAbove: 0
          items:
            - name: Pequeño
              description: 8 oz
              value: 0
              isDefault: true
              quantityConstraint:
                min: 0
                max: 1
                chargeAbove: 0
            - name: Mediano
              description: 12 oz
              value: 10
              quantityConstraint:
                min: 0
                max: 1
                chargeAbove: 0
            - name: Grande
              description: 16 oz
              value: 15
              quantityConstraint:
                min: 0
                max: 1
                chargeAbove: 0
      properties:
        name:
          type: string
        description:
          type: string
        quantityConstraint:
          type: object
          properties:
            min:
              type: integer
            max:
              type: integer
              description: "If values is null, It'll be unlimited "
            chargeAbove:
              type: integer
        modifierItems:
          type: array
          description: This prop is optional
          items:
            type: object
            properties:
              id:
                type: string
                format: uuid
                description: 'If id was not passed, we create a new item'
              name:
                type: string
              description:
                type: string
              value:
                type: integer
              isDefault:
                type: boolean
              quantityConstraint:
                type: object
                properties:
                  min:
                    type: integer
                  max:
                    type: integer
                  chargeAbove:
                    type: integer
    modifierGroupCreateResponse:
      type: object
      x-examples:
        Example 1:
          id: 63bfda56-6f6a-4055-ac1e-65dcc3649597
          chainId: 9e4e812d-849a-40ef-9a7e-5346e3370ffb
          name: Prueba VALE API PUBLICA
          description: es una prueba
          updatedAt: '2025-08-04T19:11:06.247Z'
          createdAt: '2025-08-04T19:11:04.784Z'
          defaultItemId: 003a5832-b19c-4bcb-9b5f-1ab918843cc6
      properties:
        id:
          type: string
          format: uuid
        chainId:
          type: string
          format: uuid
        name:
          type: string
        description:
          type: string
        updatedAt:
          type: string
          format: date-time
        createdAt:
          type: string
          format: date-time
        defaultItemId:
          type: string
          format: uuid
    modifierGroupResponse:
      type: object
      x-examples:
        Example 1:
          id: e8c27b7e-fa8a-47c4-ae49-cd1b46e7de45
          chainId: 9e4e812d-849a-40ef-9a7e-5346e3370ffb
          name: Cacao
          description: null
          defaultItemId: 7dcdee98-0f5e-40cc-bf67-93033fcd9527
          createdAt: '2025-02-18T22:29:44.000Z'
          updatedAt: '2025-07-01T18:29:41.000Z'
          deletedAt: null
          modifierItems:
            - id: 1f32c5c2-0633-4e04-8503-4005a8135b75
              chainId: 9e4e812d-849a-40ef-9a7e-5346e3370ffb
              sizeGroupId: null
              name: Blanco
              image: null
              featured: false
              description: null
              alergies: null
              preparationTime: 180
              tags: null
              taxId: 794b43f1-560d-11ef-adab-4201ac1a5137
              createdAt: '2025-02-18T22:29:45.000Z'
              updatedAt: '2025-02-18T22:29:45.000Z'
              deletedAt: null
              modifierGroupItem:
                createdAt: '2025-02-18T22:29:45.000Z'
                updatedAt: '2025-02-18T22:29:45.000Z'
                modifierGroupId: e8c27b7e-fa8a-47c4-ae49-cd1b46e7de45
                itemId: 1f32c5c2-0633-4e04-8503-4005a8135b75
              quantityConstraints:
                - id: ff7a4eab-6b59-4837-a05e-5bc662773c74
                  entityId: 1f32c5c2-0633-4e04-8503-4005a8135b75
                  entityType: item
                  min: 0
                  max: 1
                  chargeAbove: 0
                  createdAt: '2025-02-18T22:29:46.000Z'
                  updatedAt: '2025-02-28T23:55:55.000Z'
                  deletedAt: null
              prices:
                - id: aebe9ac0-3052-491c-acab-88ee46c8ad1a
                  ownerId: 9e4e812d-849a-40ef-9a7e-5346e3370ffb
                  ownerType: chain
                  entityId: 1f32c5c2-0633-4e04-8503-4005a8135b75
                  entityType: item
                  channelId: 70a9fa23-4e7a-11ee-86b0-4201ac1a5012
                  contextType: modifier_group
                  contextId: e8c27b7e-fa8a-47c4-ae49-cd1b46e7de45
                  amount: 100
                  currency: null
                  info: null
                  createdAt: '2025-07-16T23:42:00.000Z'
                  updatedAt: '2025-07-16T23:42:00.000Z'
                  deletedAt: null
                  channel:
                    id: 70a9fa23-4e7a-11ee-86b0-4201ac1a5012
                    type: pos
                    name: POS
                    supportsMenuGroups: false
                    createdAt: '2023-11-02T10:47:58.000Z'
                    updatedAt: '2023-11-02T10:47:58.000Z'
                    deletedAt: null
              itemSortingOrder:
                - id: b2d243e7-38a1-4013-ac03-bc0395dad0b8
                  entityId: 1f32c5c2-0633-4e04-8503-4005a8135b75
                  entityType: item
                  ownerId: e8c27b7e-fa8a-47c4-ae49-cd1b46e7de45
                  ownerType: modifierGroup
                  lexorank: '0|i00013:'
                  createdAt: '2025-02-18T22:29:46.000Z'
                  updatedAt: '2025-02-18T22:29:46.000Z'
            - id: 6db4fc51-7f4b-4a46-ac29-153e90bd8139
              chainId: 9e4e812d-849a-40ef-9a7e-5346e3370ffb
              sizeGroupId: null
              name: 80%
              image: null
              featured: false
              description: null
              alergies: null
              preparationTime: 60
              tags: null
              taxId: 794b43f1-560d-11ef-adab-4201ac1a5137
              createdAt: '2025-02-18T22:29:45.000Z'
              updatedAt: '2025-02-18T22:29:45.000Z'
              deletedAt: null
              modifierGroupItem:
                createdAt: '2025-02-18T22:29:45.000Z'
                updatedAt: '2025-02-18T22:29:45.000Z'
                modifierGroupId: e8c27b7e-fa8a-47c4-ae49-cd1b46e7de45
                itemId: 6db4fc51-7f4b-4a46-ac29-153e90bd8139
              quantityConstraints:
                - id: 9c14354b-e522-4b2c-80ef-42cd5712f216
                  entityId: 6db4fc51-7f4b-4a46-ac29-153e90bd8139
                  entityType: item
                  min: 0
                  max: 1
                  chargeAbove: 0
                  createdAt: '2025-02-18T22:29:45.000Z'
                  updatedAt: '2025-02-28T23:56:04.000Z'
                  deletedAt: null
              prices:
                - id: b06c14e3-3430-453f-8aef-86df12a1a581
                  ownerId: 9e4e812d-849a-40ef-9a7e-5346e3370ffb
                  ownerType: chain
                  entityId: 6db4fc51-7f4b-4a46-ac29-153e90bd8139
                  entityType: item
                  channelId: null
                  contextType: modifier_group
                  contextId: e8c27b7e-fa8a-47c4-ae49-cd1b46e7de45
                  amount: 0
                  currency: null
                  info: null
                  createdAt: '2025-07-16T23:42:00.000Z'
                  updatedAt: '2025-07-16T23:42:00.000Z'
                  deletedAt: null
                  channel: null
              itemSortingOrder:
                - id: fa790c3b-bb33-462c-b5d9-c0a1d9b125a7
                  entityId: 6db4fc51-7f4b-4a46-ac29-153e90bd8139
                  entityType: item
                  ownerId: e8c27b7e-fa8a-47c4-ae49-cd1b46e7de45
                  ownerType: modifierGroup
                  lexorank: '0|i0000n:'
                  createdAt: '2025-02-18T22:29:45.000Z'
                  updatedAt: '2025-02-18T22:29:45.000Z'
            - id: 7a2003ca-0ac4-498a-983b-8fc4f4a73e7c
              chainId: 9e4e812d-849a-40ef-9a7e-5346e3370ffb
              sizeGroupId: null
              name: 55%
              image: null
              featured: false
              description: null
              alergies: null
              preparationTime: 180
              tags: null
              taxId: 794b43f1-560d-11ef-adab-4201ac1a5137
              createdAt: '2025-02-18T22:29:44.000Z'
              updatedAt: '2025-02-18T22:29:44.000Z'
              deletedAt: null
              modifierGroupItem:
                createdAt: '2025-02-18T22:29:44.000Z'
                updatedAt: '2025-02-18T22:29:44.000Z'
                modifierGroupId: e8c27b7e-fa8a-47c4-ae49-cd1b46e7de45
                itemId: 7a2003ca-0ac4-498a-983b-8fc4f4a73e7c
              quantityConstraints:
                - id: 289ccae9-79f2-45d4-926c-3cf7619cbc89
                  entityId: 7a2003ca-0ac4-498a-983b-8fc4f4a73e7c
                  entityType: item
                  min: 0
                  max: 1
                  chargeAbove: 0
                  createdAt: '2025-02-18T22:29:44.000Z'
                  updatedAt: '2025-02-28T23:56:20.000Z'
                  deletedAt: null
              prices:
                - id: d50449f7-ba44-49c2-867b-4ccfd96f2237
                  ownerId: 9e4e812d-849a-40ef-9a7e-5346e3370ffb
                  ownerType: chain
                  entityId: 7a2003ca-0ac4-498a-983b-8fc4f4a73e7c
                  entityType: item
                  channelId: null
                  contextType: modifier_group
                  contextId: e8c27b7e-fa8a-47c4-ae49-cd1b46e7de45
                  amount: 0
                  currency: null
                  info: null
                  createdAt: '2025-07-16T23:42:00.000Z'
                  updatedAt: '2025-07-16T23:42:00.000Z'
                  deletedAt: null
                  channel: null
              itemSortingOrder:
                - id: f50f8532-9836-44c3-aba8-b8530c9889c9
                  entityId: 7a2003ca-0ac4-498a-983b-8fc4f4a73e7c
                  entityType: item
                  ownerId: e8c27b7e-fa8a-47c4-ae49-cd1b46e7de45
                  ownerType: modifierGroup
                  lexorank: '0|i00007:'
                  createdAt: '2025-02-18T22:29:44.000Z'
                  updatedAt: '2025-02-18T22:29:44.000Z'
            - id: 7dcdee98-0f5e-40cc-bf67-93033fcd9527
              chainId: 9e4e812d-849a-40ef-9a7e-5346e3370ffb
              sizeGroupId: null
              name: 70%
              image: null
              featured: false
              description: null
              alergies: null
              preparationTime: 300
              tags: null
              taxId: 794b43f1-560d-11ef-adab-4201ac1a5137
              createdAt: '2025-02-18T22:29:44.000Z'
              updatedAt: '2025-02-18T22:29:44.000Z'
              deletedAt: null
              modifierGroupItem:
                createdAt: '2025-02-18T22:29:44.000Z'
                updatedAt: '2025-02-18T22:29:44.000Z'
                modifierGroupId: e8c27b7e-fa8a-47c4-ae49-cd1b46e7de45
                itemId: 7dcdee98-0f5e-40cc-bf67-93033fcd9527
              quantityConstraints:
                - id: 17d563c5-3ca1-4ee0-804d-62ee9aae0e3b
                  entityId: 7dcdee98-0f5e-40cc-bf67-93033fcd9527
                  entityType: item
                  min: 0
                  max: 1
                  chargeAbove: 0
                  createdAt: '2025-02-18T22:29:44.000Z'
                  updatedAt: '2025-02-28T23:56:13.000Z'
                  deletedAt: null
              prices:
                - id: 0fb1e9b4-e4cc-40b1-b1a6-c288a86ccf20
                  ownerId: 9e4e812d-849a-40ef-9a7e-5346e3370ffb
                  ownerType: chain
                  entityId: 7dcdee98-0f5e-40cc-bf67-93033fcd9527
                  entityType: item
                  channelId: null
                  contextType: modifier_group
                  contextId: e8c27b7e-fa8a-47c4-ae49-cd1b46e7de45
                  amount: 0
                  currency: null
                  info: null
                  createdAt: '2025-07-16T23:42:00.000Z'
                  updatedAt: '2025-07-16T23:42:00.000Z'
                  deletedAt: null
                  channel: null
              itemSortingOrder:
                - id: 40435858-a53d-4464-bd64-c4772cf828f8
                  entityId: 7dcdee98-0f5e-40cc-bf67-93033fcd9527
                  entityType: item
                  ownerId: e8c27b7e-fa8a-47c4-ae49-cd1b46e7de45
                  ownerType: modifierGroup
                  lexorank: '0|i0000f:'
                  createdAt: '2025-02-18T22:29:45.000Z'
                  updatedAt: '2025-07-25T00:13:01.000Z'
            - id: 97ecf1c4-9185-4499-a3d6-0bf87c3ee64c
              chainId: 9e4e812d-849a-40ef-9a7e-5346e3370ffb
              sizeGroupId: null
              name: 97%
              image: null
              featured: false
              description: null
              alergies: null
              preparationTime: 180
              tags: null
              taxId: 794b43f1-560d-11ef-adab-4201ac1a5137
              createdAt: '2025-02-18T22:29:45.000Z'
              updatedAt: '2025-02-18T22:29:45.000Z'
              deletedAt: null
              modifierGroupItem:
                createdAt: '2025-02-18T22:29:45.000Z'
                updatedAt: '2025-02-18T22:29:45.000Z'
                modifierGroupId: e8c27b7e-fa8a-47c4-ae49-cd1b46e7de45
                itemId: 97ecf1c4-9185-4499-a3d6-0bf87c3ee64c
              quantityConstraints:
                - id: 84234450-46a3-493f-a88b-b4325fa58c82
                  entityId: 97ecf1c4-9185-4499-a3d6-0bf87c3ee64c
                  entityType: item
                  min: 0
                  max: 1
                  chargeAbove: 0
                  createdAt: '2025-02-18T22:29:45.000Z'
                  updatedAt: '2025-02-28T23:55:35.000Z'
                  deletedAt: null
              prices:
                - id: 07dd4efe-7b77-4db1-b1df-a820de7b2c61
                  ownerId: 9e4e812d-849a-40ef-9a7e-5346e3370ffb
                  ownerType: chain
                  entityId: 97ecf1c4-9185-4499-a3d6-0bf87c3ee64c
                  entityType: item
                  channelId: null
                  contextType: modifier_group
                  contextId: e8c27b7e-fa8a-47c4-ae49-cd1b46e7de45
                  amount: 0
                  currency: null
                  info: null
                  createdAt: '2025-07-16T23:42:00.000Z'
                  updatedAt: '2025-07-16T23:42:00.000Z'
                  deletedAt: null
                  channel: null
              itemSortingOrder:
                - id: ecedee42-0549-4a94-8d75-ff3b9de59e1f
                  entityId: 97ecf1c4-9185-4499-a3d6-0bf87c3ee64c
                  entityType: item
                  ownerId: e8c27b7e-fa8a-47c4-ae49-cd1b46e7de45
                  ownerType: modifierGroup
                  lexorank: '0|i0000v:'
                  createdAt: '2025-02-18T22:29:45.000Z'
                  updatedAt: '2025-02-18T22:29:45.000Z'
          quantityConstraint:
            id: 5a185c5d-46b0-4643-974b-394ab56a35f9
            entityId: e8c27b7e-fa8a-47c4-ae49-cd1b46e7de45
            entityType: modifierGroup
            min: 1
            max: 1
            chargeAbove: 0
            createdAt: '2025-02-18T22:29:44.000Z'
            updatedAt: '2025-02-28T23:53:39.000Z'
            deletedAt: null
          modifierGroupSortingOrder:
            id: e0c06a9b-1f87-11f0-9978-4201ac1a51e0
            entityId: e8c27b7e-fa8a-47c4-ae49-cd1b46e7de45
            entityType: modifierGroup
            ownerId: 9e4e812d-849a-40ef-9a7e-5346e3370ffb
            ownerType: chain
            lexorank: '0|hzzzzu:'
            createdAt: '2025-04-22T14:41:29.000Z'
            updatedAt: '2025-07-01T20:59:37.000Z'
      properties:
        id:
          type: string
        chainId:
          type: string
        name:
          type: string
        description:
          nullable: true
        defaultItemId:
          type: string
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        deletedAt:
          nullable: true
        modifierItems:
          type: array
          description: Its show only if we use expand
          items:
            $ref: '#/components/schemas/modifierItem'
        quantityConstraint:
          $ref: '#/components/schemas/quantityConstraintsResponse'
        modifierGroupSortingOrder:
          $ref: '#/components/schemas/itemSortingOrderResponse'
    modifierItem:
      type: object
      x-examples:
        Example 1:
          id: 1f32c5c2-0633-4e04-8503-4005a8135b75
          chainId: 9e4e812d-849a-40ef-9a7e-5346e3370ffb
          sizeGroupId: null
          name: Blanco
          image: null
          featured: false
          description: null
          alergies: null
          preparationTime: 180
          tags: null
          taxId: 794b43f1-560d-11ef-adab-4201ac1a5137
          createdAt: '2025-02-18T22:29:45.000Z'
          updatedAt: '2025-02-18T22:29:45.000Z'
          deletedAt: null
          modifierGroupItem:
            createdAt: '2025-02-18T22:29:45.000Z'
            updatedAt: '2025-02-18T22:29:45.000Z'
            modifierGroupId: e8c27b7e-fa8a-47c4-ae49-cd1b46e7de45
            itemId: 1f32c5c2-0633-4e04-8503-4005a8135b75
          quantityConstraints:
            - id: ff7a4eab-6b59-4837-a05e-5bc662773c74
              entityId: 1f32c5c2-0633-4e04-8503-4005a8135b75
              entityType: item
              min: 0
              max: 1
              chargeAbove: 0
              createdAt: '2025-02-18T22:29:46.000Z'
              updatedAt: '2025-02-28T23:55:55.000Z'
              deletedAt: null
          prices:
            - id: 070ff2af-1f32-4836-bcd9-6c7905e11d47
              ownerId: 9e4e812d-849a-40ef-9a7e-5346e3370ffb
              ownerType: chain
              entityId: 1f32c5c2-0633-4e04-8503-4005a8135b75
              entityType: item
              channelId: null
              contextType: modifier_group
              contextId: e8c27b7e-fa8a-47c4-ae49-cd1b46e7de45
              amount: 0
              currency: null
              info: null
              createdAt: '2025-07-16T23:42:00.000Z'
              updatedAt: '2025-07-16T23:42:00.000Z'
              deletedAt: null
              channel: null
            - id: 4778cc01-2f9f-41cf-b2db-cc8af98ffa17
              ownerId: 085a11f4-f520-4cf3-b469-0c4db46562f1
              ownerType: restaurant
              entityId: 1f32c5c2-0633-4e04-8503-4005a8135b75
              entityType: item
              channelId: null
              contextType: null
              contextId: null
              amount: 0
              currency: null
              info: null
              createdAt: '2025-06-20T15:36:30.000Z'
              updatedAt: '2025-06-20T15:36:30.000Z'
              deletedAt: null
              channel: null
            - id: 53859432-bb3e-46b0-969d-c8764126a4f1
              ownerId: 9e4e812d-849a-40ef-9a7e-5346e3370ffb
              ownerType: chain
              entityId: 1f32c5c2-0633-4e04-8503-4005a8135b75
              entityType: item
              channelId: null
              contextType: null
              contextId: null
              amount: 22
              currency: null
              info: null
              createdAt: '2025-07-01T18:30:12.000Z'
              updatedAt: '2025-07-01T18:30:12.000Z'
              deletedAt: null
              channel: null
            - id: 7caf843b-5308-47a4-9f40-b3fdcc542af2
              ownerId: 9e4e812d-849a-40ef-9a7e-5346e3370ffb
              ownerType: chain
              entityId: 1f32c5c2-0633-4e04-8503-4005a8135b75
              entityType: item
              channelId: 70a9fa23-4e7a-11ee-86b0-4201ac1a5012
              contextType: null
              contextId: null
              amount: 100
              currency: null
              info: null
              createdAt: '2025-07-14T19:37:08.000Z'
              updatedAt: '2025-07-14T19:37:08.000Z'
              deletedAt: null
              channel:
                id: 70a9fa23-4e7a-11ee-86b0-4201ac1a5012
                type: pos
                name: POS
                supportsMenuGroups: false
                createdAt: '2023-11-02T10:47:58.000Z'
                updatedAt: '2023-11-02T10:47:58.000Z'
                deletedAt: null
            - id: aebe9ac0-3052-491c-acab-88ee46c8ad1a
              ownerId: 9e4e812d-849a-40ef-9a7e-5346e3370ffb
              ownerType: chain
              entityId: 1f32c5c2-0633-4e04-8503-4005a8135b75
              entityType: item
              channelId: 70a9fa23-4e7a-11ee-86b0-4201ac1a5012
              contextType: modifier_group
              contextId: e8c27b7e-fa8a-47c4-ae49-cd1b46e7de45
              amount: 100
              currency: null
              info: null
              createdAt: '2025-07-16T23:42:00.000Z'
              updatedAt: '2025-07-16T23:42:00.000Z'
              deletedAt: null
              channel:
                id: 70a9fa23-4e7a-11ee-86b0-4201ac1a5012
                type: pos
                name: POS
                supportsMenuGroups: false
                createdAt: '2023-11-02T10:47:58.000Z'
                updatedAt: '2023-11-02T10:47:58.000Z'
                deletedAt: null
          itemSortingOrder:
            - id: b2d243e7-38a1-4013-ac03-bc0395dad0b8
              entityId: 1f32c5c2-0633-4e04-8503-4005a8135b75
              entityType: item
              ownerId: e8c27b7e-fa8a-47c4-ae49-cd1b46e7de45
              ownerType: modifierGroup
              lexorank: '0|i00013:'
              createdAt: '2025-02-18T22:29:46.000Z'
              updatedAt: '2025-02-18T22:29:46.000Z'
      properties:
        id:
          type: string
          format: uuid
        chainId:
          type: string
          format: uuid
        sizeGroupId:
          type: string
        name:
          type: string
        image:
          type: string
          format: uri
          nullable: true
        featured:
          type: boolean
        description:
          type: string
          nullable: true
        alergies:
          type: string
          nullable: true
        preparationTime:
          type: integer
        tags:
          type: array
          nullable: true
          items:
            type: string
        taxId:
          type: string
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        deletedAt:
          type: string
          format: date-time
          nullable: true
        modifierGroupItem:
          type: object
          properties:
            itemId:
              type: string
              format: uuid
            modifierGroupId:
              type: string
              format: uuid
            createdAt:
              type: string
              format: date-time
            updatedAt:
              type: string
              format: date-time
        quantityConstraints:
          type: array
          items:
            $ref: '#/components/schemas/quantityConstraintsResponse'
        prices:
          type: array
          items:
            $ref: '#/components/schemas/fullPriceResponse'
        itemSortingOrder:
          type: array
          items:
            $ref: '#/components/schemas/itemSortingOrderResponse'
    modifierItemUpdateBody:
      type: object
      x-examples:
        Example 1:
          name: Mediano Actualizado
          description: Tamaño mediano de 12 oz actualizado
          value: 12.5
          taxId: tax-id-123
          quantityConstraint:
            min: 0
            max: 2
            chargeAbove: 1
      properties:
        name:
          type: string
        description:
          type: string
        value:
          type: number
        taxId:
          type: string
          format: uuid
        quantityConstraint:
          type: object
          properties:
            min:
              type: integer
            max:
              type: integer
            chargeAbove:
              type: integer
        price:
          type: object
          properties:
            amount:
              type: number
              format: float
            info:
              type: string
            channelId:
              type: string
              format: uuid
    modifierItemsUpdateResponse:
      type: object
      x-examples:
        Example 1:
          id: bd3d1f6b-a34b-484d-b614-81bf6e706309
          chainId: 9e4e812d-849a-40ef-9a7e-5346e3370ffb
          sizeGroupId: null
          name: Modificador de prueba actualizado
          image: 'https://storage.googleapis.com/polopay-restaurant-assets/Oa7zZckYTw_Y1yX9tLPBh_08801f01-c075-4cee-8211-9e4ed8494c55.webp.webp'
          featured: false
          description: Descripción actualizada del modificador
          alergies: null
          preparationTime: 60
          tags: null
          taxId: tax-123
          createdAt: '2025-02-18T02:57:36.000Z'
          updatedAt: '2025-07-21T23:41:34.000Z'
          deletedAt: null
          modifierGroups:
            - id: e8c27b7e-fa8a-47c4-ae49-cd1b46e7de45
              chainId: 9e4e812d-849a-40ef-9a7e-5346e3370ffb
              name: Cacao
              description: null
              defaultItemId: 7dcdee98-0f5e-40cc-bf67-93033fcd9527
              createdAt: '2025-02-18T22:29:44.000Z'
              updatedAt: '2025-07-01T18:29:41.000Z'
              deletedAt: null
              itemModifierGroup:
                itemId: bd3d1f6b-a34b-484d-b614-81bf6e706309
                modifierGroupId: e8c27b7e-fa8a-47c4-ae49-cd1b46e7de45
                createdAt: '2025-02-18T22:30:52.000Z'
                updatedAt: '2025-02-18T22:30:52.000Z'
          quantityConstraints:
            - id: fb2727ff-3c21-45ce-829a-5258de313750
              entityId: bd3d1f6b-a34b-484d-b614-81bf6e706309
              entityType: item
              min: 0
              max: 23
              chargeAbove: 1
              createdAt: '2025-07-21T23:56:34.000Z'
              updatedAt: '2025-08-04T22:33:40.000Z'
              deletedAt: null
          prices:
            id: b94fd76c-92bc-412f-b2ce-d5311416b58f
            ownerId: 9e4e812d-849a-40ef-9a7e-5346e3370ffb
            ownerType: chain
            entityType: item
            entityId: bd3d1f6b-a34b-484d-b614-81bf6e706309
            amount: 250
            channelId: null
            contextId: e8c27b7e-fa8a-47c4-ae49-cd1b46e7de45
            contextType: modifier_group
            updatedAt: '2025-08-04T22:38:50.769Z'
            createdAt: '2025-08-04T22:38:50.769Z'
      properties:
        id:
          type: string
          format: uuid
        chainId:
          type: string
          format: uuid
        sizeGroupId:
          type: string
          format: uuid
          nullable: true
        name:
          type: string
        image:
          type: string
          format: uri
        featured:
          type: boolean
        description:
          type: string
        alergies:
          type: string
          nullable: true
        preparationTime:
          type: integer
        tags:
          type: array
          nullable: true
          items:
            type: string
        taxId:
          type: string
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        deletedAt:
          type: string
          format: date-time
          nullable: true
        quantityConstraints:
          type: array
          items:
            $ref: '#/components/schemas/quantityConstraintsResponse'
        prices:
          $ref: '#/components/schemas/fullPriceResponse'
    orderCreateBody:
      type: object
      description: |
        Request body for creating or updating an order. If `id` is provided and an order with that ID exists, the endpoint updates that order. The order payload is treated as the desired full state: omitted order items from a later request can be removed from the order.
      x-examples:
        Example 1:
          id: a2fafa98-04fa-473b-8589-d6868a3588cf
          masterOrderId: null
          type: table_service
          terminalId: 68dcce76-d3af-4f06-957a-b95a5fde40a6
          virtualLocationId: null
          externalOrderReference: null
          notes: Customer prefers fast service
          estimatedPickupAt: null
          pickedUpAt: '2025-07-18T23:30:00.000Z'
          metadata: {}
          orderItems:
            - id: 1c252a45-b758-4bf7-a35d-787bdea51160
              itemId: abd5a3ab-54f5-4d5d-867e-74d513428ea2
              menuId: 006e30a4-3530-4b0e-9ec6-36f510c2a97c
              size: null
              sizeId: null
              note: null
              quantity: 1
              priceId: dc00261d-1a84-426f-8a83-613f16f558a2
              sizePriceId: null
              sizePrice: null
              seat: null
              masterOrderItemId: null
              terminalDate: '2025-08-04T18:59:00.360-06:00'
              orderItemModifiers: []
              taxId: 35aa74b6-bc39-4bd0-a9ec-6c5f301d0bdd
              discount: null
              status: completed
              canceledAt: null
              canceledBy: null
              returnedAt: null
              returnedBy: null
              completedAt: '2025-08-04T18:59:09.047-06:00'
            - id: e6fe68a6-ac9b-498f-b979-4ca50756527d
              itemId: a04f350a-2e67-4f09-afd6-61dda2524f90
              menuId: 8f06415b-bd9a-4244-955e-d69afebb4a4a
              size: null
              sizeId: null
              note: null
              quantity: 1
              priceId: 417cb992-89ba-4479-9298-3d2e5cabdb90
              sizePriceId: null
              sizePrice: null
              seat: null
              masterOrderItemId: null
              terminalDate: '2025-08-04T18:59:07.836-06:00'
              orderItemModifiers: []
              taxId: 35aa74b6-bc39-4bd0-a9ec-6c5f301d0bdd
              discount: null
              status: completed
              canceledAt: null
              canceledBy: null
              returnedAt: null
              returnedBy: null
              completedAt: '2025-08-04T18:59:09.048-06:00'
          customerCount: 1
          customerName: Eri
          refunds: []
          status: completed
          voidedAt: null
          voidedBy: null
          voidReason: null
          vip: false
          seat: null
          startedAt: '2025-08-04T18:58:51.533-06:00'
          finishedAt: null
          discounts: []
          payments:
            - id: 01a3e48e-799c-4655-bbb3-2f73fc1bad6b
              terminalId: 68dcce76-d3af-4f06-957a-b95a5fde40a6
              paymentTerminalCardType: null
              paymentTerminalMetadata: null
              paymentTerminalCardTypeId: null
              paymentTerminalMetadatumId: null
              paymentAuthCode: null
              totalAmount: 65
              paymentMethod: cash
              tipAmount: 10.5
              changeAmount: 435
              status: completed
              terminalDate: '2025-08-04T19:17:57.524-06:00'
              employeeId: e11d2bc3-0e9f-445e-ba9b-2163ab334652
              refunds: []
              paymentBankTransfer: null
          employees:
            - id: e11d2bc3-0e9f-445e-ba9b-2163ab334652
              employeeOrder:
                creator: true
          tableId: facf6141-ef1c-498e-b43a-0b9f13453dd0
      properties:
        id:
          type: string
          format: uuid
          description: Client-provided order ID. Reuse the same ID to update an existing order.
        masterOrderId:
          type: string
          format: uuid
          nullable: true
          description: Parent/master order ID when this order belongs to a larger order flow.
        type:
          type: string
          required: true
          enum:
            - direct_sale
            - delivery
            - takeout
            - table_service
          description: Order service type.
        virtualLocationId:
          type: string
          format: uuid
          nullable: true
          description: Virtual location associated with the order, when applicable.
        externalOrderReference:
          type: string
          nullable: true
          description: External system reference for reconciliation.
        notes:
          type: string
          nullable: true
          description: Free-form order notes.
        estimatedPickupAt:
          type: string
          format: date-time
          nullable: true
          description: Estimated pickup time for takeout or delivery orders.
        pickedUpAt:
          type: string
          format: date-time
          nullable: true
          description: Actual pickup time, if the order has been picked up.
        metadata:
          type: object
          description: Integration-specific metadata stored with the order.
        orderItems:
          type: array
          description: Full list of order items that should exist on the order after the upsert.
          items:
            type: object
            properties:
              id:
                type: string
                format: uuid
              itemId:
                type: string
                format: uuid
              menuId:
                type: string
                format: uuid
              size:
                nullable: true
              sizeId:
                type: string
                nullable: true
              note:
                type: object
                nullable: true
                properties:
                  id:
                    type: string
                    format: uuid
                    nullable: true
                  employeeId:
                    type: string
                    format: uuid
                    nullable: true
                  content:
                    type: string
                    description: 'Note content'
                  price:
                    type: number
                    format: float
                    nullable: true
              quantity:
                type: integer
              priceId:
                type: string
                format: uuid
              sizePriceId:
                type: string
                format: uuid
                nullable: true
              sizePrice:
                type: number
                format: float
                nullable: true
              seat:
                type: integer
                nullable: true
              masterOrderItemId:
                type: string
                format: uuid
                nullable: true
              terminalDate:
                type: string
                format: date-time
                description: Client terminal timestamp when the item was created or updated.
              orderItemModifiers:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                      format: uuid
                    item:
                      type: object
                      properties:
                        id:
                          type: string
                          format: uuid
                        name:
                          type: string
                        description:
                          type: string
                          nullable: true
                        prices:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: string
                                format: uuid
                              entityId:
                                type: string
                                format: uuid
                                nullable: true
                              entityType:
                                type: string
                                nullable: true
                              amount:
                                type: number
                                format: float
                        itemSortingOrder:
                          type: array
                          items:
                            type: object
                            properties:
                              lexorank:
                                type: string
                                nullable: true
                              entityType:
                                type: string
                                nullable: true
                              ownerType:
                                type: string
                                nullable: true
                        image:
                          type: string
                          nullable: true
                        taxId:
                          type: string
                          format: uuid
                        preparationTime:
                          type: integer
                          nullable: true
                        quantityConstraints:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: string
                                format: uuid
                              entityId:
                                type: string
                                format: uuid
                              entityType:
                                type: string
                              min:
                                type: integer
                              max:
                                type: integer
                              chargeAbove:
                                type: integer
                              contextId:
                                type: string
                                format: uuid
                                nullable: true
                        sizeGroup:
                          nullable: true
                    itemId:
                      type: string
                      format: uuid
                    price:
                      type: object
                      properties:
                        id:
                          type: string
                          format: uuid
                        entityId:
                          type: string
                          format: uuid
                          nullable: true
                        entityType:
                          type: string
                          nullable: true
                        amount:
                          type: number
                          format: float
                    priceId:
                      type: string
                      format: uuid
                    taxId:
                      type: string
                      format: uuid
                    quantity:
                      type: integer
                    sizeId:
                      type: string
                      format: uuid
                      nullable: true
                    sizePrice:
                      type: number
                      format: float
                      nullable: true
                    sizePriceId:
                      type: string
                      format: uuid
                      nullable: true
                    modifierGroup:
                      type: object
                      properties:
                        id:
                          type: string
                          format: uuid
                        name:
                          type: string
                        defaultItemId:
                          type: string
                          format: uuid
                          nullable: true
                        modifierItems:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: string
                                format: uuid
                              name:
                                type: string
                              description:
                                type: string
                                nullable: true
                              prices:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    id:
                                      type: string
                                      format: uuid
                                    entityId:
                                      type: string
                                      format: uuid
                                    entityType:
                                      type: string
                                    amount:
                                      type: number
                                      format: float
                              itemSortingOrder:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    lexorank:
                                      type: string
                                      nullable: true
                                    entityType:
                                      type: string
                                      nullable: true
                                    ownerType:
                                      type: string
                                      nullable: true
                              image:
                                type: string
                                nullable: true
                              taxId:
                                type: string
                                format: uuid
                              preparationTime:
                                type: integer
                                nullable: true
                              quantityConstraints:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    id:
                                      type: string
                                      format: uuid
                                    entityId:
                                      type: string
                                      format: uuid
                                    entityType:
                                      type: string
                                    min:
                                      type: integer
                                    max:
                                      type: integer
                                    chargeAbove:
                                      type: integer
                                    contextId:
                                      type: string
                                      format: uuid
                              sizeGroup:
                                nullable: true
                        parentItems:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: string
                                format: uuid
                              name:
                                type: string
                                nullable: true
                              description:
                                type: string
                                nullable: true
                              prices:
                                nullable: true
                              itemSortingOrder:
                                nullable: true
                              image:
                                type: string
                                nullable: true
                              taxId:
                                type: string
                                format: uuid
                                nullable: true
                              preparationTime:
                                type: integer
                                nullable: true
                              quantityConstraints:
                                nullable: true
                              sizeGroup:
                                nullable: true
                        menus:
                          type: array
                        quantityConstraint:
                          type: object
                          properties:
                            id:
                              type: string
                              format: uuid
                            entityId:
                              type: string
                              format: uuid
                            entityType:
                              type: string
                            min:
                              type: integer
                            max:
                              type: integer
                            chargeAbove:
                              type: integer
                            contextId:
                              type: string
                              format: uuid
                              nullable: true
                        modifierGroupSortingOrder:
                          type: object
                          properties:
                            lexorank:
                              type: string
                              nullable: true
                            entityType:
                              type: string
                              nullable: true
                            ownerType:
                              type: string
                              nullable: true
                    modifierGroupId:
                      type: string
                      format: uuid
                    orderItemId:
                      type: string
                      format: uuid
                    orderItemModifierId:
                      type: string
                      format: uuid
                      nullable: true
              taxId:
                type: string
                format: uuid
              discount:
                type: object
                nullable: true
                properties:
                  id:
                    type: string
                    format: uuid
                  amount:
                    type: number
                    format: float
                  description:
                    type: string
                  type:
                    type: string
                    enum:
                      - fixed
                      - percentage
                  promotionId:
                    type: string
                    format: uuid
              status:
                type: string
                enum:
                  - kitchen
                  - in_process
                  - rush
                  - canceled
                  - completed
                  - retaken
                  - payment_required
                  - returned
                  - in_cart
              canceledAt:
                type: string
                format: date-time
                nullable: true
              canceledBy:
                type: string
                format: uuid
                nullable: true
              returnedAt:
                type: string
                format: date-time
                nullable: true
              returnedBy:
                type: string
                format: uuid
                nullable: true
              completedAt:
                type: string
                format: date-time
                nullable: true
        customerCount:
          type: integer
          description: Number of guests on the order.
        customerName:
          type: string
          description: Customer display name, when available.
        refunds:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                format: uuid
                description: 'Optional. If not provided, a new UUID will be generated automatically'
              employeeId:
                type: string
                format: uuid
                description: 'ID of the employee processing the refund'
              description:
                type: string
                description: 'Description of the refund reason'
              amount:
                type: number
                format: float
                description: 'Refund amount'
        status:
          type: string
          enum:
            - completed
            - void
            - draft
            - needs_approval
            - in_progress
            - waiting_for_pickup
          description: Current order status.
        voidedAt:
          type: string
          format: date-time
          nullable: true
        voidedBy:
          type: string
          format: uuid
          nullable: true
        voidReason:
          type: string
          nullable: true
        vip:
          type: boolean
        seat:
          type: integer
          nullable: true
        startedAt:
          type: string
          format: date-time
          description: Date and time when the order started.
        finishedAt:
          type: string
          format: date-time
          nullable: true
          description: Date and time when the order finished, if finished.
        discounts:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                format: uuid
              orderId:
                type: string
                format: uuid
              terminalId:
                type: string
                format: uuid
              promotionId:
                type: string
                format: uuid
                nullable: true
              description:
                type: string
                nullable: true
              type:
                type: string
                enum:
                  - percentage
                  - fixed
              amount:
                type: number
                format: float
              orderItemId:
                type: string
                format: uuid
                nullable: true
              employeeId:
                type: string
                format: uuid
              terminalDate:
                type: string
                format: date-time
              createdAt:
                type: string
                format: date-time
              updatedAt:
                type: string
                format: date-time
              deletedAt:
                type: string
                format: date-time
                nullable: true
              promotion:
                nullable: true
        payments:
          type: array
          description: Payments associated with the order.
          items:
            type: object
            properties:
              id:
                type: string
                format: uuid
              paymentTerminalCardType:
                type: object
                nullable: true
                properties:
                  type:
                    type: string
                    description: 'Card type (e.g., debit, credit)'
                  id:
                    type: string
                    format: uuid
                  paymentTerminalFee:
                    type: number
                    format: float
                    nullable: true
              paymentTerminalMetadata:
                type: object
                nullable: true
                properties:
                  id:
                    type: string
                    format: uuid
                  terminalId:
                    type: string
                    format: uuid
                  provider:
                    type: string
                    description: 'Payment terminal provider'
                  requireAuthCode:
                    type: boolean
                    nullable: true
                  paymentTerminalCardTypes:
                    nullable: true
              paymentTerminalCardTypeId:
                type: string
                format: uuid
                nullable: true
              paymentTerminalMetadatumId:
                type: string
                format: uuid
                nullable: true
              paymentAuthCode:
                type: string
                nullable: true
              totalAmount:
                type: number
                format: float
              paymentMethod:
                type: string
                enum:
                  - cash
                  - card
                  - courtesy
                  - gift_card
                  - loyalty
                  - bank_transfer
                  - delivery_platform
                  - app
                  - other
              tipAmount:
                type: number
                format: float
                nullable: true
              changeAmount:
                type: number
                format: float
              status:
                type: string
                enum:
                  - initiated
                  - in_progress
                  - completed
                  - failed
                  - refunded
                  - internal_error
              terminalDate:
                type: string
                format: date-time
              employeeId:
                type: string
                format: uuid
              refunds:
                type: array
                items:
                  type: object
              paymentBankTransfer:
                nullable: true
        employees:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                format: uuid
              employeeOrder:
                type: object
                properties:
                  creator:
                    type: boolean
        tableId:
          type: string
          format: uuid
    sizeGroupGetAllResponse:
      type: object
      x-examples:
        Example 1:
          id: 69b8b96c-7172-4803-afc2-34359ab5ca31
          chainId: 9e4e812d-849a-40ef-9a7e-5346e3370ffb
          name: Aldo's AmericanoSssss
          defaultSizeId: d1f474e8-96ba-463b-ac77-09369e624445
          createdAt: '2025-05-28T15:32:42.000Z'
          updatedAt: '2025-06-30T22:58:07.000Z'
          deletedAt: null
          sizes:
            - id: 41b4d9d3-0c56-4ebf-b898-3b2c57320b40
              sizeGroupId: 69b8b96c-7172-4803-afc2-34359ab5ca31
              name: XLzz
              createdAt: '2025-06-30T17:46:20.000Z'
              updatedAt: '2025-06-30T20:55:22.000Z'
              deletedAt: null
              prices: []
              sizeSortingOrder: null
            - id: 83c712a4-1711-474a-87a0-3632abc8c97c
              sizeGroupId: 69b8b96c-7172-4803-afc2-34359ab5ca31
              name: zl
              createdAt: '2025-06-30T22:58:34.000Z'
              updatedAt: '2025-06-30T22:58:34.000Z'
              deletedAt: null
              prices:
                - id: 2e2ab5cc-af33-4396-8597-8e4284c71992
                  ownerId: 9e4e812d-849a-40ef-9a7e-5346e3370ffb
                  ownerType: chain
                  entityId: 83c712a4-1711-474a-87a0-3632abc8c97c
                  entityType: size
                  channelId: null
                  contextType: null
                  contextId: null
                  amount: 22
                  currency: MXN
                  info: null
                  createdAt: '2025-06-30T22:58:34.000Z'
                  updatedAt: '2025-06-30T22:58:34.000Z'
                  deletedAt: null
              sizeSortingOrder: null
            - id: d1f474e8-96ba-463b-ac77-09369e624445
              sizeGroupId: 69b8b96c-7172-4803-afc2-34359ab5ca31
              name: prueba
              createdAt: '2025-06-30T22:58:04.000Z'
              updatedAt: '2025-06-30T22:58:04.000Z'
              deletedAt: null
              prices:
                - id: 853ad06a-c879-4b97-a48a-70c4cbe92614
                  ownerId: 9e4e812d-849a-40ef-9a7e-5346e3370ffb
                  ownerType: chain
                  entityId: d1f474e8-96ba-463b-ac77-09369e624445
                  entityType: size
                  channelId: null
                  contextType: null
                  contextId: null
                  amount: 22
                  currency: MXN
                  info: null
                  createdAt: '2025-06-30T22:58:04.000Z'
                  updatedAt: '2025-06-30T22:58:04.000Z'
                  deletedAt: null
              sizeSortingOrder: null
          items:
            - id: 2cee9d1c-5c96-4bdf-8a7c-af5401742141
              chainId: 9e4e812d-849a-40ef-9a7e-5346e3370ffb
              sizeGroupId: 69b8b96c-7172-4803-afc2-34359ab5ca31
              name: '1'
              image: null
              featured: false
              description: null
              alergies: null
              preparationTime: 240
              tags: null
              taxId: 794b43f1-560d-11ef-adab-4201ac1a5137
              createdAt: '2025-02-20T19:16:23.000Z'
              updatedAt: '2025-06-30T22:56:19.000Z'
              deletedAt: null
              prices:
                - id: ce1891eb-f99c-4230-9e9f-b65297e0fcff
                  ownerId: 9e4e812d-849a-40ef-9a7e-5346e3370ffb
                  ownerType: chain
                  entityId: 2cee9d1c-5c96-4bdf-8a7c-af5401742141
                  entityType: item
                  channelId: null
                  contextType: null
                  contextId: null
                  amount: 0
                  currency: null
                  info: null
                  createdAt: '2025-02-20T19:16:23.000Z'
                  updatedAt: '2025-02-20T19:16:23.000Z'
                  deletedAt: null
              itemSortingOrder:
                - id: daf19c27-3273-4cb7-9038-419b943f6f78
                  entityId: 2cee9d1c-5c96-4bdf-8a7c-af5401742141
                  entityType: item
                  ownerId: b1f65fe8-2322-4163-b971-1c2c0d514442
                  ownerType: modifierGroup
                  lexorank: '0|i00007:'
                  createdAt: '2025-02-20T19:16:24.000Z'
                  updatedAt: '2025-02-20T19:16:24.000Z'
            - id: e54a32ff-023f-455b-884e-8f61a47b3a0d
              chainId: 9e4e812d-849a-40ef-9a7e-5346e3370ffb
              sizeGroupId: 69b8b96c-7172-4803-afc2-34359ab5ca31
              name: '2'
              image: null
              featured: false
              description: null
              alergies: null
              preparationTime: 120
              tags: null
              taxId: 794b43f1-560d-11ef-adab-4201ac1a5137
              createdAt: '2025-02-20T19:16:24.000Z'
              updatedAt: '2025-06-30T22:56:26.000Z'
              deletedAt: null
              prices:
                - id: 636f1ab1-c549-4871-b74a-a66684823c23
                  ownerId: 9e4e812d-849a-40ef-9a7e-5346e3370ffb
                  ownerType: chain
                  entityId: e54a32ff-023f-455b-884e-8f61a47b3a0d
                  entityType: item
                  channelId: null
                  contextType: null
                  contextId: null
                  amount: 0
                  currency: null
                  info: null
                  createdAt: '2025-02-20T19:16:24.000Z'
                  updatedAt: '2025-02-20T19:16:24.000Z'
                  deletedAt: null
              itemSortingOrder:
                - id: b9933bfe-4170-44ed-886a-5f5f664392a8
                  entityId: e54a32ff-023f-455b-884e-8f61a47b3a0d
                  entityType: item
                  ownerId: b1f65fe8-2322-4163-b971-1c2c0d514442
                  ownerType: modifierGroup
                  lexorank: '0|i0000f:'
                  createdAt: '2025-02-20T19:16:24.000Z'
                  updatedAt: '2025-02-20T19:16:24.000Z'
      properties:
        id:
          type: string
          format: uuid
        chainId:
          type: string
          format: uuid
        name:
          type: string
        defaultSizeId:
          type: string
          format: uuid
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        deletedAt:
          type: string
          format: date-time
          nullable: true
        sizes:
          type: array
          items:
            $ref: '#/components/schemas/sizeWithPricesResponse'
        items:
          type: array
          description: It shows if we use expand
          items:
            type: object
            properties:
              id:
                type: string
                format: uuid
              chainId:
                type: string
                format: uuid
              sizeGroupId:
                type: string
                format: uuid
              name:
                type: string
              image:
                type: string
                format: uri
                nullable: true
              featured:
                type: boolean
              description:
                nullable: true
              alergies:
                nullable: true
              preparationTime:
                type: integer
              tags:
                nullable: true
              taxId:
                type: string
                format: uuid
              createdAt:
                type: string
                format: date-time
              updatedAt:
                type: string
                format: date-time
              deletedAt:
                type: string
                format: date-time
                nullable: true
              prices:
                type: array
                items:
                  $ref: '#/components/schemas/fullPriceResponse'
              itemSortingOrder:
                type: array
                items:
                  $ref: '#/components/schemas/itemSortingOrderResponse'
    sizeGroupCreateBody:
      type: object
      x-examples:
        Example 1:
          name: Regular Sizes
          sizes:
            - name: Small
              amount: 1000
              isDefault: true
            - name: Medium
              amount: 1500
              isDefault: false
            - name: Large
              amount: 2000
              isDefault: false
      required:
        - name
      properties:
        name:
          type: string
        sizes:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
              amount:
                type: number
                format: float
              isDefault:
                type: boolean
    sizeGroupCreateResponse:
      type: object
      x-examples:
        Example 1:
          id: a1ace5f8-ca6d-415b-9793-48be73836bfd
          chainId: 9e4e812d-849a-40ef-9a7e-5346e3370ffb
          name: Regular Sizes
          updatedAt: '2025-08-05T23:57:56.979Z'
          createdAt: '2025-08-05T23:57:56.234Z'
          defaultSizeId: 652080b1-34e8-422c-a4c9-e383e205ad64
      properties:
        id:
          type: string
          format: uuid
        chainId:
          type: string
          format: uuid
        name:
          type: string
        updatedAt:
          type: string
          format: date-time
        createdAt:
          type: string
          format: date-time
        defaultSizeId:
          type: string
          format: uuid
    sizeGroupUpdateBody:
      type: object
      x-examples:
        Example 1:
          name: Updated Size Group Name
          defaultSizeId: existing-size-id-123
          sizes:
            - id: existing-size-id-123
              name: Updated Small
              amount: 1200
              isDefault: true
            - id: existing-size-id-456
              name: Updated Medium
              amount: 1800
              isDefault: false
            - name: New Large
              amount: 2500
              isDefault: false
      properties:
        name:
          type: string
        defaultSizeId:
          type: string
        sizes:
          type: array
          description: Sizes that are not shipped but exist will be deleted.
          items:
            type: object
            properties:
              id:
                type: string
                format: uuid
                description: if null the size will be created
                nullable: true
              name:
                type: string
              amount:
                type: number
                format: float
              isDefault:
                type: boolean
    sizeGroupUpdateResponse:
      type: object
      x-examples:
        Example 1:
          id: a1ace5f8-ca6d-415b-9793-48be73836bfd
          chainId: 9e4e812d-849a-40ef-9a7e-5346e3370ffb
          name: Updated Size Group Name
          defaultSizeId: existing-size-id-123
          createdAt: '2025-08-05T23:57:56.000Z'
          updatedAt: '2025-08-06T00:21:45.000Z'
          deletedAt: null
          sizes:
            - id: 8a1b7f70-a8e1-4377-ae2a-54e6c5272086
              sizeGroupId: a1ace5f8-ca6d-415b-9793-48be73836bfd
              name: New Large
              createdAt: '2025-08-06T00:21:46.000Z'
              updatedAt: '2025-08-06T00:21:46.000Z'
              deletedAt: null
              prices:
                - id: 57972927-ae18-4247-8911-82a945d21086
                  ownerId: 9e4e812d-849a-40ef-9a7e-5346e3370ffb
                  ownerType: chain
                  entityId: 8a1b7f70-a8e1-4377-ae2a-54e6c5272086
                  entityType: size
                  channelId: null
                  contextType: null
                  contextId: null
                  amount: 2500
                  currency: MXN
                  info: null
                  createdAt: '2025-08-06T00:21:46.000Z'
                  updatedAt: '2025-08-06T00:21:46.000Z'
                  deletedAt: null
              sizeSortingOrder: null
      properties:
        id:
          type: string
          format: uuid
        chainId:
          type: string
          format: uuid
        name:
          type: string
        defaultSizeId:
          type: string
          format: uuid
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        deletedAt:
          type: string
          format: date-time
          nullable: true
        sizes:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                format: uuid
              sizeGroupId:
                type: string
                format: uuid
              name:
                type: string
              createdAt:
                type: string
                format: date-time
              updatedAt:
                type: string
                format: date-time
              deletedAt:
                type: string
                format: date-time
                nullable: true
              prices:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                      format: uuid
                    ownerId:
                      type: string
                      format: uuid
                    ownerType:
                      type: string
                    entityId:
                      type: string
                      format: uuid
                    entityType:
                      type: string
                    channelId:
                      type: string
                    contextType:
                      nullable: true
                    contextId:
                      type: string
                    amount:
                      type: number
                      format: float
                    currency:
                      type: string
                    info:
                      type: string
                      nullable: true
                    createdAt:
                      type: string
                      format: date-time
                    updatedAt:
                      type: string
                      format: date-time
                    deletedAt:
                      type: string
                      format: date-time
                      nullable: true
              sizeSortingOrder:
                nullable: true
    virtualLocationUpdateBody:
      type: object
      properties:
        name:
          type: string
        logo:
          type: string
        neighborhood:
          type: string
        address:
          type: string
        address_secondary:
          type: string
        city:
          type: string
        state:
          type: string
        country:
          type: string
        county:
          type: string
        zipcode:
          type: string
        timezone:
          type: string
        currency:
          type: string
        ordersEnabled:
          type: boolean
        autoAcceptOrdersOnClientAck:
          type: boolean
        preparationTime:
          type: integer
        ordersInjectorStatus:
          type: string
        openHoursSettings:
          type: object
          properties:
            supportsMenuGroups:
              type: boolean
            supportsMenuGroupsForChannelId:
              type: string
            minimumRangeSeconds:
              type: integer
      x-examples:
        Example 1:
          name: Downtown Location
          logo: 'https://example.com/logo.png'
          neighborhood: Financial District
          address: 123 Main Street
          address_secondary: Suite 500
          city: San Francisco
          state: CA
          country: USA
          county: San Francisco County
          zipcode: '94105'
          timezone: America/Los_Angeles
          currency: USD
          ordersEnabled: true
          autoAcceptOrdersOnClientAck: false
          preparationTime: 20
          ordersInjectorStatus: active
          openHoursSettings:
            supportsMenuGroups: true
            supportsMenuGroupsForChannelId: channel-id-123
            minimumRangeSeconds: 1800
    virtualLocationUpdateResponse:
      type: object
      x-examples:
        Example 1:
          id: c88e9234-287e-4928-b9b0-9e755f4881b3
          groupId: af21a1fe-fb04-4140-9eb7-b988f10a2918
          chainId: 9e4e812d-849a-40ef-9a7e-5346e3370ffb
          restaurantId: d18dcccd-0dfc-4750-a240-43820e35bd69
          name: Prueba api publica vale
          logo: 'https://example.com/logo.png'
          neighborhood: Centro
          address: Av. Principal 123
          address_secondary: Piso 2
          city: Ciudad de México
          state: CDMX
          country: México
          county: Cuauhtémoc
          zipcode: '06000'
          timezone: America/Mexico_City
          currency: MXN
          ordersEnabled: true
          autoAcceptOrdersOnClientAck: false
          preparationTime: 30
          ordersInjectorStatus: connected
          managedByApp: true
          createdAt: '2025-07-26T00:38:04.000Z'
          updatedAt: '2025-07-26T00:38:04.000Z'
          deletedAt: null
      properties:
        id:
          type: string
          format: uuid
        groupId:
          type: string
          format: uuid
        chainId:
          type: string
          format: uuid
        restaurantId:
          type: string
          format: uuid
        name:
          type: string
        logo:
          type: string
        neighborhood:
          type: string
        address:
          type: string
        address_secondary:
          type: string
        city:
          type: string
        state:
          type: string
        country:
          type: string
        county:
          type: string
        zipcode:
          type: string
        timezone:
          type: string
        currency:
          type: string
        ordersEnabled:
          type: boolean
        autoAcceptOrdersOnClientAck:
          type: boolean
        preparationTime:
          type: integer
        ordersInjectorStatus:
          type: string
        managedByApp:
          type: boolean
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        deletedAt:
          type: string
          format: date-time
          nullable: true
    virtualLocationAppUpdateResponse:
      type: object
      x-examples:
        Example 1:
          virtualLocationId: c88e9234-287e-4928-b9b0-9e755f4881b3
          appId: acda48c0-80d3-4d78-b8e4-f644ae9bb2d6
          ordersEnabled: true
          autoAcceptOrdersOnClientAck: false
          preparationTime: 30
          ordersInjectorStatus: connected
          createdAt: '2025-07-26T00:38:05.000Z'
          updatedAt: '2025-07-26T00:38:05.000Z'
      properties:
        virtualLocationId:
          type: string
          format: uuid
        appId:
          type: string
          format: uuid
        ordersEnabled:
          type: boolean
        autoAcceptOrdersOnClientAck:
          type: boolean
        preparationTime:
          type: integer
        ordersInjectorStatus:
          type: string
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    virtualLocationAppUpdateBody:
      type: object
      properties:
        ordersEnabled:
          type: boolean
        autoAcceptOrdersOnClientAck:
          type: boolean
        preparationTime:
          type: integer
        ordersInjectorStatus:
          type: string
      x-examples:
        Example 1:
          ordersEnabled: true
          autoAcceptOrdersOnClientAck: false
          preparationTime: 25
          ordersInjectorStatus: active
    virtualLocationCreateBody:
      type: object
      description: Request body for creating a virtual location, including address, locale, order settings, and app-specific order behavior.
      properties:
        name:
          type: string
          description: Virtual location display name.
        logo:
          type: string
          description: Logo image URL.
        neighborhood:
          type: string
          description: Neighborhood or local area.
        address:
          type: string
          description: Primary street address.
        address_secondary:
          type: string
          description: Secondary address details such as suite, floor, or unit.
        city:
          type: string
          description: City.
        state:
          type: string
          description: State or province.
        country:
          type: string
          description: Country.
        county:
          type: string
          description: County or municipality.
        zipcode:
          type: string
          description: Postal or ZIP code.
        timezone:
          type: string
          description: IANA timezone for the virtual location, for example `America/Mexico_City`.
        currency:
          type: string
          description: Currency code used for prices, for example `MXN` or `USD`.
        openHoursSettings:
          type: object
          description: Open-hours behavior for the virtual location.
          properties:
            supportsMenuGroups:
              type: boolean
              description: Whether menu groups are supported in open-hours scheduling.
            minimumRangeSeconds:
              type: integer
              description: Minimum schedule range length in seconds.
        virtualLocationApp:
          type: object
          description: App-specific settings for this virtual location.
          properties:
            ordersEnabled:
              type: boolean
              description: Whether this app can receive orders for the virtual location.
            autoAcceptOrdersOnClientAck:
              type: boolean
              description: Whether this app automatically accepts orders after client acknowledgement.
            preparationTime:
              type: integer
              description: App-specific preparation time in minutes.
      x-examples:
        Example 1:
          name: Prueba api publica vale
          logo: 'https://example.com/logo.png'
          neighborhood: Centro
          address: Av. Principal 123
          address_secondary: Piso 2
          city: Ciudad de México
          state: CDMX
          country: México
          county: Cuauhtémoc
          zipcode: '06000'
          timezone: America/Mexico_City
          currency: MXN
          ordersEnabled: true
          autoAcceptOrdersOnClientAck: false
          preparationTime: 30
          openHoursSettings:
            supportsMenuGroups: true
            minimumRangeSeconds: 3600
          virtualLocationApp:
            ordersEnabled: true
            autoAcceptOrdersOnClientAck: false
            preparationTime: 30
    virtualLocation:
      type: object
      x-examples:
        Example 1:
          id: 7e35e56f-3245-490f-a7f0-0d5f34630e15
          groupId: af21a1fe-fb04-4140-9eb7-b988f10a2918
          chainId: 9e4e812d-849a-40ef-9a7e-5346e3370ffb
          restaurantId: d18dcccd-0dfc-4750-a240-43820e35bd69
          name: Prueba api publica vale
          logo: 'https://example.com/logo.png'
          neighborhood: Centro
          address: Av. Principal 123
          address_secondary: Piso 2
          city: Ciudad de México
          state: CDMX
          country: México
          county: Cuauhtémoc
          zipcode: '06000'
          timezone: America/Mexico_City
          currency: MXN
          ordersEnabled: true
          autoAcceptOrdersOnClientAck: false
          preparationTime: 30
          ordersInjectorStatus: connected
          managedByApp: true
          updatedAt: '2025-08-06T02:12:41.033Z'
          createdAt: '2025-08-06T02:12:41.033Z'
      properties:
        id:
          type: string
          format: uuid
        groupId:
          type: string
          format: uuid
        chainId:
          type: string
          format: uuid
        restaurantId:
          type: string
          format: uuid
        name:
          type: string
        logo:
          type: string
        neighborhood:
          type: string
        address:
          type: string
        address_secondary:
          type: string
        city:
          type: string
        state:
          type: string
        country:
          type: string
        county:
          type: string
        zipcode:
          type: string
        timezone:
          type: string
        currency:
          type: string
        ordersEnabled:
          type: boolean
        autoAcceptOrdersOnClientAck:
          type: boolean
        preparationTime:
          type: integer
        ordersInjectorStatus:
          type: string
        managedByApp:
          type: boolean
        apps:
          type: array
          description: Apps associated with the virtual location when the endpoint includes app data.
          items:
            type: object
        updatedAt:
          type: string
          format: date-time
        createdAt:
          type: string
          format: date-time
        deletedAt:
          type: string
          format: date-time
          nullable: true
    SizeWebhookPayload:
      title: SizeWebhookPayload
      x-group-name: Webhooks
      type: object
      description: |
        Structure for size webhook event payloads
      required:
        - id
        - restaurantId
        - appId
        - type
        - timestamp
        - data
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for this webhook event
        restaurantId:
          type: string
          format: uuid
          description: ID of the restaurant where the event occurred
        appId:
          type: string
          format: uuid
          description: ID of the app receiving this webhook
        type:
          $ref: '#/components/schemas/SizeWebhookEventType'
        timestamp:
          type: string
          format: date-time
          description: ISO 8601 timestamp when the event occurred
        data:
          type: object
          required:
            - id
            - sizeId
            - chainId
          properties:
            id:
              type: string
              format: uuid
              description: ID of the size group
            sizeId:
              type: string
              format: uuid
              description: ID of the size
            chainId:
              type: string
              format: uuid
              description: ID of the chain
          description: Size specific data payload
      example:
        id: 'uuid-v4-generated-value'
        restaurantId: 'app.restaurantId-value'
        appId: 'app.appId-value'
        type: 'sizes.updated'
        timestamp: '2025-08-07T16:52:28.000Z'
        data:
          id: 'sizeGroup.id-value'
          sizeId: 'size.id-value'
          chainId: 'sizeGroup.chainId-value'

    PriceWebhookPayload:
      title: PriceWebhookPayload
      x-group-name: Webhooks
      type: object
      description: |
        Structure for price webhook event payloads
      required:
        - id
        - restaurantId
        - appId
        - type
        - timestamp
        - data
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for this webhook event
        restaurantId:
          type: string
          format: uuid
          description: ID of the restaurant where the event occurred
        appId:
          type: string
          format: uuid
          description: ID of the app receiving this webhook
        type:
          $ref: '#/components/schemas/PriceWebhookEventType'
        timestamp:
          type: string
          format: date-time
          description: ISO 8601 timestamp when the event occurred
        data:
          type: object
          required:
            - id
            - chainId
          properties:
            id:
              type: string
              format: uuid
              description: ID of the item
            chainId:
              type: string
              format: uuid
              description: ID of the chain

          description: Price specific data payload
      example:
        id: 'uuid-v4-generated-value'
        restaurantId: 'app.restaurantId-value'
        appId: 'app.appId-value'
        type: 'prices.created'
        timestamp: '2025-08-07T16:30:57.000Z'
        data:
          id: 'item.id-value'
          chainId: 'item.chainId-value'

    SizeChannelRuleWebhookPayload:
      title: SizeChannelRuleWebhookPayload
      x-group-name: Webhooks
      type: object
      description: |
        Structure for size channel rule webhook event payloads
      required:
        - id
        - restaurantId
        - appId
        - type
        - timestamp
        - data
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for this webhook event
        restaurantId:
          type: string
          format: uuid
          description: ID of the restaurant where the event occurred
        appId:
          type: string
          format: uuid
          description: ID of the app receiving this webhook
        type:
          $ref: '#/components/schemas/SizeChannelRuleWebhookEventType'
        timestamp:
          type: string
          format: date-time
          description: ISO 8601 timestamp when the event occurred
        data:
          type: object
          required:
            - id
            - channelId
            - sizeId
            - available
            - ownerType
            - ownerId
            - createdAt
            - updatedAt
          properties:
            id:
              type: string
              format: uuid
              description: ID of the size channel rule
            channelId:
              type: string
              format: uuid
              description: ID of the channel
            sizeId:
              type: string
              format: uuid
              description: ID of the size
            available:
              type: boolean
              description: Whether the size is available on this channel
            ownerType:
              type: string
              enum: [chain, restaurant, virtual_location]
              description: Type of the owner entity
            ownerId:
              type: string
              format: uuid
              description: ID of the owner entity
            createdAt:
              type: string
              format: date-time
              description: Creation timestamp
            updatedAt:
              type: string
              format: date-time
              description: Last update timestamp
            deletedAt:
              type: string
              format: date-time
              nullable: true
              description: Deletion timestamp, null if not deleted
          description: Size channel rule specific data payload
      example:
        id: 'uuid-v4-generated-value'
        restaurantId: 'app.restaurantId-value'
        appId: 'app.appId-value'
        type: 'size_channel_rules.created'
        timestamp: '2025-08-07T16:07:20.000Z'
        data:
          id: 'rule-uuid-value'
          channelId: 'channel-uuid-value'
          sizeId: 'size-uuid-value'
          available: true
          ownerType: 'restaurant'
          ownerId: 'owner-uuid-value'
          createdAt: '2025-08-07T16:07:20.000Z'
          updatedAt: '2025-08-07T16:07:20.000Z'
          deletedAt: null

    SortingOrderWebhookPayload:
      title: SortingOrderWebhookPayload
      x-group-name: Webhooks
      type: object
      description: |
        Structure for sorting order webhook event payloads
      required:
        - id
        - restaurantId
        - appId
        - type
        - timestamp
        - data
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for this webhook event
        restaurantId:
          type: string
          format: uuid
          description: ID of the restaurant where the event occurred
        appId:
          type: string
          format: uuid
          description: ID of the app receiving this webhook
        type:
          $ref: '#/components/schemas/SortingOrderWebhookEventType'
        timestamp:
          type: string
          format: date-time
          description: ISO 8601 timestamp when the event occurred
        data:
          type: object
          required:
            - id
            - entityId
            - entityType
            - ownerId
            - ownerType
            - lexorank
            - createdAt
            - updatedAt
          properties:
            id:
              type: string
              format: uuid
              description: ID of the sorting order
            entityId:
              type: string
              format: uuid
              description: ID of the entity being sorted
            entityType:
              type: string
              enum: [item, menu, schedule, modifierGroup]
              description: Type of the entity being sorted
            ownerId:
              type: string
              format: uuid
              description: ID of the owner entity
            ownerType:
              type: string
              enum:
                [
                  restaurant,
                  chain,
                  menuGroup,
                  menu,
                  modifierGroup,
                  virtual_location,
                ]
              description: Type of the owner entity
            lexorank:
              type: string
              description: Lexorank string value for ordering
            createdAt:
              type: string
              format: date-time
              description: Creation timestamp
            updatedAt:
              type: string
              format: date-time
              description: Last update timestamp
          description: Sorting order specific data payload
      example:
        id: 'uuid-v4-generated-value'
        restaurantId: 'app.restaurantId-value'
        appId: 'app.appId-value'
        type: 'sorting_orders.updated'
        timestamp: '2025-08-07T15:48:09.000Z'
        data:
          id: 'sortingOrder-uuid-value'
          entityId: 'entity-uuid-value'
          entityType: 'item'
          ownerId: 'owner-uuid-value'
          ownerType: 'restaurant'
          lexorank: 'lexorank-string-value'
          createdAt: '2025-08-07T15:48:09.000Z'
          updatedAt: '2025-08-07T15:48:09.000Z'

    DayScheduleWebhookPayload:
      title: DayScheduleWebhookPayload
      x-group-name: Webhooks
      type: object
      description: |
        Structure for day schedule webhook event payloads
      required:
        - id
        - restaurantId
        - appId
        - type
        - timestamp
        - data
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for this webhook event
        restaurantId:
          type: string
          format: uuid
          description: ID of the restaurant where the event occurred
        appId:
          type: string
          format: uuid
          description: ID of the app receiving this webhook
        type:
          $ref: '#/components/schemas/DayScheduleWebhookEventType'
        timestamp:
          type: string
          format: date-time
          description: ISO 8601 timestamp when the event occurred
        data:
          type: object
          required:
            - id
            - restaurantId
            - dayOfWeek
          properties:
            id:
              type: string
              format: uuid
              description: ID of the day schedule
            restaurantId:
              type: string
              format: uuid
              description: ID of the restaurant
            dayOfWeek:
              type: integer
              minimum: 0
              maximum: 6
              description: Day of the week (0 = Sunday, 6 = Saturday)
          description: Day schedule specific data payload
      example:
        id: 'uuid-v4-generated-value'
        restaurantId: 'app.restaurantId-value'
        appId: 'app.appId-value'
        type: 'day_schedules.created'
        timestamp: '2025-08-07T15:35:28.000Z'
        data:
          id: 'day-schedule-uuid-value'
          restaurantId: 'restaurant-uuid-value'
          dayOfWeek: 1

    OrderWebhookPayload:
      title: OrderWebhookPayload
      x-group-name: Webhooks
      type: object
      description: |
        Structure for order webhook event payloads
      required:
        - id
        - restaurantId
        - appId
        - type
        - timestamp
        - data
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for this webhook event
        restaurantId:
          type: string
          format: uuid
          description: ID of the restaurant where the event occurred
        appId:
          type: string
          format: uuid
          description: ID of the app receiving this webhook
        type:
          $ref: '#/components/schemas/OrderWebhookEventType'
        timestamp:
          type: string
          format: date-time
          description: ISO 8601 timestamp when the event occurred
        data:
          type: object
          required:
            - id
            - restaurantId
            - status
          properties:
            id:
              type: string
              format: uuid
              description: ID of the order
            masterOrderId:
              type: string
              format: uuid
              nullable: true
              description: ID of the master order if applicable
            dayOrderNumber:
              type: integer
              description: Order number for the day
            internalOrderId:
              type: integer
              description: Internal order ID
            customerCount:
              type: integer
              description: Number of customers
            customerName:
              type: string
              description: Name of the customer
            appId:
              type: string
              format: uuid
              nullable: true
              description: ID of the app if applicable
            externalOrderReference:
              type: string
              nullable: true
              description: External reference for the order if applicable
            estimatedPickupAt:
              type: string
              format: date-time
              nullable: true
              description: Estimated pickup time
            pickedUpAt:
              type: string
              format: date-time
              nullable: true
              description: Actual pickup time
            type:
              type: string
              enum: [direct_sale, takeout, delivery]
              description: Type of order
            terminalId:
              type: string
              format: uuid
              description: ID of the terminal
            restaurantId:
              type: string
              format: uuid
              description: ID of the restaurant
            virtualLocationId:
              type: string
              format: uuid
              nullable: true
              description: ID of the virtual location if applicable
            status:
              type: string
              enum: [completed, in_progress, needs_approval]
              description: Status of the order
            vip:
              type: boolean
              description: Whether the order is for a VIP customer
            tableId:
              type: string
              format: uuid
              nullable: true
              description: ID of the table if applicable
            startedAt:
              type: string
              format: date-time
              description: Time when the order was started
            finishedAt:
              type: string
              format: date-time
              nullable: true
              description: Time when the order was finished
            totalAmount:
              type: number
              format: float
              description: Total amount of the order
            taxAmount:
              type: number
              format: float
              description: Tax amount
            subtotalAmount:
              type: number
              format: float
              description: Subtotal amount
            discountAmount:
              type: number
              format: float
              description: Discount amount
            itemsDiscountAmount:
              type: number
              format: float
              description: Discount amount applied to items
            seat:
              type: integer
              nullable: true
              description: Seat number
            voidReason:
              type: string
              nullable: true
              description: Reason for voiding the order
            notes:
              type: string
              nullable: true
              description: Order notes
            voidedBy:
              type: string
              format: uuid
              nullable: true
              description: ID of employee who voided the order
            voidedAt:
              type: string
              format: date-time
              nullable: true
              description: Time when the order was voided
            metadata:
              type: object
              description: Additional metadata
            createdAt:
              type: string
              format: date-time
              description: Creation timestamp
            updatedAt:
              type: string
              format: date-time
              description: Last update timestamp
            deletedAt:
              type: string
              format: date-time
              nullable: true
              description: Deletion timestamp
            orderItems:
              type: array
              description: Items in the order
              items:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                    description: ID of the order item
                  orderId:
                    type: string
                    format: uuid
                    description: ID of the order
                  itemId:
                    type: string
                    format: uuid
                    description: ID of the item
                  name:
                    type: string
                    description: Name of the item
                  quantity:
                    type: integer
                    description: Quantity ordered
                  unitPrice:
                    type: number
                    format: float
                    description: Unit price
                  totalPrice:
                    type: number
                    format: float
                    description: Total price
                  notes:
                    type: string
                    nullable: true
                    description: Item notes
                  status:
                    type: string
                    description: Status of the item
                  modifiers:
                    type: array
                    description: Modifiers applied to the item
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          format: uuid
                          description: ID of the modifier
                        orderItemId:
                          type: string
                          format: uuid
                          description: ID of the order item
                        modifierId:
                          type: string
                          format: uuid
                          description: ID of the modifier
                        name:
                          type: string
                          description: Name of the modifier
                        quantity:
                          type: integer
                          description: Quantity of the modifier
                        unitPrice:
                          type: number
                          format: float
                          description: Unit price of the modifier
                        totalPrice:
                          type: number
                          format: float
                          description: Total price of the modifier
            refunds:
              type: array
              description: Refunds for the order
              items:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                    description: ID of the refund
                  orderId:
                    type: string
                    format: uuid
                    description: ID of the order
                  amount:
                    type: number
                    format: float
                    description: Refund amount
                  reason:
                    type: string
                    description: Reason for the refund
            payments:
              type: array
              description: Payments for the order
              items:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                    description: ID of the payment
                  orderId:
                    type: string
                    format: uuid
                    description: ID of the order
                  amount:
                    type: number
                    format: float
                    description: Payment amount
                  method:
                    type: string
                    description: Payment method
                  status:
                    type: string
                    description: Payment status
            discounts:
              type: array
              description: Discounts applied to the order
              items:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                    description: ID of the discount
                  orderId:
                    type: string
                    format: uuid
                    description: ID of the order
                  orderItemId:
                    type: string
                    format: uuid
                    nullable: true
                    description: ID of the order item if applicable
                  type:
                    type: string
                    enum: [fixed, percentage]
                    description: Type of discount
                  amount:
                    type: number
                    format: float
                    description: Discount amount
                  name:
                    type: string
                    description: Name of the discount
          description: Order specific data payload
      example:
        id: 'uuid-v4-generated-value'
        restaurantId: 'app.restaurantId-value'
        appId: 'app.appId-value'
        type: 'orders.created'
        timestamp: '2025-08-07T18:00:10.000Z'
        data:
          id: 'order-uuid-value'
          masterOrderId: 'master-order-uuid-value-if-applicable'
          dayOrderNumber: 123
          internalOrderId: 456
          customerCount: 2
          customerName: 'Customer Name'
          appId: 'app-uuid-value-if-applicable'
          externalOrderReference: 'external-reference-if-applicable'
          estimatedPickupAt: '2025-08-07T18:00:10.000Z'
          pickedUpAt: '2025-08-07T18:00:10.000Z'
          type: 'direct_sale'
          terminalId: 'terminal-uuid-value'
          restaurantId: 'restaurant-uuid-value'
          virtualLocationId: 'virtual-location-uuid-value-if-applicable'
          status: 'completed'
          vip: true
          tableId: 'table-uuid-value-if-applicable'
          startedAt: '2025-08-07T18:00:10.000Z'
          finishedAt: '2025-08-07T18:00:10.000Z'
          totalAmount: 100.00
          taxAmount: 10.00
          subtotalAmount: 90.00
          discountAmount: 5.00
          itemsDiscountAmount: 2.00
          seat: 3
          voidReason: 'Reason if voided'
          notes: 'Order notes'
          voidedBy: 'employee-uuid-who-voided-if-applicable'
          voidedAt: '2025-08-07T18:00:10.000Z'
          metadata: {}
          createdAt: '2025-08-07T18:00:10.000Z'
          updatedAt: '2025-08-07T18:00:10.000Z'
          deletedAt: null
          orderItems:
            - id: 'order-item-uuid'
              orderId: 'order-uuid-value'
              itemId: 'item-uuid-value'
              name: 'Item Name'
              quantity: 1
              unitPrice: 10.00
              totalPrice: 10.00
              notes: 'Item notes'
              status: 'completed'
              modifiers:
                - id: 'modifier-uuid'
                  orderItemId: 'order-item-uuid'
                  modifierId: 'modifier-id'
                  name: 'Modifier Name'
                  quantity: 1
                  unitPrice: 2.00
                  totalPrice: 2.00
          refunds:
            - id: 'refund-uuid'
              orderId: 'order-uuid-value'
              amount: 5.00
              reason: 'Refund reason'
          payments:
            - id: 'payment-uuid'
              orderId: 'order-uuid-value'
              amount: 100.00
              method: 'cash'
              status: 'completed'
          discounts:
            - id: 'discount-uuid'
              orderId: 'order-uuid-value'
              orderItemId: null
              type: 'fixed'
              amount: 5.00
              name: 'Discount Name'

    VirtualLocationWebhookPayload:
      title: VirtualLocationWebhookPayload
      x-group-name: Webhooks
      type: object
      description: |
        Structure for virtual location webhook event payloads
      required:
        - id
        - restaurantId
        - appId
        - type
        - timestamp
        - data
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for this webhook event
        restaurantId:
          type: string
          format: uuid
          description: ID of the restaurant where the event occurred
        appId:
          type: string
          format: uuid
          description: ID of the app receiving this webhook
        type:
          $ref: '#/components/schemas/VirtualLocationWebhookEventType'
        timestamp:
          type: string
          format: date-time
          description: ISO 8601 timestamp when the event occurred
        data:
          type: object
          required:
            - id
            - groupId
            - chainId
            - restaurantId
          properties:
            id:
              type: string
              format: uuid
              description: ID of the virtual location
            groupId:
              type: string
              format: uuid
              description: ID of the group
            chainId:
              type: string
              format: uuid
              description: ID of the chain
            restaurantId:
              type: string
              format: uuid
              description: ID of the restaurant
          description: Virtual location specific data payload
      example:
        id: 'uuid-v4-generated-value'
        restaurantId: 'app.restaurantId-value'
        appId: 'app.appId-value'
        type: 'virtual_locations.created'
        timestamp: '2025-08-07T15:35:28.000Z'
        data:
          id: 'virtual-location-uuid-value'
          groupId: 'group-uuid-value'
          chainId: 'chain-uuid-value'
          restaurantId: 'restaurant-uuid-value'

    ModifierGroupWebhookPayload:
      title: ModifierGroupWebhookPayload
      x-group-name: Webhooks
      type: object
      description: |
        Structure for modifier group webhook event payloads
      required:
        - id
        - restaurantId
        - appId
        - type
        - timestamp
        - data
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for this webhook event
        restaurantId:
          type: string
          format: uuid
          description: ID of the restaurant where the event occurred
        appId:
          type: string
          format: uuid
          description: ID of the app receiving this webhook
        type:
          $ref: '#/components/schemas/ModifierGroupWebhookEventType'
        timestamp:
          type: string
          format: date-time
          description: ISO 8601 timestamp when the event occurred
        data:
          type: object
          required:
            - id
            - chainId
          properties:
            id:
              type: string
              format: uuid
              description: ID of the modifier group
            chainId:
              type: string
              format: uuid
              description: ID of the chain
          description: Modifier group specific data payload
      example:
        id: 'uuid-v4-generated-value'
        restaurantId: 'app.restaurantId-value'
        appId: 'app.appId-value'
        type: 'modifier_groups.created'
        timestamp: '2025-08-07T15:35:28.000Z'
        data:
          id: 'modifier-group-uuid-value'
          chainId: 'chain-uuid-value'

    ModifierGroupChannelRuleWebhookPayload:
      title: ModifierGroupChannelRuleWebhookPayload
      x-group-name: Webhooks
      type: object
      description: |
        Structure for modifier group channel rule webhook event payloads
      required:
        - id
        - restaurantId
        - appId
        - type
        - timestamp
        - data
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for this webhook event
        restaurantId:
          type: string
          format: uuid
          description: ID of the restaurant where the event occurred
        appId:
          type: string
          format: uuid
          description: ID of the app receiving this webhook
        type:
          $ref: '#/components/schemas/ModifierGroupChannelRuleWebhookEventType'
        timestamp:
          type: string
          format: date-time
          description: ISO 8601 timestamp when the event occurred
        data:
          type: object
          required:
            - id
            - channelId
            - modifierGroupId
            - available
            - ownerType
            - ownerId
            - createdAt
            - updatedAt
          properties:
            id:
              type: string
              format: uuid
              description: ID of the modifier group channel rule
            channelId:
              type: string
              format: uuid
              description: ID of the channel
            modifierGroupId:
              type: string
              format: uuid
              description: ID of the modifier group
            available:
              type: boolean
              description: Whether the modifier group is available in this channel
            ownerType:
              type: string
              enum: [chain, restaurant, virtual_location]
              description: Type of the owner entity
            ownerId:
              type: string
              format: uuid
              description: ID of the owner entity
            createdAt:
              type: string
              format: date-time
              description: Creation timestamp
            updatedAt:
              type: string
              format: date-time
              description: Last update timestamp
            deletedAt:
              type: string
              format: date-time
              nullable: true
              description: Deletion timestamp, null if not deleted
          description: Modifier group channel rule specific data payload
      example:
        id: 'uuid-v4-generated-value'
        restaurantId: 'app.restaurantId-value'
        appId: 'app.appId-value'
        type: 'modifier_group_channel_rules.created'
        timestamp: '2025-08-07T15:35:28.000Z'
        data:
          id: 'rule-uuid-value'
          channelId: 'channel-uuid-value'
          modifierGroupId: 'modifier-group-uuid-value'
          available: true
          ownerType: 'chain'
          ownerId: 'owner-uuid-value'
          createdAt: '2025-08-07T15:35:28.000Z'
          updatedAt: '2025-08-07T15:35:28.000Z'
          deletedAt: null

    ItemWebhookPayload:
      title: ItemWebhookPayload
      x-group-name: Webhooks
      type: object
      description: |
        Structure for item webhook event payloads
      required:
        - id
        - restaurantId
        - appId
        - type
        - timestamp
        - data
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for this webhook event
        restaurantId:
          type: string
          format: uuid
          description: ID of the restaurant where the event occurred
        appId:
          type: string
          format: uuid
          description: ID of the app receiving this webhook
        type:
          $ref: '#/components/schemas/ItemWebhookEventType'
        timestamp:
          type: string
          format: date-time
          description: ISO 8601 timestamp when the event occurred
        data:
          type: object
          required:
            - id
            - chainId
          properties:
            id:
              type: string
              format: uuid
              description: ID of the item
            chainId:
              type: string
              format: uuid
              description: ID of the chain
          description: Item specific data payload
      example:
        id: 'uuid-v4-generated-value'
        restaurantId: 'app.restaurantId-value'
        appId: 'app.appId-value'
        type: 'items.updated'
        timestamp: '2025-08-07T15:28:11.000Z'
        data:
          id: 'item.id-value'
          chainId: 'item.chainId-value'

    SizeGroupWebhookPayload:
      title: SizeGroupWebhookPayload
      x-group-name: Webhooks
      type: object
      description: |
        Structure for size group webhook event payloads
      required:
        - id
        - restaurantId
        - appId
        - type
        - timestamp
        - data
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for this webhook event
        restaurantId:
          type: string
          format: uuid
          description: ID of the restaurant where the event occurred
        appId:
          type: string
          format: uuid
          description: ID of the app receiving this webhook
        type:
          $ref: '#/components/schemas/SizeGroupWebhookEventType'
        timestamp:
          type: string
          format: date-time
          description: ISO 8601 timestamp when the event occurred
        data:
          type: object
          required:
            - id
            - chainId
          properties:
            id:
              type: string
              format: uuid
              description: ID of the size group
            chainId:
              type: string
              format: uuid
              description: ID of the chain
          description: Size group specific data payload
      example:
        id: 'uuid-v4-generated-value'
        restaurantId: 'app.restaurantId-value'
        appId: 'app.appId-value'
        type: 'size_groups.created'
        timestamp: '2025-08-07T15:21:36.000Z'
        data:
          id: 'sizeGroup.id-value'
          chainId: 'sizeGroup.chainId-value'

    AppWebhookPayload:
      title: AppWebhookPayload
      x-group-name: Webhooks
      type: object
      description: |
        Structure for app webhook event payloads
      required:
        - id
        - restaurantId
        - appId
        - type
        - timestamp
        - data
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for this webhook event
        restaurantId:
          type: string
          format: uuid
          description: ID of the restaurant where the event occurred
        appId:
          type: string
          format: uuid
          description: ID of the app receiving this webhook
        type:
          $ref: '#/components/schemas/AppWebhookEventType'
        timestamp:
          type: string
          format: date-time
          description: ISO 8601 timestamp when the event occurred
        data:
          type: object
          required:
            - restaurantId
            - chainId
            - appId
          properties:
            restaurantId:
              type: string
              format: uuid
              description: ID of the restaurant
            chainId:
              type: string
              format: uuid
              description: ID of the chain
            appId:
              type: string
              format: uuid
              description: ID of the app
          description: App specific data payload
      example:
        id: 'uuid-v4-generated-value'
        restaurantId: 'restaurantId-value'
        appId: 'appId-value'
        type: 'app.installed'
        timestamp: '2025-08-07T15:13:50.000Z'
        data:
          restaurantId: 'restaurantId-value'
          chainId: 'restaurant.chainId-value'
          appId: 'appId-value'

    MenuWebhookPayload:
      title: MenuWebhookPayload
      x-group-name: Webhooks
      type: object
      description: |
        Structure for menu webhook event payloads
      required:
        - id
        - restaurantId
        - appId
        - type
        - timestamp
        - data
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for this webhook event
        restaurantId:
          type: string
          format: uuid
          description: ID of the restaurant where the event occurred
        appId:
          type: string
          format: uuid
          description: ID of the app receiving this webhook
        type:
          $ref: '#/components/schemas/MenuWebhookEventType'
        timestamp:
          type: string
          format: date-time
          description: ISO 8601 timestamp when the event occurred
        data:
          type: object
          required:
            - id
            - ownerId
            - ownerType
            - channelId
          properties:
            id:
              type: string
              format: uuid
              description: ID of the menu
            ownerId:
              type: string
              format: uuid
              description: ID of the owner entity
            ownerType:
              type: string
              description: Type of the owner entity
          description: Menu specific data payload

    UnavailableEntity:
      type: object
      x-examples:
        Example 1:
          id: 2e18faad-1e50-400b-8b8b-45aedef2dc61
          entityId: 51a1d4e4-a66f-4d46-8fe4-fa338d2c24c2
          entityType: product
          ownerId: d18dcccd-0dfc-4750-a240-43820e35bd69
          ownerType: restaurant
          unavailableUntil: null
          createdAt: '2025-02-13T22:59:01.000Z'
          updatedAt: '2025-07-09T18:19:51.000Z'
          deletedAt: null
      properties:
        id:
          type: string
          format: uuid
        entityId:
          type: string
          format: uuid
        entityType:
          enum:
            - item
        ownerId:
          type: string
          format: uuid
        ownerType:
          enum:
            - restaurant
            - virtual_location
        unavailableUntil:
          type: string
          format: date-time
          nullable: true
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        deletedAt:
          type: string
          format: date-time
          nullable: true
tags:
  - name: Authentication
    description: |-
      In order to make any requests to the PoloTab API, you must first authenticate your requests using a restaurant's bearer token. This token is unique to each restaurant and app. So if your app manages multiple restaurants, you will need to generate a bearer token for each restaurant. 

      This endpoint provides a way to generate a new restaurant's bearer token using the app's API key. In order to generate a restaurant's bearer token, the restaurant must first install your app. Once installed, you will be notified via webhook so you can obtain the bearer token using the endpoint below.
  - name: Restaurants
    description: |-
      Endpoints for restaurant management.

      Restaurants represent physical locations. Restaurant entities belongs to a chain. Restaurant entities can have multiple child virtual locations.
  - name: Virtual locations
    description: |-
      Endpoints for managing virtual locations.

      A virtual location is a digital-only restaurant presence that may operate from existing physical locations but maintain separate branding, menus, and operational workflows. Restaurants use virtual locations to manage their online presence, such as their website or mobile app. Most restaurants have a single virtual location that operates through multiple channels, however, some physical restaurants such as dark-kitchens may have multiple virtual locations that represent different brands.

      These APIs support the creation and management of digital-only restaurant presences that may operate from existing physical locations but maintain separate branding, menus, and operational workflows.
  - name: Orders
    description: 'Endpoints for comprehensive order management throughout the entire lifecycle. These APIs support order creation, modification, status updates, fulfillment tracking, and historical order data. They handle various order types including dine-in, takeout, delivery, and catering orders.'
  - name: Items
    description: |-
      Endpoints for managing individual menu items and their details. 

      Items are the foundational building blocks of a restaurant's menu. Each item represents a specific product and/or modifier. Items within a menu act as a product, while items within a modifier group act as a modifier. An item can be both a product and a modifier depending on the context.

      These APIs handle the creation and configuration of items.
  - name: Menu
    description: |-
      Endpoints for managing complete restaurant menus and their configurations. 

      A menu is a collection of items such as "Appetizers", "Entrees", "Desserts", "Beverages", "Sides" etc.

      By default, menus are inherited from parent entities. But can be hidden by the child entity through the visibility rules endpoints. For example, a menu created at the chain level by default will be visible at the restaurant and virtual location level.

      These APIs provide functionality for creating, updating, and organizing menus.
  - name: Modifier groups
    description: |-
      Endpoints for managing modifier groups and their configurations. 

      Modifier groups are used to group items (such as toppings, or preparation options) into logical groups that can be applied to menus and/or other items, enabling customization options for customers.

      These APIs allow restaurants to create and organize modifier groups.
  - name: Size groups
    description: |-
      Endpoints for managing size groups and their configurations. 

      Size groups are used to group sizes (such as small, medium, large) into logical groups that can be applied to menus and/or other items, enabling customization options for customers.

      These APIs allow restaurants to create and organize sizes and size groups.
  - name: Menu groups
    description: |-
      Endpoints for organizing menus into logical categories and sections. 

      These APIs allow restaurants to group menus (such as "Appetizers", "Entrees", "Desserts", "Beverages", "Sides") into broader groups such as "Breakfast", "Lunch/Dinner"
  - name: Taxes
    description: |-
      Endpoints for managing tax rules and their configurations. 

      These APIs allow restaurants to create and organize tax rules.
  - name: Channels
    description: |-
      Endpoints for managing sales and distribution channels such as POS, Web site, a delivery app, etc. 

      These APIs support the configuration of different service channels. They enable channel-specific menu offerings, pricing strategies, and operational workflows.
  - name: Schedules
    description: |-
      Endpoints for configuring restaurant and virtual location schedules. 

      These APIs manage operating hours. They currently support only recurring schedules for restaurants and virtual locations.
  - name: Unavailable entities
    description: |-
      Endpoints for managing temporarily unavailable items. 

      These APIs handle the marking and tracking of items that are temporarily out of stock or unavailable. They support scheduled unavailability periods and automatic restoration of availability.
  - name: Push Notifications
    description: |-
      Endpoints for managing POS push notifications. 

      These APIs allow you to push notifications to a specific terminal within a restaurant.
  - name: Socket
    description: |-
      All points of sale (POS) are connected to the PoloTab API using REST APIs as well as sockets. 

      When an order is created, updated, or deleted, the API will notify the POS via a socket connection. 

      Through this APIs, you can check what points of sale are currently live and connected.
  - name: Webhooks
    description: |-
      PoloTab offers webhooks to provide real-time notifications about events occurring in the system. To subscribe to these webhooks, please contact our team at **developer-support@polotab.com**. We will provide you with the necessary information to configure and receive notifications for events such as:

      - Order changes (creation, updates, status changes)
      - Menu updates
      - App installations and uninstallations
      - And many more

      Note: This process will change when the Developer Console (mentioned in the "Tools Coming Soon" section) becomes available, allowing you to self-register and manage your webhook subscriptions directly.

webhooks:
  items.*:
    post:
      summary: Items
      tags:
        - Webhooks
      description: Triggered for all item events (created, updated, deleted)
      requestBody:
        description: Webhook payload for item events
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ItemWebhookPayload'
      responses:
        '200':
          description: Return a 200 status to indicate that the data was received successfully
  # App events
  apps.*:
    post:
      summary: Apps
      tags:
        - Webhooks
      description: Triggered for all app events (installed, uninstalled)
      requestBody:
        description: Webhook payload for app events
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AppWebhookPayload'
      responses:
        '200':
          description: Return a 200 status to indicate that the data was received successfully
  # Day Schedules events
  day_schedules.*:
    post:
      summary: Day Schedules
      tags:
        - Webhooks
      description: Triggered for all day schedule events (created, updated, deleted)
      requestBody:
        description: Webhook payload for day schedule events
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DayScheduleWebhookPayload'
      responses:
        '200':
          description: Return a 200 status to indicate that the data was received successfully
  # Modifier Groups events
  modifier_groups.*:
    post:
      summary: Modifier Groups
      tags:
        - Webhooks
      description: Triggered for all modifier group events (created, updated, deleted)
      requestBody:
        description: Webhook payload for modifier group events
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ModifierGroupWebhookPayload'
      responses:
        '200':
          description: Return a 200 status to indicate that the data was received successfully
  # Modifier Group Channel Rules events
  modifier_group_channel_rules.*:
    post:
      summary: Modifier Group Channel Rules
      tags:
        - Webhooks
      description: Triggered for all modifier group channel rule events (created, updated, deleted)
      requestBody:
        description: Webhook payload for modifier group channel rule events
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ModifierGroupChannelRuleWebhookPayload'
      responses:
        '200':
          description: Return a 200 status to indicate that the data was received successfully
  # Virtual Locations events
  virtual_locations.*:
    post:
      summary: Virtual Locations
      tags:
        - Webhooks
      description: Triggered for all virtual location events (created, updated, deleted)
      requestBody:
        description: Webhook payload for virtual location events
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VirtualLocationWebhookPayload'
      responses:
        '200':
          description: Return a 200 status to indicate that the data was received successfully
  # Orders events
  orders.*:
    post:
      summary: Orders
      tags:
        - Webhooks
      description: Triggered for all order events (created, updated)
      requestBody:
        description: Webhook payload for order events
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrderWebhookPayload'
      responses:
        '200':
          description: Return a 200 status to indicate that the data was received successfully

  # Sorting Orders events
  sorting_orders.*:
    post:
      summary: Sorting Orders
      tags:
        - Webhooks
      description: Triggered for all sorting order events (updated)
      requestBody:
        description: Webhook payload for sorting order events
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SortingOrderWebhookPayload'
      responses:
        '200':
          description: Return a 200 status to indicate that the data was received successfully

  # Size Channel Rules events
  size_channel_rules.*:
    post:
      summary: Size Channel Rules
      tags:
        - Webhooks
      description: Triggered for all size channel rule events (created, updated, deleted)
      requestBody:
        description: Webhook payload for size channel rule events
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SizeChannelRuleWebhookPayload'
      responses:
        '200':
          description: Return a 200 status to indicate that the data was received successfully

  # Price events
  prices.*:
    post:
      summary: Prices
      tags:
        - Webhooks
      description: Triggered for all price events (created, deleted)
      requestBody:
        description: Webhook payload for price events
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PriceWebhookPayload'
      responses:
        '200':
          description: Return a 200 status to indicate that the data was received successfully

  # Size events
  sizes.*:
    post:
      summary: Sizes
      tags:
        - Webhooks
      description: Triggered for all size events (updated)
      requestBody:
        description: Webhook payload for size events
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SizeWebhookPayload'
      responses:
        '200':
          description: Return a 200 status to indicate that the data was received successfully

  # Promotions events
  promotions.*:
    post:
      summary: Promotions
      tags:
        - Webhooks
      description: Triggered for all promotion events (created, updated, deleted)
      requestBody:
        description: Webhook payload for promotion events
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PromotionWebhookPayload'
      responses:
        '200':
          description: Return a 200 status to indicate that the data was received successfully
  # Menus events
  menus.*:
    post:
      summary: Menus
      tags:
        - Webhooks
      description: Triggered for all menu events (created, updated, deleted)
      requestBody:
        description: Webhook payload for menu events
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MenuWebhookPayload'
      responses:
        '200':
          description: Return a 200 status to indicate that the data was received successfully
  # Size Groups events
  size_groups.*:
    post:
      summary: Size Groups
      tags:
        - Webhooks
      description: Triggered for all size group events (created, updated, deleted)
      requestBody:
        description: Webhook payload for size group events
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SizeGroupWebhookPayload'
      responses:
        '200':
          description: Return a 200 status to indicate that the data was received successfully
  # Menu Groups events
  menu_groups.*:
    post:
      summary: Menu Groups
      tags:
        - Webhooks
      description: Triggered for all menu group events (created, updated, deleted)
      requestBody:
        description: Webhook payload for menu group events
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MenuGroupWebhookPayload'
      responses:
        '200':
          description: Return a 200 status to indicate that the data was received successfully

  # Virtual Location App events
  virtual_location_app.*:
    post:
      summary: Virtual Location App
      tags:
        - Webhooks
      description: Triggered for all virtual location app events (updated)
      requestBody:
        description: Webhook payload for virtual location app events
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VirtualLocationAppWebhookPayload'
      responses:
        '200':
          description: Return a 200 status to indicate that the data was received successfully
  # Unavailable entity events (temporary unavailability, e.g. out-of-stock)
  unavailable_entities.*:
    post:
      summary: Unavailable entities
      tags:
        - Webhooks
      description: Triggered for unavailable entity events (created, updated, deleted)
      requestBody:
        description: Webhook payload for unavailable entity events
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UnavailableEntityWebhookPayload'
      responses:
        '200':
          description: Return a 200 status to indicate that the data was received successfully
#         content:
#           application/json:
#             schema:
#               $ref: '#/components/schemas/Pet'
#       responses:
#         '200':
#           description: Return a 200 status to indicate that the data was received successfully
#   virtual_location:
#     post:
#       requestBody:
#         description: Information about a new pet in the system
#         content:
#           application/json:
#             schema:
#               $ref: '#/components/schemas/Pet'
#       responses:
#         '200':
#           description: Return a 200 status to indicate that the data was received successfully
#   virtual_location_app:
#     post:
#       requestBody:
#         description: Information about a new pet in the system
#         content:
#           application/json:
#             schema:
#               $ref: '#/components/schemas/Pet'
#       responses:
#         '200':
#           description: Return a 200 status to indicate that the data was received successfully
#   size_groups:
#     post:
#       requestBody:
#         description: Information about a new pet in the system
#         content:
#           application/json:
#             schema:
#               $ref: '#/components/schemas/Pet'
#       responses:
#         '200':
#           description: Return a 200 status to indicate that the data was received successfully
#   size_channel_rules:
#     post:
#       requestBody:
#         description: Information about a new pet in the system
#         content:
#           application/json:
#             schema:
#               $ref: '#/components/schemas/Pet'
#       responses:
#         '200':
#           description: Return a 200 status to indicate that the data was received successfully
#   sorting_order:
#     post:
#       requestBody:
#         description: Information about a new pet in the system
#         content:
#           application/json:
#             schema:
#               $ref: '#/components/schemas/Pet'
#       responses:
#         '200':
#           description: Return a 200 status to indicate that the data was received successfully
#   menu:
#     post:
#       requestBody:
#         description: Information about a new pet in the system
#         content:
#           application/json:
#             schema:
#               $ref: '#/components/schemas/Pet'
#       responses:
#         '200':
#           description: Return a 200 status to indicate that the data was received successfully
security:
  - RestaurantToken: []
paths:
  /restaurants/v1/tables:
    get:
      tags:
        - Restaurants
      summary: List all tables
      description: |
        Retrieves all the tables.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TableListResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/unauthorizedError'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/serverError'

  '/restaurants/v1/tables/{table_id}':
    get:
      tags:
        - Restaurants
      summary: Get a table
      description: |
        Retrieve a specific table.
      parameters:
        - name: table_id
          in: path
          schema:
            type: string
            format: uuid
          required: true
          description: ID of the table to retrieve
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TableResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/notFound'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/unauthorizedError'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/serverError'
  /notifications/v1/notifications:
    post:
      tags:
        - Push Notifications
      summary: Send push notification
      description: Sends a push notification to a specific terminal or to all terminals in a restaurant
      operationId: pushNotifications
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                terminalId:
                  type: string
                  description: 'Optional terminal ID to send notification to. If not provided, notification will be sent to all terminals in the restaurant.'
                  format: uuid
                payload:
                  type: object
                  properties:
                    icon:
                      type: string
                      description: Font Awesome icon to display with the notification. Write the icon in the integer format. For example, to display a check icon, use `0xf00c`.
                    title:
                      type: string
                      description: Notification title
                    message:
                      type: string
                      description: Notification message content
                    important:
                      type: boolean
                      description: Whether the notification is marked as important
                    playSound:
                      type: boolean
                      description: Whether to play a sound when showing the notification
                    disappearAfter:
                      type: integer
                      description: Time in seconds after which the notification will disappear
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Push notification sent successfully
        '401':
          description: Unauthorized - Terminal does not belong to the authenticated restaurant
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/unauthorizedError'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/serverError'
  /restaurants/v1/restaurant:
    get:
      tags:
        - Restaurants
      summary: Get authorized restaurant
      description: Returns information about the currently authenticated restaurant
      operationId: getAuthorizedRestaurant
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/restaurant'
        '401':
          description: Unauthorized - Invalid or missing authentication token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/unauthorizedError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/serverError'
  /socket/v1/clients:
    get:
      tags:
        - Socket
      summary: Get Connected Clients
      operationId: listSocketClients
      description: Get connected clients
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                x-examples:
                  Example 1:
                    clients:
                      - id: '-JUIf8F1p1w-j7XQAAM2'
                        data:
                          clientId: c6693e4e-104c-46ad-8d0b-c749737a2f00
                          clientType: pos
                      - id: 1O7W_bqWNcbDPK6wAANE
                        data:
                          clientId: f7fad492-9f84-4153-8bb2-aad3e96392da
                          clientType: pos
                      - id: Q8k0kLht07CsqmyQAAbj
                        data:
                          clientId: b358cbd9-a0d2-4959-baf8-f083960d080c
                          clientType: pos
                properties:
                  clients:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        data:
                          type: object
                          properties:
                            clientId:
                              type: string
                              format: uuid
                            clientType:
                              type: string
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/serverError'

  /auth/v1/restaurants/token:
    post:
      tags:
        - Authentication
      summary: Get restaurant access token
      description: |-
        Generates a bearer token for restaurant-scoped API requests.

        Authenticate this request with either credential type:

        - **App API key**: the requested restaurant must have installed the app.
        - **Account API key**: the requested restaurant must belong to the account/group and be explicitly allowed for that API key. In PoloPay API this credential is represented internally as a group API key.

        App API key restaurant tokens are valid for 7 days from issuance. Account API key restaurant tokens are valid for 30 days from issuance. Once the token expires, generate a new token using this same endpoint.
      operationId: getRestaurantToken
      security:
        - ApiKey: []
      parameters:
        - in: header
          name: Authorization
          required: true
          schema:
            type: string
            example: "Bearer API_KEY"
          description: App API key or account API key using Bearer format
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - restaurantId
              properties:
                restaurantId:
                  type: string
                  format: uuid
                  description: ID of the restaurant to generate token for
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  token:
                    type: string
                    description: JWT token for restaurant access
                  expiryDate:
                    type: string
                    format: date-time
                    description: Token expiration date. App API key tokens expire 7 days from issuance; account API key tokens expire 30 days from issuance.
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/unauthorizedError'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/serverError'
  /menus/v1/modifier_groups:
    post:
      summary: Create a modifier group
      description: Create a modifier group and its optional modifier items for the authenticated restaurant or chain context.
      requestBody:
        content:
          '*/*':
            schema:
              $ref: '#/components/schemas/modifierGroupCreateBody'
      
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/modifierGroupCreateResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/badRequest'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/serverError'
      operationId: createModifierGroup
      parameters: []
      tags:
        - Modifier groups
    get:
      summary: List all modifier groups
      description: List modifier groups. Use `expand=modifierItems` to include modifier items and `channel_id` to return channel-specific prices.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/modifierGroupResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/serverError'
      operationId: listModifierGroups
      parameters:
        - schema:
            type: string
            enum:
              - modifierItems
          in: query
          name: expand
        - schema:
            type: string
          in: query
          name: channel_id
          description: This key is used to return the correct price

      tags:
        - Modifier groups
  '/menus/v1/modifier_groups/{modifier_group_id}/modifier_items':
    get:
      summary: List all modifier items for a modifier group
      operationId: listModifierGroupItems
      description: List the modifier items that belong to a modifier group.
      requestBody:
        content: {}

      parameters:
        - name: modifier_group_id
          in: path
          schema:
            type: string
          required: true
          example: 9bfaf9bc-01dc-4e0e-b41c-e5735744baa8
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/modifierItem'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/notFound'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/serverError'
      tags:
        - Modifier groups
    parameters:
      - schema:
          type: string
        name: modifier_group_id
        in: path
        required: true
  '/menus/v1/modifier_groups/{modifier_group_id}':
    put:
      summary: Update a modifier group
      description: Update a modifier group and its optional modifier items for the authenticated restaurant or chain context.
      operationId: updateModifierGroup
      tags:
        - Modifier groups
      parameters:
        - schema:
            type: string
          name: modifier_group_id
          in: path
          required: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/modifierGroupCreateBody'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/modifierGroupResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/badRequest'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/notFound'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/serverError'
  /virtual_locations/v1/virtual_locations:
    post:
      summary: Create a virtual location
      operationId: createVirtualLocation
      description: Create a new virtual location
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/virtualLocationCreateBody'
      parameters: []
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/virtualLocation'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/serverError'
      tags:
        - Virtual locations

    get:
      summary: List all virtual locations
      operationId: listVirtualLocations
      description: Get all virtual locations
      parameters: []
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/virtualLocation'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/serverError'

      tags:
        - Virtual locations
  '/virtual_locations/v1/virtual_locations/{virtual_location_id}':
    delete:
      summary: Delete a virtual location
      operationId: deleteVirtualLocation
      description: |
        Delete a virtual location

        If the location is managed by more than one app, just remove the app from the location. unless "force" is set to "true" which skips this check
      parameters: []
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                x-examples:
                  Example 1:
                    message: Virtual location was deleted successfully!
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/notFound'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/serverError'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                force:
                  type: boolean
              x-examples:
                Example 1:
                  force: true
      tags:
        - Virtual locations
    get:
      summary: Get a virtual location
      operationId: getVirtualLocation
      description: Get a specific virtual location managed by app
      parameters: null
      responses:
        '200':
          description: Successful response
          content:
            '200':
              schema:
                $ref: '#/components/schemas/virtualLocation'
            application/json:
              schema:
                $ref: '#/components/schemas/virtualLocation'
          headers: {}
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/notFound'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/serverError'
      tags:
        - Virtual locations
    parameters:
      - schema:
          type: string
        name: virtual_location_id
        in: path
        required: true
    put:
      summary: Update a virtual location
      operationId: updateVirtualLocation
      description: Update a virtual location managed by the authenticated app
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/virtualLocationUpdateResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/notFound'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/serverError'
      tags:
        - Virtual locations

      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/virtualLocationUpdateBody'
  '/virtual_locations/v1/virtual_locations/{virtual_location_id}/app':
    post:
      summary: Add Managing App to Location
      operationId: addManagingAppToVirtualLocation
      description: Add managing app to location
      requestBody:
        content: {}
      parameters:
        - name: virtual_location_id
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/virtualLocation'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/notFound'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/serverError'

      tags:
        - Virtual locations
    put:
      summary: Update a Virtual Location App
      operationId: updateVirtualLocationApp
      description: Update a location app managed by app
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/virtualLocationAppUpdateBody'
      parameters:
        - name: virtual_location_id
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/virtualLocationAppUpdateResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/notFound'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/serverError'

      tags:
        - Virtual locations
    delete:
      summary: Remove Managing App from Location
      operationId: removeManagingAppFromVirtualLocation
      description: Remove managing app from location
      parameters:
        - name: virtual_location_id
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: Successful response
          content: {}
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/notFound'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/serverError'

      tags:
        - Virtual locations
  /orders/v1/orders:
    get:
      tags:
        - Orders
      summary: List all orders
      operationId: listOrders
      description: |-
        List all orders for the authenticated restaurant.

        This endpoint returns a list of orders, use the query parameters to paginate the results.
      parameters:
        - name: limit
          description: |
            Number of orders to return. Default is 25. Max is 100.
          in: query
          schema:
            type: integer
          example: 25
        - schema:
            type: string
            format: uuid
          in: query
          name: created_after
          description: |
            Filter orders created after a specific order
        - schema:
            type: string
            format: uuid
          in: query
          name: created_before
          description: |
            Filter orders created before a specific order
        - schema:
            type: string
            enum:
              - completed
              - void
              - draft
              - needs_approval
              - in_progress
              - waiting_for_pickup
          in: query
          name: status
          description: |
            Filter orders by order status. If not specified, returns all orders.
        - schema:
            type: string
            enum:
              - direct_sale
              - delivery
              - takeout
              - table_service
          in: query
          name: type
          description: |
            Filter orders by order type. If not specified, returns all orders.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: array
                x-examples:
                  Example 1:
                    id: 4c879e20-2e21-4a97-b9df-af28722a3f82
                    masterOrderId: null
                    dayOrderNumber: 5
                    internalOrderId: 538
                    customerCount: 2
                    customerName: María González
                    appId: acda48c0-80d3-4d78-b8e4-f644ae9bb2d6
                    externalOrderReference: APP-ORDER-12345
                    estimatedPickupAt: '2025-07-18T23:30:00.000Z'
                    pickedUpAt: '2025-07-18T23:30:00.000Z'
                    type: direct_sale
                    terminalId: null
                    restaurantId: d18dcccd-0dfc-4750-a240-43820e35bd69
                    virtualLocationId: ce8ae7bc-47da-48b7-b781-e584c0b5abb3
                    status: draft
                    vip: false
                    tableId: null
                    startedAt: null
                    finishedAt: null
                    totalAmount: 0
                    taxAmount: 0
                    subtotalAmount: 0
                    discountAmount: 0
                    itemsDiscountAmount: 0
                    seat: 3
                    voidReason: null
                    notes: Customer prefers fast service
                    voidedBy: null
                    voidedAt: null
                    metadata:
                      source: mobile_app
                      paymentMethod: efectivo
                    updatedAt: '2025-07-21T21:52:52.529Z'
                    createdAt: '2025-07-19T00:25:06.000Z'
                    deletedAt: null
                items:
                  type: object
                  properties:
                    id:
                      type: string
                      format: uuid
                    masterOrderId:
                      type: string
                    dayOrderNumber:
                      type: integer
                    internalOrderId:
                      type: integer
                    customerCount:
                      type: integer
                    customerName:
                      type: string
                    appId:
                      type: string
                      format: uuid
                    externalOrderReference:
                      type: string
                    estimatedPickupAt:
                      type: string
                      format: date-time
                    pickedUpAt:
                      type: string
                      format: date-time
                    type:
                      type: string
                    terminalId:
                      type: string
                    restaurantId:
                      type: string
                      format: uuid
                    virtualLocationId:
                      type: string
                      format: uuid
                    status:
                      type: string
                    vip:
                      type: boolean
                    tableId:
                      type: string
                    startedAt:
                      type: string
                      format: date-time
                    finishedAt:
                      type: string
                      format: date-time
                    totalAmount:
                      type: number
                      format: float
                    taxAmount:
                      type: number
                      format: float
                    subtotalAmount:
                      type: number
                      format: float
                    discountAmount:
                      type: number
                      format: float
                    itemsDiscountAmount:
                      type: number
                      format: float
                    seat:
                      type: integer
                      nullable: true
                    voidReason:
                      type: string
                      nullable: true
                    notes:
                      type: string
                    voidedBy:
                      type: string
                      format: uuid
                      nullable: true
                    voidedAt:
                      type: string
                      format: date-time
                      nullable: true
                    metadata:
                      type: object
                      properties:
                        source:
                          type: string
                        paymentMethod:
                          type: string
                    updatedAt:
                      type: string
                      format: date-time
                    createdAt:
                      type: string
                      format: date-time
                    deletedAt:
                      type: string
                      format: date-time
                      nullable: true
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/serverError'
    post:
      tags:
        - Orders
      summary: Upsert an order
      operationId: upsertOrder
      description: |-
        Create or update an order. By default, unless specified otherwise in the request, orders are created as draft and should be published to be visible to the kitchen. 

        This endpoint expects full order data, this means that if you first provide 3 order items and then only provide 2 order items, the last order item will be deleted.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/orderCreateBody'
      parameters: []
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/orderResponse'
  '/orders/v1/orders/{order_id}':
    get:
      tags:
        - Orders
      summary: Get an order
      operationId: getOrder
      description: |
        Retrieves detailed information about a specific order belonging to the authenticated restaurant.

        The response includes comprehensive order data with all related entities such as:
        - Order items with their modifiers and notes
        - Payment information
        - Table and virtual location details
        - Customer information
      parameters:
        - name: order_id
          in: path
          schema:
            type: string
          required: true
          example: f48e4b52-37c5-4b9a-a9d0-28054313c0cb
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/orderResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/notFound'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/serverError'

      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/orderResponse'
    parameters:
      - schema:
          type: string
        name: order_id
        in: path
        required: true
    delete:
      summary: Delete a draft order
      tags:
        - Orders
      description: Delete an order while it is still in draft status.
      responses:
        '200':
          description: Successful response
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/notFound'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/serverError'
      operationId: deleteDraftOrder
  '/orders/v1/orders/{order_id}/publish':
    post:
      tags:
        - Orders
      summary: Publish a draft order
      operationId: publishDraftOrder
      description: Publish a draft order
      requestBody:
        content: {}
      parameters: []
      responses:
        '200':
          description: Successful response
          content: {}
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/notFound'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/serverError'
    parameters:
      - schema:
          type: string
        name: order_id
        in: path
        required: true
  '/orders/v1/orders/{order_id}/finalize':
    post:
      tags:
        - Orders
      summary: Finalize an order
      operationId: finalizeOrder
      description: Finalize an order
      requestBody:
        content: {}
      parameters: []
      responses:
        '200':
          description: Successful response
          content: {}
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/notFound'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/serverError'
    parameters:
      - schema:
          type: string
        name: order_id
        in: path
        required: true
  '/orders/v1/orders/{order_id}/void':
    post:
      tags:
        - Orders
      summary: Void an order
      operationId: voidOrder
      description: Void an order
      requestBody:
        content: {}
      parameters: []
      responses:
        '200':
          description: Successful response
          content: {}
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/notFound'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/serverError'
    parameters:
      - schema:
          type: string
        name: order_id
        in: path
        required: true
  /menus/v1/taxes:
    get:
      tags:
        - Taxes
      summary: List all taxes

      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/tax'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/serverError'
      operationId: listTaxes
      description: Get all taxes
  /menus/v1/menu_groups:
    get:
      tags:
        - Menu groups
      summary: List all menu groups
      operationId: listMenuGroups
      description: |-
        Get all menu groups

        One and only one of chain_id/restaurant_id/virtual_location_id should be provided
      parameters:
        - schema:
            type: string
            enum:
              - menus
          in: query
          name: expand
          allowEmptyValue: false
        - schema:
            type: string
          in: query
          name: channel_id
        - schema:
            type: string
          in: query
          name: chain_id
        - schema:
            type: string
          in: query
          name: restaurant_id
        - schema:
            type: string
          in: query
          name: virtual_location_id
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/menuGroupsResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/badRequest'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/unauthorizedError'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/serverError'
    post:
      tags:
        - Menu groups
      summary: Create a menu group
      operationId: createMenuGroup
      description: Create a new menu group
      requestBody:
        content:
          application/json:
            schema:
              type: object
              x-examples:
                Example 1:
                  ownerId: 9e4e812d-849a-40ef-9a7e-5346e3370ffb
                  ownerType: chain
                  channelId: 70a9fa23-4e7a-11ee-86b0-4201ac1a5012
                  name: Menú prueba api publica
                  description: Menús disponibles para el desayuno
              properties:
                ownerId:
                  type: string
                  format: uuid
                ownerType:
                  enum:
                    - chain
                    - restaurant
                    - virtual_location
                channelId:
                  type: string
                  format: uuid
                name:
                  type: string
                description:
                  type: string

      parameters: []
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/menuGroupCreateResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/badRequest'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/unauthorizedError'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/notFound'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/serverError'
  '/menus/v1/menu_groups/{menu_group_id}':
    delete:
      tags:
        - Menu groups
      summary: Delete a menu group
      operationId: deleteMenuGroup
      description: Successful delete

      parameters:
        - name: menu_group_id
          in: path
          schema:
            type: string
          required: true
          example: 2db3cd39-b9ae-4f19-bdcf-2b7190050d3b
      responses:
        '200':
          description: Successful response
          content: {}
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/unauthorizedError'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties: {}
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/serverError'
    parameters:
      - schema: null
        type: string
        name: menu_group_id
        in: path
        required: true
    get:
      summary: Get a menu group
      tags:
        - Menu groups
      description: Retrieve a menu group by ID. Use `expand=menus` to include menus assigned to the group.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/menuGroupsResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties: {}
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/serverError'
      operationId: getMenuGroup
      parameters:
        - schema:
            type: string
            enum:
              - menus
          in: query
          name: expand

    put:
      summary: Update a menu group
      tags:
        - Menu groups
      description: Update a menu group name, description, owner, channel, or related menu group settings.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/menuGroupCreateResponse'
        '404':
          description: Not Found
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/notFound'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/serverError'
      operationId: updateMenuGroup
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/menuGroupUpdateBody'
  '/menus/v1/menus/{menu_id}/items/{item_id}':
    delete:
      tags:
        - Menu
      summary: Remove item from menu
      operationId: removeItemFromMenu
      description: Remove the relationship between an item and a menu without deleting the item itself.
      parameters:
        - name: menu_id
          in: path
          schema:
            type: string
          required: true
        - name: item_id
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: Successful response
          content: {}
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/notFound'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/serverError'
    parameters:
      - schema:
          type: string
        name: menu_id
        in: path
        required: true
      - schema:
          type: string
        name: item_id
        in: path
        required: true
    post:
      summary: Add item to menu
      tags:
        - Menu
      description: Add an existing item to a menu.
      responses:
        '200':
          description: Successful response
          content: {}
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/notFound'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/serverError'
      operationId: addItemToMenu
  '/menus/v1/menus/{menu_id}/items':
    post:
      tags:
        - Menu
      summary: Add bulk items to menu
      operationId: addItemsToMenu
      description: Add items to menu
      requestBody:
        content:
          application/json:
            schema:
              type: object
              example:
                items:
                  - 05a4aeed-a236-4e36-9cf7-1a72bb7ba9b8
                  - item_id_2
              properties:
                items:
                  type: array
                  description: Item ids
                  items:
                    type: string
      parameters:
        - name: menu_id
          in: path
          schema:
            type: string
          required: true
          example: b9184526-143a-46e9-b47d-e8f2e4ee1565
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/serverError'
  '/menus/v1/channels/{channel_id}/menus':
    get:
      tags:
        - Menu
      summary: Get Expanded Menu for Channel
      operationId: getExpandedMenusForChannel
      description: Get expanded menu for specific channel
      parameters:
        - name: channel_id
          in: path
          schema:
            type: string
          required: true
          example: channel_id
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/menuExpandedResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/notFound'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/serverError'
      
  /menus/v1/menus:
    get:
      tags:
        - Menu
      summary: List all menus
      operationId: listMenus
      description: |-
        Retrieves menus associated with a specific entity (chain, restaurant, or virtual location).
        This endpoint allows filtering menus by channel and expanding results to include related items.
        Authentication is required, and users can only access menus from owners they have permission to view.
        One and only one owner type (chain_id, restaurant_id, or virtual_location_id) must be provided.
      parameters:
        - schema:
            type: string
          in: query
          name: chain_id
        - schema:
            type: string
          in: query
          name: restaurant_id
        - schema:
            type: string
          in: query
          name: virtual_location_id
          allowEmptyValue: false
        - schema:
            type: string
          in: query
          name: channel_id
        - schema:
            type: string
          in: query
          name: expand
          description: 'You can expand response, items: add menu items'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/menuResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/unauthorizedError'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/serverError'

    post:
      tags:
        - Menu
      summary: Create a menu
      operationId: createMenu
      description: Create a new menu
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/menuCreateBody'
      parameters: []
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/menuCreateResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/badRequest'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/unauthorizedError'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/serverError'

  '/menus/v1/menus/{menu_id}':
    get:
      tags:
        - Menu
      summary: Get a menu
      description: Get specific menu
      parameters:
        - name: menu_id
          in: path
          schema:
            type: string
          required: true
        - schema:
            type: string
            enum:
              - items
          in: query
          name: expand
          description: expand response
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/menuGetOneResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/notFound'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/serverError'
      operationId: getMenu
      
    put:
      tags:
        - Menu
      summary: Update a menu
      operationId: updateMenu
      description: Update a menu
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/menuUpdateBody'
      parameters:
        - name: menu_id
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/menuCreateResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/badRequest'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/unauthorizedError'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/notFound'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/serverError'

    delete:
      tags:
        - Menu
      summary: Delete a menu
      operationId: deleteMenu
      description: Delete a menu

      parameters:
        - name: menu_id
          in: path
          schema:
            type: string
          required: true
          example: 033842d3-1f74-4885-9b9f-f9a18ac5053c
      responses:
        '200':
          description: Successful delete
          content: {}
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/badRequest'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/unauthorizedError'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/notFound'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/serverError'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/menuDeleteBody'
    parameters:
      - schema:
          type: string
        name: menu_id
        in: path
        required: true
  /menus/v1/menus/bulk:
    post:
      tags:
        - Menu
      summary: Bulk create menus
      description: Bulk create menus
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/menuBulkCreateBody'

      parameters: []
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/menuCreateResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/badRequest'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/unauthorizedError'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/serverError'
      operationId: bulkCreateMenus
  '/menus/v1/menus/{menu_id}/modifier_groups/{modifier_group_id}':
    post:
      tags:
        - Modifier groups
      summary: Add modifier group to a menu
      operationId: addModifierGroupToMenu
      description: Attach an existing modifier group to a menu so its modifiers are available in that menu context.
      
      parameters:
        - name: modifier_group_id
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: Successful response
          content: {}
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/notFound'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/serverError'
    parameters:
      - schema:
          type: string
        name: menu_id
        in: path
        required: true
      - schema:
          type: string
        name: modifier_group_id
        in: path
        required: true
  '/menus/v1/items/{item_id}/modifier_groups/{modifier_group_id}':
    post:
      tags:
        - Modifier groups
      summary: Add modifier group to an item
      operationId: addModifierGroupToItem
      description: Attach an existing modifier group to an item.
      requestBody:
        content: {}

      parameters:
        - name: item_id
          in: path
          schema:
            type: string
          required: true
        - name: modifier_group_id
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: Successful response
          content: {}
          headers: {}
        '404':
          description: Item or modifier group not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/notFound'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/serverError'
    parameters:
      - schema:
          type: string
        name: item_id
        in: path
        required: true
      - schema:
          type: string
        name: modifier_group_id
        in: path
        required: true
    delete:
      summary: Remove modifier group from an item
      tags:
        - Modifier groups
      description: Remove the relationship between an item and a modifier group without deleting either entity.
      responses:
        '200':
          description: Successful response
          content: {}
        '404':
          description: Item or modifier group not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/notFound'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/serverError'
      operationId: removeModifierGroupFromItem
  /menus/v1/items:
    post:
      tags:
        - Items
      summary: Create an item
      operationId: createItem
      description: Create a menu item with optional pricing data for a channel.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              x-examples:
                Example 1:
                  name: Margherita Pizza
                  image: 'https://example.com/images/margherita.jpg'
                  featured: true
                  description: 'Classic Italian pizza with tomato sauce, mozzarella, and fresh basil'
                  alergies: ss
                  preparationTime: 15
                  tags:
                    - pizza
                    - vegetarian
                    - italian
                  taxId: 1
                  price:
                    amount: 1299
                    info: Regular price
                    channelId: 1
              properties:
                name:
                  type: string
                image:
                  type: string
                featured:
                  type: boolean
                description:
                  type: string
                alergies:
                  type: string
                preparationTime:
                  type: integer
                tags:
                  type: array
                  items:
                    type: string
                taxId:
                  type: integer
                price:
                  type: object
                  properties:
                    amount:
                      type: number
                      format: float
                    info:
                      type: string
                    channelId:
                      type: string
                      format: uuid
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/itemWithoutPriceResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/serverError'
    get:
      summary: List all items
      tags:
        - Items
      description: List items available to the authenticated restaurant or owner context.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/itemWithoutPriceResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/serverError'
      operationId: listItems
  '/menus/v1/items/{item_id}':
    delete:
      tags:
        - Items
      summary: Delete an item

      responses:
        '200':
          description: Successful delete
          content: {}
          headers: {}
        '404':
          description: Item not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/notFound'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/serverError'
      operationId: deleteItem
      description: Delete an item
    parameters:
      - schema:
          type: string
        name: item_id
        in: path
        required: true
    put:
      summary: Update an item
      tags:
        - Items
      responses:
        '200':
          description: Successful update
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/itemWithoutPriceResponse'
        '404':
          description: Item not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/notFound'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/serverError'
      operationId: updateItem
      description: Update an item
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/itemUpdateBody'

    get:
      summary: Get an item
      description: |
        Returns a single item with optional price information

        If you want get Prices as well, you should provide

        - expand
        - locationId
        - locationType
      parameters:
        - name: item_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: ID of the item to retrieve
        - name: expand
          in: query
          schema:
            type: string
            enum:
              - prices
          description: "Comma-separated list of related entities to expand (e.g., 'prices')"
        - name: location_id
          in: query
          required: false
          schema:
            type: string
            format: uuid
          description: ID of the location to filter prices by
        - name: location_type
          in: query
          required: false
          schema:
            type: string
            enum:
              - restaurant
              - virtual_location
          description: Type of location
        - name: channel_id
          in: query
          required: false
          schema:
            type: string
            format: uuid
          description: ID of the channel to filter prices by
      responses:
        '200':
          description: Successful get
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/itemResponse'
        '404':
          description: Item not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/notFound'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/serverError'
      
      operationId: getItem
      tags:
        - Items
  /menus/v1/schedules:
    put:
      tags:
        - Schedules
      summary: Bulk update schedules
      operationId: bulkUpdateSchedules
      description: Replace the weekly schedule for a restaurant or virtual location. Times use HHMM integers such as `900` for 09:00 and `1730` for 17:30.
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                type: object
                properties:
                  day:
                    type: string
                  enabled:
                    type: boolean
                  inheritsFromOwnerId:
                    type: 'null'
                  hours:
                    type: array
                    items:
                      type: object
                      properties:
                        from:
                          type: integer
                        to:
                          type: integer
                        menuGroupId:
                          type: 'null'
              x-examples:
                Example 1:
                  - day: monday
                    enabled: true
                    inheritsFromOwnerId: null
                    hours:
                      - from: 900
                        to: 1400
                        menuGroupId: null
                      - from: 1600
                        to: 2200
                        menuGroupId: null
                  - day: tuesday
                    enabled: true
                    inheritsFromOwnerId: null
                    hours:
                      - from: 900
                        to: 2200
                        menuGroupId: null
                  - day: wednesday
                    enabled: true
                    inheritsFromOwnerId: null
                    hours:
                      - from: 900
                        to: 2200
                        menuGroupId: null
                  - day: thursday
                    enabled: true
                    inheritsFromOwnerId: null
                    hours:
                      - from: 900
                        to: 2200
                        menuGroupId: null
                  - day: friday
                    enabled: true
                    inheritsFromOwnerId: null
                    hours:
                      - from: 900
                        to: 2300
                        menuGroupId: null
                  - day: saturday
                    enabled: true
                    inheritsFromOwnerId: null
                    hours:
                      - from: 1000
                        to: 2300
                        menuGroupId: null
                  - day: sunday
                    enabled: true
                    inheritsFromOwnerId: null
                    hours:
                      - from: 1000
                        to: 2000
                        menuGroupId: null

      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: array
                x-examples:
                  Example 1:
                    - id: 29c28d06-ae85-484a-a74a-44104c647622
                      day: monday
                      ownerId: d18dcccd-0dfc-4750-a240-43820e35bd69
                      ownerType: restaurant
                      inheritsFromOwnerId: null
                      enabled: true
                      createdAt: '2025-01-23T01:19:55.000Z'
                      updatedAt: '2025-08-06T03:20:35.363Z'
                      deletedAt: null
                      hours:
                        - id: 49e09569-bad7-46d3-bafa-e5335039fa52
                          dayScheduleId: 29c28d06-ae85-484a-a74a-44104c647622
                          menuGroupId: null
                          from: 900
                          to: 1400
                          createdAt: '2025-08-06T03:20:34.000Z'
                          updatedAt: '2025-08-06T03:20:34.000Z'
                          deletedAt: null
                        - id: 73457bd9-d6fd-4913-930c-e4af2b635577
                          dayScheduleId: 29c28d06-ae85-484a-a74a-44104c647622
                          menuGroupId: null
                          from: 1600
                          to: 2200
                          createdAt: '2025-08-06T03:20:34.000Z'
                          updatedAt: '2025-08-06T03:20:34.000Z'
                          deletedAt: null
                    - id: 8775c94b-3f71-41af-bf00-29d6257c7960
                      day: tuesday
                      ownerId: d18dcccd-0dfc-4750-a240-43820e35bd69
                      ownerType: restaurant
                      inheritsFromOwnerId: null
                      enabled: true
                      createdAt: '2025-01-23T01:19:55.000Z'
                      updatedAt: '2025-08-06T03:20:35.397Z'
                      deletedAt: null
                      hours:
                        - id: c6e42b3b-113c-453d-bb07-47e39b3ae0fa
                          dayScheduleId: 8775c94b-3f71-41af-bf00-29d6257c7960
                          menuGroupId: null
                          from: 900
                          to: 2200
                          createdAt: '2025-08-06T03:20:34.000Z'
                          updatedAt: '2025-08-06T03:20:34.000Z'
                          deletedAt: null
                    - id: e03d58a8-c67a-4ad4-b8c1-0a1c89270929
                      day: wednesday
                      ownerId: d18dcccd-0dfc-4750-a240-43820e35bd69
                      ownerType: restaurant
                      inheritsFromOwnerId: null
                      enabled: true
                      createdAt: '2025-01-23T01:19:55.000Z'
                      updatedAt: '2025-08-06T03:20:35.112Z'
                      deletedAt: null
                      hours:
                        - id: dd6f9f92-eeea-4d3f-8b60-84045d2363f0
                          dayScheduleId: e03d58a8-c67a-4ad4-b8c1-0a1c89270929
                          menuGroupId: null
                          from: 900
                          to: 2200
                          createdAt: '2025-08-06T03:20:34.000Z'
                          updatedAt: '2025-08-06T03:20:34.000Z'
                          deletedAt: null
                    - id: 600836b3-77d8-48d8-b53d-60c61996cced
                      day: thursday
                      ownerId: d18dcccd-0dfc-4750-a240-43820e35bd69
                      ownerType: restaurant
                      inheritsFromOwnerId: null
                      enabled: true
                      createdAt: '2025-01-23T01:19:55.000Z'
                      updatedAt: '2025-08-06T03:20:35.446Z'
                      deletedAt: null
                      hours:
                        - id: 12dffed7-626e-4098-b9e7-418b88ad5c1d
                          dayScheduleId: 600836b3-77d8-48d8-b53d-60c61996cced
                          menuGroupId: null
                          from: 900
                          to: 2200
                          createdAt: '2025-08-06T03:20:35.000Z'
                          updatedAt: '2025-08-06T03:20:35.000Z'
                          deletedAt: null
                    - id: ea7ee14b-5e0b-4166-bdf5-d311dfe7e1db
                      day: friday
                      ownerId: d18dcccd-0dfc-4750-a240-43820e35bd69
                      ownerType: restaurant
                      inheritsFromOwnerId: null
                      enabled: true
                      createdAt: '2025-01-23T01:19:55.000Z'
                      updatedAt: '2025-08-06T03:20:35.316Z'
                      deletedAt: null
                      hours:
                        - id: 06998ca0-561a-49dd-8b69-8d02a6e488fd
                          dayScheduleId: ea7ee14b-5e0b-4166-bdf5-d311dfe7e1db
                          menuGroupId: null
                          from: 900
                          to: 2300
                          createdAt: '2025-08-06T03:20:34.000Z'
                          updatedAt: '2025-08-06T03:20:34.000Z'
                          deletedAt: null
                    - id: b79e0ab5-92f0-4d7a-84ea-217b22d559fd
                      day: saturday
                      ownerId: d18dcccd-0dfc-4750-a240-43820e35bd69
                      ownerType: restaurant
                      inheritsFromOwnerId: null
                      enabled: true
                      createdAt: '2025-01-23T01:19:55.000Z'
                      updatedAt: '2025-08-06T03:20:35.513Z'
                      deletedAt: null
                      hours:
                        - id: b0f32bf5-837c-4209-98af-37da79cdc81b
                          dayScheduleId: b79e0ab5-92f0-4d7a-84ea-217b22d559fd
                          menuGroupId: null
                          from: 1000
                          to: 2300
                          createdAt: '2025-08-06T03:20:35.000Z'
                          updatedAt: '2025-08-06T03:20:35.000Z'
                          deletedAt: null
                    - id: 942f90a3-36bf-4221-8e34-b87218f905e7
                      day: sunday
                      ownerId: d18dcccd-0dfc-4750-a240-43820e35bd69
                      ownerType: restaurant
                      inheritsFromOwnerId: null
                      enabled: true
                      createdAt: '2025-01-23T01:19:55.000Z'
                      updatedAt: '2025-08-06T03:20:35.386Z'
                      deletedAt: null
                      hours:
                        - id: eaf82b8e-9ae2-4de9-92dc-a9e1af3485a6
                          dayScheduleId: 942f90a3-36bf-4221-8e34-b87218f905e7
                          menuGroupId: null
                          from: 1000
                          to: 2000
                          createdAt: '2025-08-06T03:20:34.000Z'
                          updatedAt: '2025-08-06T03:20:34.000Z'
                          deletedAt: null
                items:
                  type: object
                  properties:
                    id:
                      type: string
                      format: uuid
                    day:
                      type: string
                    ownerId:
                      type: string
                      format: uuid
                    ownerType:
                      type: string
                    inheritsFromOwnerId:
                      nullable: true
                    enabled:
                      type: boolean
                    createdAt:
                      type: string
                      format: date-time
                    updatedAt:
                      type: string
                      format: date-time
                    deletedAt:
                      type: string
                      format: date-time
                      nullable: true
                    hours:
                      type: array
                      items:
                        type: object
                        properties:
                          id:
                            type: string
                            format: uuid
                          dayScheduleId:
                            type: string
                          menuGroupId:
                            type: string
                            format: uuid
                            nullable: true
                          from:
                            type: integer
                          to:
                            type: integer
                          createdAt:
                            type: string
                            format: date-time
                          updatedAt:
                            type: string
                            format: date-time
                          deletedAt:
                            nullable: true
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/serverError'
      parameters:
        - schema:
            type: string
          in: query
          name: restaurant_id
        - schema:
            type: string
          in: query
          name: virtual_location_id
    parameters: []
    get:
      summary: List all schedules
      tags:
        - Schedules
      description: List weekly schedules for the authenticated restaurant or a specific virtual location.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/schedulesResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/badRequest'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/unauthorizedError'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/serverError'
      operationId: listSchedules
      parameters:
        - schema:
            type: string
          in: query
          name: virtual_location_id
  /menus/v1/unavailable_entities:
    get:
      summary: List all unavailable entities
      description: Retrieves all unavailable entities for a specific owner (restaurant or virtual location)
      operationId: getUnavailableEntities
      parameters:
        - name: restaurant_id
          in: query
          description: 'ID of the restaurant to get unavailable entities for (deprecated, as the restaurant ID can be obtained from the authentication token)'
          required: false
          schema:
            type: string
            format: uuid
        - name: virtual_location_id
          in: query
          description: ID of the virtual location to get unavailable entities for
          required: false
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/UnavailableEntity'
        '401':
          description: Unauthorized - Invalid or missing authentication token
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Unauthorized
        '500':
          description: Server error or validation error
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Some error occurred while retrieving unavailable entities.
      tags:
        - Unavailable entities
    post:
      summary: Create an unavailable entity
      description: 'Marks an entity (item, modifier group, etc.) as temporarily unavailable for a specific owner (restaurant or virtual location)'
      operationId: createUnavailableEntity
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - ownerId
                - ownerType
                - entityId
                - entityType
                - unavailableUntil
              properties:
                ownerId:
                  type: string
                  format: uuid
                  description: ID of the owner (restaurant or virtual location) that marks the entity as unavailable
                ownerType:
                  type: string
                  enum:
                    - restaurant
                    - virtual_location
                  description: Type of the owner (restaurant or virtual location)
                entityId:
                  type: string
                  format: uuid
                  description: 'ID of the entity (item, modifier, etc.) that is marked as unavailable'
                entityType:
                  type: string
                  enum:
                    - item
                    - modifierGroup
                    - modifierItem
                  description: Type of the entity that is marked as unavailable
                unavailableUntil:
                  type: string
                  format: date-time
                  description: Date and time until which the entity is unavailable
      responses:
        '200':
          description: Unavailable entity created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnavailableEntity'
        '401':
          description: Unauthorized - Invalid or missing authentication token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/unauthorizedError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/serverError'
      tags:
        - Unavailable entities
  '/menus/v1/unavailable_entities/{unavailable_entity_id}':
    put:
      summary: Update an unavailable entity
      description: Update when a specific item, modifier group, or modifier item becomes available again.
      operationId: updateUnavailableEntity
      parameters:
        - name: unavailable_entity_id
          in: path
          description: ID of the unavailable entity to update
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                unavailableUntil:
                  type: string
                  format: date-time
                  description: 'The date and time until which the entity will be unavailable. If null, the entity will be available.'
              required:
                - unavailableUntil
      responses:
        '200':
          description: Unavailable entity updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnavailableEntity'
        '404':
          description: Entity not found
        '500':
          description: Error updating unavailable entity
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
      tags:
        - Unavailable entities
    delete:
      summary: Delete an unavailable entity
      description: Delete an unavailable-entity record, which makes the referenced entity available again.
      operationId: deleteUnavailableEntity
      parameters:
        - name: unavailable_entity_id
          in: path
          description: ID of the unavailable entity to delete
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Unavailable entity deleted successfully (set to available)
          content: {}
        '404':
          description: Entity not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/notFound'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/serverError'
      tags:
        - Unavailable entities
    parameters:
      - schema:
          type: string
        name: unavailable_entity_id
        in: path
        required: true
    get:
      summary: Get an unavailable entity
      description: Retrieves a specific unavailable entity by its ID
      operationId: getUnavailableEntity
      parameters:
        - name: unavailable_entity_id
          in: path
          description: ID of the unavailable entity to retrieve
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnavailableEntity'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/notFound'
        '500':
          description: Server error or entity not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/serverError'
      tags:
        - Unavailable entities
  /menus/v1/channels:
    get:
      summary: List all channels
      tags:
        - Channels
      description: List menu channels available to the authenticated restaurant or owner context.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/channelResponse'
        '500':
          description: Internal Server Error
      operationId: listChannels
  '/menus/v1/menu_groups/{menu_group_id}/menus/{menu_id}':
    parameters:
      - schema:
          type: string
        name: menu_group_id
        in: path
        required: true
      - schema:
          type: string
        name: menu_id
        in: path
        required: true
    delete:
      summary: Remove menu from menu group
      tags:
        - Menu groups
      description: Remove the relationship between a menu and a menu group without deleting the menu.
      responses:
        '200':
          description: Successful response
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/unauthorizedError'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/notFound'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/serverError'
      operationId: removeMenuFromMenuGroup
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/menuGroupRemoveMenuBody'
  '/menus/v1/menu_groups/{menu_group_id}/menus/{menu_id}/sorting_order':
    parameters:
      - schema:
          type: string
        name: menu_group_id
        in: path
        required: true
      - schema:
          type: string
        name: menu_id
        in: path
        required: true
    post:
      summary: Set sorting order to menu in a menu group
      tags:
        - Menu groups
      description: Move a menu before or after another menu within the same menu group.
      responses:
        '200':
          description: Successful response
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/badRequest'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/unauthorizedError'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties: {}
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/serverError'
      operationId: setMenuGroupMenuSortingOrder
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/menuGroupSetSortingOrderMenuBody'

  '/menus/v1/modifier_groups/{modifier_group_id}/modifier_items/{item_id}':
    parameters:
      - schema:
          type: string
        name: item_id
        in: path
        required: true
      - schema:
          type: string
        name: modifier_group_id
        in: path
        required: true
    get:
      summary: Get a modifier item
      responses:
        '200':
          description: OK
          content:
            application/xml:
              schema:
                $ref: '#/components/schemas/modifierItem'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/notFound'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/serverError'
      operationId: getModifierItem
      parameters:
        - schema:
            type: string
          in: query
          name: channel_id
        - schema:
            type: string
          in: query
          name: location_id
        - schema:
            type: string
            enum:
              - chain
              - restaurant
              - virtual_location
          in: query
          name: location_type
      description: |
        Retrieves a specific modifier item from a modifier group. This endpoint supports location-based pricing through query parameters.

        Query Parameters:
        - location_id: ID of the location to get specific pricing for
        - location_type: Type of location (restaurant, virtual_location)
        - channel_id: ID of the channel to get specific pricing for
      tags:
        - Modifier groups
    put:
      summary: Update a modifier item
      description: Update a modifier item's name, description, value, quantity constraint, or channel-specific price.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/modifierItemsUpdateResponse'
        '404':
          description: Not Found
        '500':
          description: Internal Server Error
      operationId: updateModifierItem
      tags:
        - Modifier groups
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/modifierItemUpdateBody'
  /menus/v1/size_groups:
    get:
      summary: List all size groups
      tags:
        - Size groups
      description: List size groups. Use `expand=sizes` to include sizes or `expand=items` to include assigned items.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/sizeGroupGetAllResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/serverError'
      operationId: listSizeGroups
      parameters:
        - schema:
            type: string
            enum:
              - sizes
              - items
          in: query
          name: expand

    post:
      summary: Create a size group
      tags:
        - Size groups
      description: Create a size group used to offer item size options such as small, medium, and large.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/sizeGroupCreateResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/serverError'
      operationId: createSizeGroup
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/sizeGroupCreateBody'
  '/menus/v1/size_groups/{size_group_id}':
    parameters:
      - schema:
          type: string
        name: size_group_id
        in: path
        required: true
      - schema:
          type: string
        name: size_group_id
        in: path
        required: true
      - schema:
          type: string
        name: size_group_id
        in: path
        required: true
    get:
      summary: Get a size group
      tags:
        - Size groups
      description: Retrieve a size group by ID.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/sizeGroupGetAllResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/notFound'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/serverError'
      operationId: getSizeGroup
    put:
      summary: Update a size group
      tags:
        - Size groups
      description: Update a size group name, default size, or related size group settings.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/sizeGroupUpdateResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/notFound'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/serverError'
      operationId: updateSizeGroup
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/sizeGroupUpdateBody'
    delete:
      summary: Delete a size group
      tags:
        - Size groups
      description: Delete a size group by ID.
      responses:
        '200':
          description: Successful response
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/notFound'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/serverError'
      operationId: deleteSizeGroup
  '/menus/v1/size_groups/{size_group_id}/sizes':
    parameters:
      - schema:
          type: string
        name: size_group_id
        in: path
        required: true
      - schema:
          type: string
        name: size_group_id
        in: path
        required: true
      - schema:
          type: string
        name: size_group_id
        in: path
        required: true
      - schema:
          type: string
        name: size_group_id
        in: path
        required: true
    post:
      summary: Add size to size group
      tags:
        - Size groups
      description: Add a size option to a size group with its price amount.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/sizeGroupCreateResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/notFound'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/serverError'
      operationId: addSizeToSizeGroup
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                amount:
                  type: number
                  format: float
              x-examples:
                Example 1:
                  name: vale
                  amount: 12

    delete:
      summary: Delete a size
      tags:
        - Size groups
      description: Delete a size option from a size group.
      responses:
        '200':
          description: OK
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/notFound'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/serverError'
      operationId: deleteSize
    put:
      summary: Update a size
      tags:
        - Size groups
      description: Update a size option name or amount inside a size group.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/sizeWithPricesResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/badRequest'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/notFound'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/serverError'
      operationId: updateSize
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                amount:
                  type: number
                  format: float
  '/menus/v1/size_groups/{size_group_id}/sizes/sorting_order':
    parameters:
      - schema:
          type: string
        name: size_group_id
        in: path
        required: true
      - schema:
          type: string
        name: size_group_id
        in: path
        required: true
    post:
      summary: Set size sorting order
      tags:
        - Size groups
      responses:
        '200':
          description: Successful response
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/badRequest'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/notFound'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/serverError'
      operationId: setSizeSortingOrder
      description: |-
        This endpoint is used to set the sorting order of sizes within a size group. The body requires at least one of these parameters:

            afterSizeId: The ID of the size that should appear before the size you're reordering
            beforeSizeId: The ID of the size that should appear after the size you're reordering

      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                beforeSizeId:
                  type: string
                  format: uuid
                afterSizeId:
                  type: string
                  format: uuid
  '/menus/v1/size_groups/{size_group_id}/items':
    parameters:
      - schema:
          type: string
        name: size_group_id
        in: path
        required: true
      - schema:
          type: string
        name: size_group_id
        in: path
        required: true
    post:
      summary: Assign size group to items
      tags:
        - Size groups
      description: Assign a size group to one or more items using an array of item IDs.
      responses:
        '200':
          description: Successful response
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/badRequest'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/notFound'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/serverError'
      operationId: assignSizeGroupToItems
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                type: string
    delete:
      summary: Remove size group from items
      tags:
        - Size groups
      description: Remove a size group assignment from one or more items using an array of item IDs.
      responses:
        '200':
          description: Successful response
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/badRequest'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/notFound'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/serverError'
      operationId: removeSizeGroupFromItems
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                type: string
