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

# List orders

> Returns a paginated list of orders for the current store.

**Required scope:** `read_orders` (for API-key authentication).



## OpenAPI

````yaml /api-reference/admin.yaml get /api/v3/admin/orders
openapi: 3.0.3
info:
  title: Admin API
  contact:
    name: Spree Commerce
    url: https://spreecommerce.org
    email: hello@spreecommerce.org
  description: >
    Spree Admin API v3 - Administrative API for managing products, orders, and
    store settings.


    ## Authentication


    The Admin API requires a secret API key passed in the `x-spree-api-key`
    header.

    Secret API keys can be generated in the Spree admin dashboard.


    ## Response Format


    All responses are JSON. List endpoints return paginated responses with
    `data` and `meta` keys.

    Single resource endpoints return a flat JSON object.


    ## Resource IDs


    Every resource is identified by an opaque string ID (e.g. `prod_86Rf07xd4z`,

    `variant_k5nR8xLq`, `or_UkLWZg9DAJ`). Use these IDs everywhere — URL paths,

    request bodies, and Ransack filters all accept them directly.


    ## Error Handling


    Errors return a consistent format:

    ```json

    {
      "error": {
        "code": "validation_error",
        "message": "Validation failed",
        "details": { "name": ["can't be blank"] }
      }
    }

    ```
  version: v3
servers:
  - url: http://{defaultHost}
    variables:
      defaultHost:
        default: localhost:3000
security: []
tags:
  - name: Authentication
    description: Admin user login, logout, token refresh, and current user profile
  - name: Allowed Origins
    description: CORS allowlist for storefront and admin client origins
  - name: API Keys
    description: Secret and publishable API keys
  - name: Categories
    description: >-
      Hierarchical product categories — tree management, repositioning, and
      product assignments
  - name: Channels
    description: >-
      Sales channels, product publication across channels, and per-channel order
      routing rules
  - name: Custom Fields
    description: >-
      Custom field definitions for products, variants, customers, and other
      resources
  - name: Customer Groups
    description: >-
      Customer groups for segmenting customers (e.g. wholesale, VIP) used by
      pricing and promotions
  - name: Customers
    description: Customer profiles, addresses, credit cards, and store credits
  - name: Exports
    description: Async CSV exports of admin resources
  - name: Fulfillments
    description: Order fulfillments — shipments, fulfill, cancel, resume, split
  - name: Gift Cards
    description: Gift cards and gift card batches
  - name: Imports
    description: >-
      Async CSV imports of admin resources, with per-row status and failed-row
      retry
  - name: Markets
    description: >-
      Markets — geographic groupings of countries used for pricing, tax, and
      fulfillment rules
  - name: Option Types
    description: >-
      Option types and option values used to build product variants (e.g. Size,
      Color)
  - name: Orders
    description: Orders, order items, applied gift cards, and applied store credits
  - name: Payment Methods
    description: Configured payment providers and their available types
  - name: Payments
    description: Order payments — list, capture, void
  - name: Pricing
    description: >-
      Prices and price lists for currency-, market-, and customer-group-specific
      pricing
  - name: Products
    description: >-
      Products, taxons/categories, product custom field values, and bulk product
      operations
  - name: Promotions
    description: Promotions, promotion rules, promotion actions, and coupon codes
  - name: Refunds
    description: Order refunds
  - name: Settings
    description: Store-level settings — store profile, tags, store credit categories
  - name: Staff
    description: Admin users, roles, and invitations to the store
  - name: Stock Locations
    description: Warehouses and physical fulfillment locations
  - name: Variants
    description: >-
      Product variants — the individual SKUs (size/color combinations) sold
      under a product
  - name: Webhooks
    description: Webhook endpoints and webhook delivery history
