> ## Documentation Index
> Fetch the complete documentation index at: https://docs.spotdx.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List orders

> Get a list of your orders sorted by recently updated. Providing any query params will further filter the results to only those that match the query params.

<ResponseExample>
  ```json Response theme={null}
  [
    {
      "order_id": "O1234567",
      "status": "pending",
      "recipient": {
        "first_name": "Alice",
        "last_name": "Smith",
        "email": "alice123@gmail.com",
        "phone": "1234567890",
        "address": {
          "street1": "123 Main St",
          "street2": "Apt 1",
          "city": "San Francisco",
          "state": "CA",
          "country": "US",
          "zip": "94105"
        }
      },
      "created": "2023-01-01T04:30:11.222Z",
      "updated": "2023-01-01T04:30:11.222Z"
    }
  ]
  ```
</ResponseExample>


## OpenAPI

````yaml GET /api/v2/orders/
openapi: 3.0.3
info:
  title: Spot API v2
  version: 2.0.0
  description: API Docs for Spot API
servers:
  - url: https://app.spotdx.com
    description: Production
security: []
paths:
  /api/v2/orders/:
    get:
      description: >-
        Get a list of your orders sorted by recently updated. Providing any
        query params will further filter the results to only those that match
        the query params.
      operationId: api_v2_list_orders
      parameters:
        - in: query
          name: email
          schema:
            type: string
          description: Only retrieve orders associated with this email address.
        - in: query
          name: first_name
          schema:
            type: string
          description: Only retrieve orders associated with this first name.
        - in: query
          name: last_name
          schema:
            type: string
          description: Only retrieve orders associated with this last name.
        - in: query
          name: phone
          schema:
            type: string
          description: Only retrieve orders associated with this phone number.
        - in: query
          name: status
          schema:
            type: string
            enum:
              - canceled
              - completed
              - in_progress
              - pending
          description: Only retrieve orders that have this status.
        - in: query
          name: created_before
          schema:
            type: string
          description: >-
            Only retrieve orders created on or before this date. Format:
            YYYY-MM-DD
        - in: query
          name: created_after
          schema:
            type: string
          description: >-
            Only retrieve orders created on or after this date. Format:
            YYYY-MM-DD
        - in: query
          name: updated_before
          schema:
            type: string
          description: >-
            Only retrieve orders updated on or before this date. Format:
            YYYY-MM-DD
        - in: query
          name: updated_after
          schema:
            type: string
          description: >-
            Only retrieve orders updated on or after this date. Format:
            YYYY-MM-DD
        - in: query
          name: results
          description: Number of results to return. Must be in range 1-100. Default is 10.
          schema:
            type: integer
            minimum: 1
            maximum: 100
        - in: query
          name: offset
          description: The initial index from which to return the results.
          schema:
            type: integer
            minimum: 0
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/OrderSummary'
      security:
        - tokenAuth: []
components:
  schemas:
    OrderSummary:
      type: object
      properties:
        order_id:
          type: string
          description: The order's unique ID.
          example: O1234567
        status:
          $ref: '#/components/schemas/OrderStatus'
        recipient:
          $ref: '#/components/schemas/Recipient'
        created:
          type: string
          format: date-time
          description: The date and time the order was created.
          example: '2023-01-01T04:30:11.222Z'
        updated:
          type: string
          format: date-time
          description: The date and time the order was last updated.
          example: '2023-01-01T04:30:11.222Z'
    OrderStatus:
      type: string
      enum:
        - pending
        - in_progress
        - completed
        - canceled
    Recipient:
      type: object
      properties:
        first_name:
          type: string
          description: Recipient's first name.
          example: Alice
        last_name:
          type: string
          description: Recipient's last name.
          example: Smith
        email:
          type: string
          description: Recipient's email.
          example: alice123@gmail.com
        phone:
          type: string
          description: Recipient's phone number, as a string.
          example: '1234567890'
        address:
          $ref: '#/components/schemas/Address'
      required:
        - address
        - email
        - first_name
        - last_name
        - phone
    Address:
      type: object
      properties:
        street1:
          type: string
          description: Recipient's address.
          example: 123 Main St
        street2:
          description: Second line of recipient's address.
          type: string
          nullable: true
          example: Apt 1
        city:
          type: string
          description: Recipient's city of residence.
          example: San Francisco
        state:
          type: string
          description: Recipient's state of residence.
          example: CA
        country:
          type: string
          description: Recipient's country of residence.
          enum:
            - US
            - CA
          example: US
        zip:
          type: string
          description: Recipient's zip code.
          example: '94105'
      required:
        - street1
        - city
        - state
        - country
        - zip
  securitySchemes:
    tokenAuth:
      type: apiKey
      in: header
      name: Authorization
      description: Token-based authentication with required prefix "Token"

````