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

# List orders

> The store's orders, a page at a time, newest first unless sorted otherwise. `meta.statusCounts` says how many orders are in each status, and `meta.stats` what the orders matched come to.

Needs the `orders.read` permission (Read Orders).



## OpenAPI

````yaml /api-reference/openapi.json get /stores/{storeId}/orders
openapi: 3.1.0
info:
  title: Shoply API
  version: '1'
  description: >-
    Everything a store's own server can do with a secret API key: its catalogue,
    orders, customers, marketing, finance and the rest of what the dashboard
    does. And the Customer API, which a buyer's own device asks with a token of
    theirs.
servers:
  - url: https://api.shoply.gg/v1
security:
  - apiKey: []
tags:
  - name: API key
  - name: Store
  - name: Domain
  - name: Payment methods
  - name: Analytics
  - name: Storefronts
  - name: Storefront code
  - name: Payment Routing
  - name: Custom payment methods
  - name: Products
  - name: Product pictures
  - name: Stock
  - name: Categories
  - name: Upsells
  - name: Subscriptions
  - name: Orders
  - name: Invoices
  - name: Reviews
  - name: Coupons
  - name: Coupon categories
  - name: Coupon pop-up
  - name: Sales
  - name: Blog
  - name: Search settings
  - name: Redirects
  - name: Sitemap
  - name: Cart Recovery
  - name: Email Marketing
  - name: Email Templates
  - name: Customers
  - name: Affiliates
  - name: Support Tickets
  - name: Blacklist
  - name: Fraud protection
  - name: Disputes
  - name: Finance
  - name: Tax
  - name: Expenses
  - name: Expense setup
  - name: API requests
  - name: Webhook endpoints
  - name: Webhook deliveries
  - name: Customer API
