---
title: "List orders"
url: "https://kongair.terwilligar.com/apis/hot-diggity-dog/versions/7450374c-0e43-4067-b83d-ec33667f4a58/operations/listOrders"
---

> Full API specification: https://kongair.terwilligar.com/apis/hot-diggity-dog/versions/7450374c-0e43-4067-b83d-ec33667f4a58.md

# List orders

`GET` `/orders`

Operation ID: `listOrders`

Returns a list of all orders with pagination.

## Query parameters

- `limit` (integer, int32, optional) - Maximum number of items to return
- `offset` (integer, int32, optional) - Number of items to skip for pagination

## Responses

- `200` - Successful operation
- `400` - Invalid request

## OpenAPI definition

```yaml
openapi: 3.1.0
info:
  title: Hot Dog Stand API
  version: 1.0.0
servers:
  - url: https://hotdog.example.com/api/v1
    description: Main server
paths:
  /orders:
    get:
      summary: List orders
      description: Returns a list of all orders with pagination.
      operationId: listOrders
      tags:
        - Orders
      parameters:
        - name: limit
          in: query
          description: Maximum number of items to return
          schema:
            type: integer
            format: int32
            minimum: 1
            maximum: 100
            default: 20
        - name: offset
          in: query
          description: Number of items to skip for pagination
          schema:
            type: integer
            format: int32
            minimum: 0
            default: 0
      responses:
        "200":
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: "#/components/schemas/Order"
                  meta:
                    type: object
                    properties:
                      page:
                        type: object
                        properties:
                          offset:
                            type: integer
                            description: The offset used for pagination.
                          limit:
                            type: integer
                            description: The limit used for pagination.
                          total:
                            type: integer
                            description: The total number of items available.
                          estimated_total:
                            type: boolean
                            description: Indicates if the total is estimated.
        "400":
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
components:
  schemas:
    Order:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for the order
        items:
          type: array
          items:
            $ref: "#/components/schemas/OrderItem"
        status:
          type: string
          enum:
            - pending
            - confirmed
            - cancelled
            - completed
          description: Status of the order
        total_amount:
          type: number
          format: float
          description: Total amount of the order
      example:
        id: 5fa7b5a7-3a0a-4b8a-8b3a-4b8a5b5a7b5a
        items:
          - item_name: Hot Dog
            quantity: 2
            condiments:
              - mustard
              - relish
        status: pending
        total_amount: 10
    Error:
      type: object
      properties:
        code:
          type: string
          description: Error code
        message:
          type: string
          description: Error message
      example:
        code: 400
        message: Invalid request
    OrderItem:
      type: object
      properties:
        item_name:
          type: string
          description: Name of the item
        quantity:
          type: integer
          description: Quantity of the item
        condiments:
          type: array
          items:
            type: string
          description: List of condiments for the item
      example:
        item_name: Hot Dog
        quantity: 1
        condiments:
          - mustard
          - ketchup
```
