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

# List Orders

Retrieve orders for the program. LoyaltyLion will only hold orders that have
been created via the LoyaltyLion API or webhooks from an e-commerce platform.


## OpenAPI

````yaml /api-reference/v2/openapi.json GET /v2/orders
openapi: 3.1.1
info:
  title: LoyaltyLion Admin API
  version: v2
servers:
  - url: https://api.loyaltylion.com
security: []
tags:
  - name: identity
  - name: activities
  - name: orders
  - name: transactions
  - name: customers
  - name: webhooks
  - name: emails
  - name: sites
  - name: reviews
  - name: rewards
  - name: integrations
  - name: gatsby
paths:
  /v2/orders:
    get:
      tags:
        - orders
      operationId: orders.listOrders
      parameters:
        - name: since_id
          in: query
          description: Return only resources whose id is after the specified id
          schema:
            type: integer
            minimum: 0
        - name: limit
          in: query
          description: Max number of resources to return per request
          schema:
            default: 100
            type: integer
            minimum: 1
            maximum: 500
        - name: page
          in: query
          description: >-
            Fetch another page of results. This field is deprecated and will be
            removed in a future version of the API. Use cursors for pagination
            instead
          schema:
            deprecated: true
            type: integer
            minimum: 1
        - name: cursor
          in: query
          schema:
            type: string
            description: >-
              Fetch another page of results using a cursor returned in a
              previous response
        - name: created_at_min
          in: query
          schema:
            type: string
        - name: created_at_max
          in: query
          schema:
            type: string
        - name: updated_at_min
          in: query
          schema:
            type: string
        - name: updated_at_max
          in: query
          schema:
            type: string
      responses:
        '200':
          description: '200'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrdersListOrdersResponseBody'
        '400':
          $ref: '#/components/responses/ClientErrorBadRequest'
        '401':
          description: '401'
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      message:
                        type: string
                      details:
                        type: object
                        propertyNames:
                          type: string
                        additionalProperties:
                          type: string
                    required:
                      - message
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
        '403':
          description: '403'
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      message:
                        type: string
                      details:
                        type: object
                        propertyNames:
                          type: string
                        additionalProperties:
                          type: string
                    required:
                      - message
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
      security:
        - ProgramApiKey:
            - read_orders
        - SiteTokenSecret: []
components:
  schemas:
    OrdersListOrdersResponseBody:
      type: object
      properties:
        orders:
          type: array
          items:
            type: object
            properties:
              id:
                type: number
              merchant_id:
                type: string
              merchant_number:
                type: string
              total:
                type: string
              total_tax:
                type: string
              total_shipping:
                type: string
              total_discounts:
                type: string
              total_paid:
                type: string
              total_refunded:
                type: string
              payment_status:
                type: string
                enum:
                  - not_paid
                  - partially_paid
                  - paid
              fulfillment_status:
                type: string
                enum:
                  - fulfilled
                  - not_fulfilled
                  - partially_fulfilled
              refund_status:
                type: string
                enum:
                  - not_refunded
                  - partially_refunded
                  - refunded
              cancellation_status:
                type: string
                enum:
                  - cancelled
                  - not_cancelled
              metadata:
                type: object
                properties:
                  shopify_source_url:
                    type: string
                  shopify_source_name:
                    type: string
                  shopify_location_id:
                    type:
                      - number
                      - 'null'
                additionalProperties: false
              created_at:
                type: string
              updated_at:
                type: string
              customer:
                anyOf:
                  - type: object
                    properties:
                      id:
                        type: number
                      merchant_id:
                        type: string
                      email:
                        type:
                          - string
                          - 'null'
                      points_pending:
                        type: number
                      points_approved:
                        type: number
                      points_spent:
                        type: number
                    required:
                      - id
                      - merchant_id
                      - email
                      - points_pending
                      - points_approved
                      - points_spent
                    additionalProperties: false
                  - type: 'null'
            required:
              - id
              - merchant_id
              - merchant_number
              - total
              - total_tax
              - total_shipping
              - total_discounts
              - total_paid
              - total_refunded
              - payment_status
              - fulfillment_status
              - refund_status
              - cancellation_status
              - metadata
              - created_at
              - updated_at
              - customer
            additionalProperties: false
        cursor:
          type: object
          properties:
            prev:
              type:
                - string
                - 'null'
            next:
              type:
                - string
                - 'null'
          required:
            - prev
            - next
          additionalProperties: false
      required:
        - orders
        - cursor
      additionalProperties: false
  responses:
    ClientErrorBadRequest:
      description: Bad Request
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: object
                properties:
                  message:
                    type: string
                  details:
                    type: object
                    additionalProperties:
                      type: string
                required:
                  - message
            required:
              - error
  securitySchemes:
    ProgramApiKey:
      type: http
      scheme: bearer
      description: >-
        An API key linked to a Program in LoyaltyLion, with a set of permissions
        (scopes). API keys can be created manually, or acquired through an
        OAuth2 flow. The API key should be provided as a `Bearer` token in the
        `Authorization` header
    SiteTokenSecret:
      type: http
      scheme: basic
      description: >-
        [DEPRECATED] Authenticate using a LoyaltyLion site's `token` as
        username, and its `secret` as the password. This authentication method
        is deprecated and will be removed in future. Use the `ProgramApiKey`
        authentication method instead

````