
operationId: listOrders
summary: List orders
tags:
  -  orders

parameters:
  - $ref: ../../components/header-parameters/tenant-subdomain.yml
  - $ref: ../../components/query-parameters/page.yml
  - $ref: ../../components/query-parameters/page-size.yml
  - $ref: ../../components/query-parameters/order-type.yml
  - $ref: ../../components/query-parameters/order-by/order.yml
  - $ref: ../../components/query-parameters/filters/order.yml

responses:
  200:
    description: Success
    content:
      application/json:
        schema:
          type: object
          properties:
            total:
              type: number
            results:
              type: array
              items:
                allOf:
                  - $ref: ../../components/schemas/entities/order/properties.yml
                  - $ref: ../../components/schemas/entities/order/relations.yml

  400:
    $ref: ../../components/responses/400-bad-request.yml
