> ## Documentation Index
> Fetch the complete documentation index at: https://api-doc.xmenu.it/llms.txt
> Use this file to discover all available pages before exploring further.

# Orders list

> Retrieves a paginated list of restaurant orders. Orders can be filtered by date range.



## OpenAPI

````yaml openapi-en.json GET /orders/list
openapi: 3.1.0
info:
  title: xMenu API
  description: xMenu Public API - REST endpoints and webhook notifications
  version: 1.0.0
servers:
  - url: https://app.xmenu.it/api
    description: xMenu API Production
security: []
paths:
  /orders/list:
    get:
      tags:
        - Order Consultation
      summary: Orders list
      description: >-
        Retrieves a paginated list of restaurant orders. Orders can be filtered
        by date range.
      operationId: ordersList
      parameters:
        - name: restuid
          in: query
          required: false
          schema:
            type: string
          description: >-
            Restaurant unique identifier (not required with `X-Client-Id`
            authentication)
        - name: page
          in: query
          required: true
          schema:
            type: integer
            minimum: 1
          description: Page number to retrieve
        - name: pagesize
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 100
          description: 'Number of results per page (default: 100, maximum: 100)'
        - name: date_from
          in: query
          required: false
          schema:
            type: string
            format: date
          description: 'Orders from specified date (format: YYYY-MM-dd)'
        - name: date_to
          in: query
          required: false
          schema:
            type: string
            format: date
          description: 'Orders until specified date (format: YYYY-MM-dd)'
      responses:
        '200':
          description: Orders list retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrdersListResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
      security:
        - apiKey: []
        - clientId: []
          clientSecret: []
        - oauth2: []