paths:
  /api/v3/admin/orders:
    get:
      tags:
        - Orders
      summary: List orders
      description: |-
        Returns a paginated list of orders for the current store.

        **Required scope:** `read_orders` (for API-key authentication).
      parameters:
        - name: x-spree-api-key
          in: header
          required: true
          schema:
            type: string
        - name: Authorization
          in: header
          required: true
          description: Bearer token for admin authentication
          schema:
            type: string
        - name: page
          in: query
          required: false
          description: Page number
          schema:
            type: integer
        - name: limit
          in: query
          required: false
          description: Number of records per page
          schema:
            type: integer
        - name: sort
          in: query
          required: false
          description: Sort field (e.g., created_at, -created_at, completed_at)
          schema:
            type: string
        - name: q[state_eq]
          in: query
          required: false
          description: >-
            Filter by state (cart, address, delivery, payment, confirm,
            complete, canceled)
          schema:
            type: string
        - name: q[email_cont]
          in: query
          required: false
          description: Filter by email (contains)
          schema:
            type: string
        - name: q[number_eq]
          in: query
          required: false
          description: Filter by order number
          schema:
            type: string
        - name: q[completed_at_gt]
          in: query
          required: false
          description: Filter by completed after date
          schema:
            type: string
        - name: expand
          in: query
          required: false
          description: >-
            Comma-separated associations to expand (e.g., items, fulfillments,
            payments, customer, discounts, billing_address, shipping_address).
            Use dot notation for nested expand (max 4 levels).
          schema:
            type: string
        - name: fields
          in: query
          required: false
          description: >-
            Comma-separated list of fields to include (e.g.,
            number,total,status,completed_at). id is always included.
          schema:
            type: string
      responses:
        '200':
          description: orders found
          content:
            application/json:
              example:
                data:
                  - id: or_UkLWZg9DAJ
                    market_id: null
                    channel_id: ch_UkLWZg9DAJ
                    number: R342068818
                    email: meda@little.ca
                    customer_note: null
                    currency: USD
                    locale: en
                    total_quantity: 0
                    fulfillment_status: null
                    payment_status: null
                    completed_at: null
                    item_total: '0.0'
                    display_item_total: $0.00
                    adjustment_total: '0.0'
                    display_adjustment_total: $0.00
                    discount_total: '0.0'
                    display_discount_total: $0.00
                    tax_total: '0.0'
                    display_tax_total: $0.00
                    included_tax_total: '0.0'
                    display_included_tax_total: $0.00
                    additional_tax_total: '0.0'
                    display_additional_tax_total: $0.00
                    total: '0.0'
                    display_total: $0.00
                    gift_card_total: '0.0'
                    display_gift_card_total: $0.00
                    amount_due: '0.0'
                    display_amount_due: $0.00
                    delivery_total: '0.0'
                    display_delivery_total: $0.00
                    store_credit_total: '0.0'
                    display_store_credit_total: $0.00
                    covered_by_store_credit: false
                    gift_card: null
                    market: null
                    status: draft
                    last_ip_address: null
                    considered_risky: false
                    confirmation_delivered: false
                    store_owner_notification_delivered: null
                    payment_total: '0.0'
                    display_payment_total: $0.00
                    metadata: {}
                    canceled_at: null
                    approved_at: null
                    created_at: '2026-07-24T18:11:41.028Z'
                    updated_at: '2026-07-24T18:11:41.028Z'
                    preferred_stock_location_id: null
                    tags: []
                    internal_note: null
                    approver_id: null
                    canceler_id: null
                    created_by_id: null
                    customer_id: cus_UkLWZg9DAJ
                meta:
                  page: 1
                  limit: 25
                  count: 1
                  pages: 1
                  from: 1
                  to: 1
                  in: 1
                  previous: null
                  next: null
        '401':
          description: unauthorized
          content:
            application/json:
              example:
                error:
                  code: authentication_required
                  message: Authentication required
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - api_key: []
          bearer_auth: []
      x-codeSamples:
        - lang: javascript
          label: Spree Admin SDK
          source: |-
            import { createAdminClient } from '@spree/admin-sdk'

            const client = createAdminClient({
              baseUrl: 'https://your-store.com',
              secretKey: 'sk_xxx',
            })

            const { data: orders, meta } = await client.orders.list({
              status_eq: 'complete',
              completed_at_gt: '2026-01-01',
              sort: '-completed_at',
              limit: 25,
            })
        - lang: bash
          label: Spree CLI
          source: >-
            spree api get /orders -d
            '{"status_eq":"complete","completed_at_gt":"2026-01-01","sort":"-completed_at","limit":25}'
components:
  schemas:
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: record_not_found
            message:
              type: string
              example: Record not found
            details:
              type: object
              description: Field-specific validation errors
              nullable: true
              example:
                name:
                  - is too short
                  - is required
                email:
                  - is invalid
          required:
            - code
            - message
      required:
        - error
      example:
        error:
          code: validation_error
          message: Validation failed
          details:
            name:
              - is too short
            email:
              - is invalid
  securitySchemes:
    api_key:
      type: apiKey
      name: x-spree-api-key
      in: header
      description: Secret API key for admin access
    bearer_auth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT token for admin user authentication

````