paths:
  /stores/{storeId}/orders:
    get:
      tags:
        - Orders
      summary: List orders
      description: >-
        The store's orders, a page at a time, newest first unless sorted
        otherwise. `meta.statusCounts` says how many orders are in each status,
        and `meta.stats` what the orders matched come to.


        Needs the `orders.read` permission (Read Orders).
      operationId: orders.list
      parameters:
        - name: storeId
          in: path
          required: true
          description: >-
            The store's ID. A key reaches the store it was made in: `GET /key`
            answers which.
          schema:
            type: string
        - name: page
          in: query
          required: false
          description: Which page of the list. The first is 1.
          schema:
            type: integer
            default: 1
        - name: perPage
          in: query
          required: false
          description: How many a page holds, up to 100.
          schema:
            type: integer
            default: 20
        - name: status
          in: query
          required: false
          description: Only orders in this status.
          schema:
            type: string
            enum:
              - pending
              - completed
              - refunded
              - cancelled
              - chargeback
        - name: gateway
          in: query
          required: false
          description: >-
            Only orders paid with this payment method, by its name in the
            payment methods list.
          schema:
            type: string
            example: stripe
        - name: search
          in: query
          required: false
          description: An order's ID, or part of a buyer's email.
          schema:
            type: string
        - name: sort
          in: query
          required: false
          description: What the list is ordered by.
          schema:
            type: string
            enum:
              - created_at
              - amount
              - email
              - status
            default: created_at
        - name: direction
          in: query
          required: false
          description: Which way it is ordered.
          schema:
            type: string
            enum:
              - asc
              - desc
            default: desc
        - name: range
          in: query
          required: false
          description: Only orders placed in this period.
          schema:
            type: string
            enum:
              - today
              - yesterday
              - 7d
              - 30d
              - this_week
              - last_week
              - this_month
              - last_month
              - this_year
        - name: from
          in: query
          required: false
          description: >-
            Only orders placed on or after this day, as `YYYY-MM-DD`. With `to`,
            in place of `range`.
          schema:
            type: string
            example: '2026-10-01'
        - name: to
          in: query
          required: false
          description: Only orders placed on or before this day, as `YYYY-MM-DD`.
          schema:
            type: string
            example: '2026-10-31'
        - name: tz
          in: query
          required: false
          description: >-
            The time zone the days of `range`, `from` and `to` are in, as an
            IANA name. Left out, UTC.
          schema:
            type: string
            example: Europe/Berlin
      responses:
        '200':
          description: It worked.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  message:
                    nullable: true
                  code:
                    nullable: true
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        dateCreated:
                          type: string
                        email:
                          type: string
                        customerId:
                          type: string
                        productId:
                          type: string
                        productName:
                          type: string
                        variantId:
                          type: string
                        variantName:
                          type: string
                        itemCount:
                          type: integer
                        subtotal:
                          type: number
                        discount:
                          type: integer
                        fee:
                          type: integer
                        balanceUsed:
                          type: integer
                        tax:
                          nullable: true
                        amount:
                          type: number
                        currencyCode:
                          type: string
                        charged:
                          nullable: true
                        status:
                          type: string
                        gateway:
                          type: string
                        couponCode:
                          nullable: true
                        returning:
                          type: boolean
                        country:
                          nullable: true
                        billing:
                          type: object
                          properties:
                            name:
                              type: string
                            line1:
                              type: string
                            line2:
                              type: string
                            city:
                              type: string
                            state:
                              type: string
                            postalCode:
                              type: string
                            country:
                              type: string
                        ip:
                          nullable: true
                        userAgent:
                          nullable: true
                        source:
                          type: string
                        subscriptionId:
                          nullable: true
                        transactionId:
                          nullable: true
                        paidAt:
                          nullable: true
                        note:
                          type: string
                        customFields:
                          type:
                            - array
                            - object
                        emailState:
                          type: string
                        emailError:
                          type: string
                        emailAttempts:
                          type: integer
                        emailSentAt:
                          nullable: true
                        notifyState:
                          type: string
                        notifyError:
                          type: string
                        notifyAttempts:
                          type: integer
                        notifySentAt:
                          nullable: true
                        summary:
                          type: string
                        items:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: string
                              productId:
                                type: string
                              productName:
                                type: string
                              variantId:
                                type: string
                              variantName:
                                type: string
                              amount:
                                type: number
                              unitPrice:
                                type: number
                              quantity:
                                type: integer
                              lineTotal:
                                type: number
                              upsellId:
                                nullable: true
                              addonOf:
                                nullable: true
                              deliveredKeys:
                                type:
                                  - array
                                  - object
                              redeliveryCount:
                                type: integer
                              lastRedeliveredAt:
                                nullable: true
                              deliveryInstructions:
                                type: string
                              dynamicState:
                                type: string
                              dynamicMessage:
                                type: string
                              dynamicItems:
                                type:
                                  - array
                                  - object
                              previousDynamicItems:
                                type:
                                  - array
                                  - object
                              dynamicDeliveredAt:
                                nullable: true
                              dynamicError:
                                type: string
                              dynamicAttempts:
                                type: integer
                        invoice:
                          nullable: true
                  pages:
                    type: integer
                  total:
                    type: integer
                  meta:
                    type: object
                    properties:
                      stats:
                        type: object
                        properties:
                          revenue:
                            type: integer
                          pendingValue:
                            type: number
                          count:
                            type: integer
                      statusCounts:
                        type: object
                        properties:
                          completed:
                            type: integer
                          pending:
                            type: integer
                          refunded:
                            type: integer
                          cancelled:
                            type: integer
                          chargeback:
                            type: integer
                          all:
                            type: integer
                      statuses:
                        type: array
                        items:
                          type: string
                      gateways:
                        type:
                          - array
                          - object
                      currencyCode:
                        type: string
              example:
                success: true
                message: null
                code: null
                data:
                  - id: eab50b8e-fca6-4712-9b55-2f910b4bddf0
                    dateCreated: '2026-10-22T16:20:19Z'
                    email: ada@example.com
                    customerId: f637fc21-973d-43ec-a7db-f819a9ebf73a
                    productId: f463e265-097a-4235-bc2f-5239b19a9874
                    productName: Northwind Pro
                    variantId: 00e1d395-9ba2-4db3-900a-cb5e2811a2a9
                    variantName: 1 month
                    itemCount: 1
                    subtotal: 9.99
                    discount: 0
                    fee: 0
                    balanceUsed: 0
                    tax: null
                    amount: 9.99
                    currencyCode: USD
                    charged: null
                    status: pending
                    gateway: ''
                    couponCode: null
                    returning: false
                    country: null
                    billing:
                      name: ''
                      line1: ''
                      line2: ''
                      city: ''
                      state: ''
                      postalCode: ''
                      country: ''
                    ip: null
                    userAgent: null
                    source: storefront
                    subscriptionId: null
                    transactionId: null
                    paidAt: null
                    note: ''
                    customFields: []
                    emailState: ''
                    emailError: ''
                    emailAttempts: 0
                    emailSentAt: null
                    notifyState: ''
                    notifyError: ''
                    notifyAttempts: 0
                    notifySentAt: null
                    summary: Northwind Pro (1 month)
                    items:
                      - id: '272733'
                        productId: f463e265-097a-4235-bc2f-5239b19a9874
                        productName: Northwind Pro
                        variantId: 00e1d395-9ba2-4db3-900a-cb5e2811a2a9
                        variantName: 1 month
                        amount: 9.99
                        unitPrice: 9.99
                        quantity: 1
                        lineTotal: 9.99
                        upsellId: null
                        addonOf: null
                        deliveredKeys: []
                        redeliveryCount: 0
                        lastRedeliveredAt: null
                        deliveryInstructions: ''
                        dynamicState: ''
                        dynamicMessage: ''
                        dynamicItems: []
                        previousDynamicItems: []
                        dynamicDeliveredAt: null
                        dynamicError: ''
                        dynamicAttempts: 0
                    invoice: null
                pages: 1
                total: 1
                meta:
                  stats:
                    revenue: 0
                    pendingValue: 9.99
                    count: 1
                  statusCounts:
                    completed: 0
                    pending: 1
                    refunded: 0
                    cancelled: 0
                    chargeback: 0
                    all: 1
                  statuses:
                    - completed
                    - pending
                  gateways: []
                  currencyCode: USD
        '401':
          $ref: '#/components/responses/NoKey'
        '403':
          $ref: '#/components/responses/NotAllowed'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooMany'
      x-codeSamples:
        - lang: javascript
          label: Node.js
          source: |
            import Shoply from "@shoplygg/node";

            const shoply = new Shoply({ apiKey: process.env.SHOPLY_API_KEY });

            const page = await shoply.orders.list();

            // Or every row of every page:
            for await (const row of shoply.orders.list()) {
              console.log(row);
            }
        - lang: php
          label: PHP
          source: |
            <?php

            require 'vendor/autoload.php';

            $shoply = new Shoply\Client(['apiKey' => getenv('SHOPLY_API_KEY')]);

            $page = $shoply->orders->list();

            // Or every row of every page:
            foreach ($shoply->orders->list() as $row) {
                print_r($row);
            }
        - lang: python
          label: Python
          source: |
            import shoply

            client = shoply.Client()  # reads SHOPLY_API_KEY

            page = client.orders.list()

            # Or every row of every page:
            for row in client.orders.list():
                print(row)
components:
  responses:
    NoKey:
      description: >-
        No API key was sent, or the one sent is not a live key:
        `api_key_required`, `invalid_api_key`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Refusal'
    NotAllowed:
      description: >-
        The key is real and may not do this: `missing_scope` (with
        `requiredScope`), `ip_not_allowed`, `account_unavailable`, or
        `dashboard_only` for something only a person in the dashboard may do.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Refusal'
    NotFound:
      description: >-
        There is no such thing in this store: `not_found`. A store that is not
        the key's own is answered the same way.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Refusal'
    TooMany:
      description: >-
        The key has used up its budget for now: `rate_limited`. `Retry-After`
        says how many seconds to wait.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Refusal'
  schemas:
    Refusal:
      type: object
      properties:
        success:
          type: boolean
          example: false
        message:
          type: string
          description: What is wrong, in words for a person.
        code:
          type: string
          description: What is wrong, as a word that does not change.
        data:
          nullable: true
        errors:
          type: object
          description: >-
            For `validation_failed`: what is wrong with each field, by the
            field's name.
          additionalProperties:
            type: string
      required:
        - success
        - message
        - code
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: >-
        A secret API key, made under Developers in the dashboard:
        `Authorization: Bearer shoply_sk_...`

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.