components:
  schemas:
    OrdersListResponse:
      type: object
      required:
        - success
      properties:
        success:
          type: boolean
          description: 'Operation result: `true` if successful, `false` if failed'
        error:
          type: string
          description: >-
            Error code if the operation failed.


            See [Error codes](/docs/en/overview/error-codes) for general error
            codes that may also occur.
        message:
          type: string
          description: Human-readable error description if the operation failed
        page:
          type: integer
          description: Current page number (1-n)
        pagesize:
          type: integer
          description: Maximum number of elements per page
        total_count:
          type: integer
          description: Total count of results
        more:
          type: boolean
          description: '`false` = last page; `true` = more results exist'
        orders:
          type: array
          description: Array of order objects
          items:
            $ref: '#/components/schemas/Order'
    Order:
      type: object
      description: Order object containing all order details
      required:
        - uid
        - token
        - date
        - date_iso
        - number
        - order_number
        - client
        - details
        - dmethod
        - fee
        - payment_method
        - paid
        - total
        - currency
        - closed
      properties:
        uid:
          type: string
          description: Unique order identifier
        token:
          type: string
          description: Order token
        date:
          type: string
          description: Order arrival timestamp
        date_iso:
          type: string
          format: date-time
          description: Order arrival timestamp in ISO 8601 format
        subrestaurant_code:
          type: string
          description: Sub-restaurant code (for multi-location setups)
        subrestaurant_uid:
          type: string
          description: Sub-restaurant unique identifier
        number:
          type: integer
          description: Internal daily sequential number
        order_number:
          type: string
          description: Complete order number (e.g., LOC-42)
        client:
          $ref: '#/components/schemas/Client'
        details:
          type: array
          description: Products ordered with options and quantities
          items:
            $ref: '#/components/schemas/OrderDetail'
        notes:
          type: string
          description: Customer notes
        dmethod:
          type: string
          enum:
            - '0'
            - '1'
            - 0t
            - '20'
            - 0e-{id}
            - dcf-{id}
          description: |-
            Delivery method code:
            - `0`: Pickup
            - `1`: Delivery
            - `0t`: Table ordering
            - `20`: Pickup at a delivery point
            - `0e-{id}`: Event (e.g. 0e-123)
            - `dcf-{id}`: Custom method (e.g. dcf-456)
        pickup:
          $ref: '#/components/schemas/PickupInfo'
        delivery:
          $ref: '#/components/schemas/DeliveryInfo'
        payment_method:
          type: string
          enum:
            - cash
            - paypal
            - stripe
            - satispay
            - xpay
            - day
            - edenred
            - postfinance
            - postfinance_new
            - invoice
          description: |-
            Payment method used for the order:
            - `cash`: Cash on delivery
            - `paypal`: PayPal
            - `stripe`: Stripe
            - `satispay`: Satispay
            - `xpay`: Nexi XPay
            - `day`: Day meal vouchers
            - `edenred`: Edenred meal vouchers
            - `postfinance`: PostFinance
            - `postfinance_new`: PostFinance (new)
            - `invoice`: End-of-month invoice
        payment_method_sub:
          type: string
          enum:
            - cash
            - card
            - ticketrest
            - ticketrest-paper
            - ticketrest-electronic
          description: >-
            Payment sub-method for additional details (used when payment_method
            is cash):

            - `cash`: Cash

            - `card`: Debit/Credit card

            - `ticketrest`: Ticket Restaurant

            - `ticketrest-paper`: Ticket Restaurant (paper)

            - `ticketrest-electronic`: Ticket Restaurant (electronic)
        paid:
          type: boolean
          description: Payment status (true if already paid online)
        coupon:
          $ref: '#/components/schemas/Coupon'
        total:
          type: number
          description: Order total amount
        confirmation:
          $ref: '#/components/schemas/Confirmation'
        currency:
          type: string
          description: Currency code (e.g., EUR)
        closed:
          type: boolean
          description: 'Order status: false if active, true if archived'
    Client:
      type: object
      description: Customer data
      required:
        - uid
        - first_name
        - last_name
        - phone
        - email
      properties:
        uid:
          type: string
          description: Unique client identifier
        first_name:
          type: string
          description: Customer first name
        last_name:
          type: string
          description: Customer last name
        phone:
          type: string
          description: Customer phone number
        email:
          type: string
          format: email
          description: Customer email address
    OrderDetail:
      type: object
      description: Product ordered with options and quantity
      required:
        - product
        - options
        - price
        - price_options
        - quantity
        - total
      properties:
        product:
          $ref: '#/components/schemas/Product'
        options:
          type: array
          description: Selected product options
          items:
            $ref: '#/components/schemas/Option'
        price:
          type: number
          description: Base unit price
        price_options:
          type: number
          description: Price including selected options
        quantity:
          type: integer
          description: Quantity ordered
        free_quantity:
          type: integer
          description: Free quantity (from promotions)
        total:
          type: number
          description: Line item total
        notes:
          type: string
          description: Product-specific notes from customer
    PickupInfo:
      type: object
      description: Pickup timing information
      required:
        - date
        - date_iso
      properties:
        date:
          type: string
          description: Scheduled pickup date and time
        date_iso:
          type: string
          format: date-time
          description: Scheduled pickup date and time in ISO 8601 format
    DeliveryInfo:
      type: object
      description: Delivery timing and address information
      required:
        - date
        - address
        - fee
      properties:
        date:
          type: string
          description: Scheduled delivery date and time, or 'asap' for immediate delivery
        date_iso:
          type: string
          format: date-time
          description: >-
            Scheduled delivery date and time in ISO 8601 format (absent if date
            is 'asap')
        address:
          $ref: '#/components/schemas/Address'
        deliverypoint:
          $ref: '#/components/schemas/Deliverypoint'
        fee:
          type: number
          description: Delivery fee amount
    Coupon:
      type: object
      description: Applied discount coupon details
      required:
        - code
        - description
        - discount
        - auto
      properties:
        code:
          type: string
          description: Coupon code
        description:
          type: string
          description: Coupon description
        discount:
          type: number
          description: Discount amount
        auto:
          type: boolean
          description: Whether the coupon was applied automatically
    Confirmation:
      type: object
      description: >-
        Order confirmation system details (only present when confirmation system
        is active)
      required:
        - confirmed
        - countdown_time
        - countdown_started
        - closed
      properties:
        confirmed:
          type: boolean
          description: Whether the order has been confirmed
        date:
          type: string
          description: Confirmed delivery/pickup date and time
        date_iso:
          type: string
          format: date-time
          description: Confirmed delivery/pickup date and time in ISO 8601 format
        text:
          type: string
          description: Confirmation message sent to customer
        countdown_time:
          type: integer
          description: Countdown time in minutes
        countdown_started:
          oneOf:
            - type: string
            - type: boolean
              const: false
          description: Countdown start timestamp, or false if countdown has not started
        countdown_started_iso:
          type: string
          format: date-time
          description: Countdown start timestamp in ISO 8601 format
        countdown_end:
          type: string
          description: Countdown expiration timestamp
        countdown_end_iso:
          type: string
          format: date-time
          description: Countdown expiration timestamp in ISO 8601 format
        timeout:
          type: boolean
          description: Whether the order timed out (not confirmed in time)
        closed:
          type: boolean
          description: Whether the order is closed/archived
    Product:
      type: object
      description: Product information
      required:
        - uid
        - name
        - price
      properties:
        uid:
          type: string
          description: Unique product identifier
        name:
          type: string
          description: Product name
        price:
          type: number
          description: Product base price
        category:
          type: string
          description: Category name
        category_uid:
          type: string
          description: Category unique identifier
        offline_uid:
          type: string
          description: External POS/management system identifier
        ext_id:
          $ref: '#/components/schemas/ExtId'
    Option:
      type: object
      description: Product option with selected values
      required:
        - uid
        - name
        - type
        - values
      properties:
        uid:
          type: string
          description: Option unique identifier
        name:
          type: string
          description: Option title
        type:
          type: string
          enum:
            - single
            - multiple
          description: |-
            Option type:
            - `single`: Single choice
            - `multiple`: Multiple choice
        ext_id:
          $ref: '#/components/schemas/ExtId'
        values:
          type: array
          description: Selected option values
          items:
            $ref: '#/components/schemas/OptionValue'
    Address:
      type: object
      description: Delivery address
      required:
        - street
        - number
        - city
        - province
        - zip
        - country
        - place_id
        - lat
        - lng
        - kms
      properties:
        street:
          type: string
          description: Street name
        number:
          type: string
          description: Street number
        doorbell:
          type: string
          description: Doorbell name
        floor:
          type: string
          description: Floor number
        city:
          type: string
          description: City
        quarter:
          type: string
          description: Neighborhood/Quarter
        province:
          type: string
          description: Province/State
        zip:
          type: string
          description: ZIP/Postal code
        country:
          type: string
          description: Country
        place_id:
          type: string
          description: Unique validated address identifier
        lat:
          type: number
          description: Latitude coordinate
        lng:
          type: number
          description: Longitude coordinate
        kms:
          type: number
          description: Distance in kilometers from restaurant
    Deliverypoint:
      type: object
      description: Pre-configured delivery point
      required:
        - name
        - full_address
      properties:
        name:
          type: string
          description: Delivery point name
        full_address:
          type: string
          description: Complete delivery point address
    ExtId:
      type: string
      description: >-
        Available when authenticating via API Client: External ID passed during
        menu import
    OptionValue:
      type: object
      description: Selected option value
      required:
        - uid
        - name
        - price_operator
        - price_operand
        - quantity
      properties:
        uid:
          type: string
          description: Option value unique identifier
        name:
          type: string
          description: Option value name
        price_operator:
          type: string
          enum:
            - +
            - '-'
            - '*'
            - /
          description: |-
            Price modification operator:
            - `+`: Addition
            - `-`: Subtraction
            - `*`: Multiplication
            - `/`: Division
        price_operand:
          type: number
          description: Price modification value
        quantity:
          type: integer
          description: Selected quantity
        offline_uid:
          type: string
          description: External POS/management system identifier
        ext_id:
          $ref: '#/components/schemas/ExtId'
  responses:
    Unauthorized:
      description: Authentication failed.
      content:
        application/json:
          schema:
            oneOf:
              - type: object
                description: >-
                  Standard error format (when using API Key or Client ID/Secret
                  authentication)
                required:
                  - success
                  - error
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                    description: Always false for errors
                  error:
                    type: string
                    enum:
                      - RESTAURANT_NOT_FOUND
                      - INVALID_KEY
                      - INVALID_AUTH
                    description: Error code
                  message:
                    type: string
                    description: Human-readable error description
              - type: object
                description: OAuth error format (when using Bearer token authentication)
                required:
                  - error
                properties:
                  error:
                    type: string
                    enum:
                      - invalid_token
                      - invalid_request
                    description: OAuth error code (RFC 6749)
                  error_description:
                    type: string
                    description: Human-readable error description
          examples:
            standard:
              summary: Standard error format (API Key / Client ID+Secret)
              value:
                success: false
                error: INVALID_KEY
                message: The provided API key is not valid
            oauth:
              summary: OAuth error format (Bearer token)
              value:
                error: invalid_token
                error_description: Access token is invalid or expired
    Forbidden:
      description: Authorization failed - insufficient permissions or access denied.
      content:
        application/json:
          schema:
            oneOf:
              - type: object
                description: >-
                  Standard error format (when using API Key or Client ID/Secret
                  authentication)
                required:
                  - success
                  - error
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                    description: Always false for errors
                  error:
                    type: string
                    enum:
                      - API_DISABLED
                      - INSUFFICIENT_SCOPE
                      - UNAUTHORIZED
                    description: Error code
                  message:
                    type: string
                    description: Human-readable error description
              - type: object
                description: OAuth error format (when using Bearer token authentication)
                required:
                  - error
                properties:
                  error:
                    type: string
                    enum:
                      - insufficient_scope
                      - invalid_request
                    description: OAuth error code (RFC 6749)
                  error_description:
                    type: string
                    description: Human-readable error description
          examples:
            standard:
              summary: Standard error format (API Key / Client ID+Secret)
              value:
                success: false
                error: API_DISABLED
                message: API access is not enabled for the restaurant
            oauth:
              summary: OAuth error format (Bearer token)
              value:
                error: insufficient_scope
                error_description: 'Missing required permissions: write:orders'
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-Api-Key
      description: >-
        Restaurant API Key. Can be obtained from Tools > API Access in the xMenu
        dashboard.
    clientId:
      type: apiKey
      in: header
      name: X-Client-Id
      description: >-
        Client ID for API Client authentication (must be used together with
        Client Secret)
    clientSecret:
      type: apiKey
      in: header
      name: X-Client-Secret
      description: >-
        Client Secret for API Client authentication (must be used together with
        Client ID)
    oauth2:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://app.xmenu.it/oauth/token
          scopes: {}
      description: >-
        OAuth 2.0 authentication using client credentials flow. The access token
        must be included in the Authorization header as a Bearer token.

````