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

# List orders

> Returns a list of orders.



## OpenAPI

````yaml openapi-customer.json GET /orders
openapi: 3.1.0
info:
  version: 8.15.0
  title: '@fastify/swagger'
servers:
  - url: https://api.juo.io/customer/v1
security:
  - DelegatedToken: []
  - AccessToken: []
paths:
  /orders:
    get:
      tags:
        - api.customer.v1
      parameters:
        - schema:
            minLength: 1
            deprecated: true
            type: string
          in: query
          name: query
          required: false
          description: >-
            DEPRECATED: previously used for free-text / per-subscriptionId
            server-side search. Not supported by the current implementation. The
            parameter is accepted for SDK backward compatibility and ignored on
            the server.
        - schema:
            default: false
            type: boolean
          in: query
          name: includeOneTime
          required: false
          description: >-
            When `false` (default), only subscription-driven orders are
            returned: the set is determined by orders tracked in our database
            for the customer, hydrated from Shopify. When `true`, the full
            Shopify order history (including one-time orders) is returned.
            Toggling this flag restarts pagination (the default path uses
            database cursors; the full-history path uses Shopify cursors).
        - schema:
            minimum: 1
            maximum: 50
            default: 20
            type: integer
          in: query
          name: limit
          required: false
        - schema:
            type: string
            enum:
              - placedAt
          in: query
          name: sort
          required: false
          description: >-
            Sort order. When set to `placedAt`, orders are sorted by placement
            date (newest first). When omitted, the default sort is used.
            Toggling this flag restarts pagination (cursors are not
            interchangeable between sort modes).
        - schema:
            minLength: 1
            type: string
          in: query
          name: after
          required: false
        - schema:
            minLength: 1
            type: string
          in: query
          name: before
          required: false
        - $ref: '#/components/parameters/TenantHeader'
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  resource:
                    type: string
                    enum:
                      - list
                  hasNextPage:
                    type: boolean
                  hasPrevPage:
                    type: boolean
                  endCursor:
                    type:
                      - 'null'
                      - string
                  startCursor:
                    type:
                      - 'null'
                      - string
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Order'
                  orders:
                    deprecated: true
                    description: >-
                      DEPRECATED: use `data` instead. Returned for backward
                      compatibility with the pre-pagination response shape.
                    type: array
                    items:
                      $ref: '#/components/schemas/Order'
                required:
                  - resource
                  - hasNextPage
                  - hasPrevPage
                  - endCursor
                  - startCursor
                  - data
                  - orders
components:
  parameters:
    TenantHeader:
      name: X-Tenant-ID
      x-speakeasy-name-override: tenant
      x-speakeasy-globals-hidden: true
      in: header
      schema:
        type: string
      required: true
      description: >-
        Unique identifier of the tenant in the system (usually a store
        identifier)
  schemas:
    Order:
      type: object
      properties:
        id:
          minLength: 1
          type: string
        createdAt:
          format: date-time
          type: string
        placedAt:
          format: date-time
          type:
            - 'null'
            - string
        currencyCode:
          minLength: 3
          maxLength: 3
          type: string
        type:
          anyOf:
            - type: string
              enum:
                - checkout
            - type: string
              enum:
                - recurring
        paymentStatus:
          deprecated: true
          description: >-
            DEPRECATED: use `financialStatus` instead. The proxy implementation
            backing GET /customer/v1/orders cannot reliably derive a
            refund/chargeback signal for one-time orders, so this field is
            hard-coded to `"paid"`. Migrate consumers to `financialStatus`.
          anyOf:
            - type: string
              enum:
                - paid
            - type: string
              enum:
                - refund
            - type: string
              enum:
                - chargeback
        financialStatus:
          type:
            - 'null'
            - string
        fulfillmentStatus:
          type:
            - 'null'
            - string
        subtotal:
          minimum: 0
          type:
            - 'null'
            - number
        shipping:
          minimum: 0
          type:
            - 'null'
            - number
        totalPrice:
          minimum: 0
          type:
            - 'null'
            - number
        taxesAmount:
          minimum: 0
          type:
            - 'null'
            - number
        taxesIncluded:
          type:
            - 'null'
            - boolean
        items:
          minItems: 1
          type: array
          items:
            $ref: '#/components/schemas/OrderItem'
        discounts:
          type: array
          items:
            $ref: '#/components/schemas/OrderDiscount'
        deliveryMethod:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/OrderDeliveryMethod'
        paymentMethod:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/OrderPaymentMethod'
              deprecated: true
              description: >-
                DEPRECATED: the proxy implementation backing GET
                /customer/v1/orders cannot reliably derive the customer's stored
                payment method per order, so this field is always `null`.
        note:
          type:
            - 'null'
            - string
        customAttributes:
          type: array
          items:
            type: object
            properties:
              key:
                minLength: 1
                type: string
              value:
                type: string
            required:
              - key
              - value
        subscriptionIds:
          type: array
          items:
            minLength: 1
            type: string
      required:
        - id
        - createdAt
        - placedAt
        - currencyCode
        - type
        - paymentStatus
        - financialStatus
        - fulfillmentStatus
        - subtotal
        - shipping
        - totalPrice
        - taxesAmount
        - taxesIncluded
        - items
        - discounts
        - deliveryMethod
        - paymentMethod
        - note
        - customAttributes
        - subscriptionIds
      title: Order
    OrderItem:
      type: object
      properties:
        id:
          minLength: 1
          type: string
        title:
          minLength: 1
          type: string
        subtitle:
          type:
            - 'null'
            - string
        quantity:
          minimum: 1
          type: integer
        unitPrice:
          minimum: 0
          type: number
        totalPrice:
          minimum: 0
          type: number
        productId:
          minLength: 1
          type:
            - 'null'
            - string
        variantId:
          minLength: 1
          type:
            - 'null'
            - string
        sku:
          type:
            - 'null'
            - string
        variantImage:
          oneOf:
            - type: 'null'
            - type: object
              properties:
                url:
                  format: uri
                  type:
                    - 'null'
                    - string
                altText:
                  type:
                    - 'null'
                    - string
              required:
                - url
                - altText
        subscriptionLineId:
          minLength: 1
          type:
            - 'null'
            - string
        requiresShipping:
          type: boolean
        taxable:
          type: boolean
        customAttributes:
          type: array
          items:
            type: object
            properties:
              key:
                minLength: 1
                type: string
              value:
                type: string
            required:
              - key
              - value
        sellingPlanId:
          minLength: 1
          type:
            - 'null'
            - string
        sellingPlanName:
          type:
            - 'null'
            - string
      required:
        - id
        - title
        - subtitle
        - quantity
        - unitPrice
        - totalPrice
        - productId
        - variantId
        - sku
        - variantImage
        - subscriptionLineId
        - requiresShipping
        - taxable
        - customAttributes
        - sellingPlanId
        - sellingPlanName
      title: OrderItem
    OrderDiscount:
      type: object
      properties:
        id:
          minLength: 1
          type: string
        title:
          type:
            - 'null'
            - string
        type:
          anyOf:
            - type: string
              enum:
                - Code
            - type: string
              enum:
                - Manual
        target:
          anyOf:
            - type: string
              enum:
                - Line
            - type: string
              enum:
                - Shipping
        value:
          anyOf:
            - type: object
              properties:
                type:
                  type: string
                  enum:
                    - Percentage
                percentage:
                  minimum: 0
                  maximum: 100
                  type: number
              required:
                - type
                - percentage
            - type: object
              properties:
                type:
                  type: string
                  enum:
                    - FixedAmount
                amount:
                  minimum: 0
                  type: number
                appliesOnEachItem:
                  type: boolean
              required:
                - type
                - amount
                - appliesOnEachItem
        entitledItems:
          anyOf:
            - type: object
              properties:
                all:
                  type: boolean
                  enum:
                    - true
              required:
                - all
            - type: object
              properties:
                all:
                  type: boolean
                  enum:
                    - false
                items:
                  type: array
                  items:
                    minLength: 1
                    type: string
              required:
                - all
                - items
        subscriptionDiscountId:
          minLength: 1
          type:
            - 'null'
            - string
      required:
        - id
        - title
        - type
        - target
        - value
        - entitledItems
        - subscriptionDiscountId
      title: OrderDiscount
    OrderDeliveryMethod:
      anyOf:
        - type: object
          properties:
            type:
              type: string
              enum:
                - Shipping
            address:
              $ref: '#/components/schemas/Address'
          required:
            - type
            - address
        - type: object
          properties:
            type:
              type: string
              enum:
                - LocalDelivery
            address:
              $ref: '#/components/schemas/Address'
            phone:
              minLength: 1
              type: string
            instructions:
              type:
                - 'null'
                - string
          required:
            - type
            - address
            - phone
            - instructions
        - type: object
          properties:
            type:
              type: string
              enum:
                - Pickup
            locationId:
              minLength: 1
              type:
                - 'null'
                - string
          required:
            - type
            - locationId
      title: OrderDeliveryMethod
    OrderPaymentMethod:
      type: object
      properties:
        id:
          minLength: 1
          type: string
        type:
          anyOf:
            - type: string
              enum:
                - CreditCard
            - type: string
              enum:
                - PaypalBillingAgreement
            - type: string
              enum:
                - CustomerShopPayAgreement
            - type: string
              enum:
                - SepaDirectDebit
            - type: string
              enum:
                - BLIK
            - type: string
              enum:
                - MBWay
            - type: string
              enum:
                - Bacs
        details:
          anyOf:
            - type: object
              properties:
                brand:
                  minLength: 1
                  type: string
                lastDigits:
                  minLength: 1
                  type: string
                maskedNumber:
                  minLength: 1
                  type: string
                expiryMonth:
                  minimum: 1
                  maximum: 12
                  type: integer
                expiryYear:
                  minimum: 2000
                  type: integer
                name:
                  minLength: 1
                  type: string
              required:
                - brand
                - lastDigits
                - maskedNumber
                - expiryMonth
                - expiryYear
                - name
            - type: object
              properties:
                email:
                  format: email
                  type:
                    - 'null'
                    - string
                inactive:
                  type: boolean
                isRevocable:
                  type: boolean
              required:
                - email
                - inactive
                - isRevocable
            - type: object
              properties:
                lastDigits:
                  minLength: 1
                  type: string
                maskedNumber:
                  minLength: 1
                  type: string
                expiryMonth:
                  minimum: 1
                  maximum: 12
                  type: integer
                expiryYear:
                  minimum: 2000
                  type: integer
                name:
                  minLength: 1
                  type: string
              required:
                - lastDigits
                - maskedNumber
                - expiryMonth
                - expiryYear
                - name
            - type: object
              properties:
                consumerName:
                  minLength: 1
                  type: string
                consumerAccount:
                  minLength: 1
                  type: string
                consumerBic:
                  minLength: 1
                  type: string
                mandateReference:
                  minLength: 1
                  type: string
                signedAt:
                  format: date-time
                  type: string
              required:
                - consumerName
                - consumerAccount
                - consumerBic
                - mandateReference
                - signedAt
            - type: object
              properties:
                alias:
                  type: object
                  properties:
                    label:
                      minLength: 1
                      type: string
                    status:
                      anyOf:
                        - type: string
                          enum:
                            - inactive
                        - type: string
                          enum:
                            - registered
                        - type: string
                          enum:
                            - expired
                        - type: string
                          enum:
                            - declined
                    type:
                      anyOf:
                        - type: string
                          enum:
                            - UID
                        - type: string
                          enum:
                            - PAYID
                    email:
                      format: email
                      type: string
                  required:
                    - label
                    - status
                    - type
                    - email
              required:
                - alias
            - type: object
              properties:
                phone:
                  minLength: 1
                  type:
                    - 'null'
                    - string
              required:
                - phone
            - type: object
              properties:
                lastDigits:
                  minLength: 1
                  type: string
                maskedNumber:
                  minLength: 1
                  type: string
              required:
                - lastDigits
                - maskedNumber
      required:
        - id
        - type
        - details
      title: OrderPaymentMethod
    Address:
      type: object
      properties:
        firstName:
          minLength: 1
          description: Customer's first name.
          type:
            - 'null'
            - string
        lastName:
          minLength: 1
          description: Customer's last name.
          type:
            - 'null'
            - string
        address1:
          minLength: 1
          description: Primary street address.
          type:
            - 'null'
            - string
        address2:
          minLength: 1
          description: Additional address information (apartment, suite, etc.)
          type:
            - 'null'
            - string
        zip:
          minLength: 1
          description: Postal/ZIP code.
          type:
            - 'null'
            - string
        city:
          minLength: 1
          description: City name.
          type:
            - 'null'
            - string
        country:
          minLength: 1
          description: Full country name.
          type:
            - 'null'
            - string
        countryCode:
          minLength: 2
          maxLength: 2
          description: Two-letter country code (ISO 3166-1).
          type:
            - 'null'
            - string
        provinceCode:
          minLength: 1
          description: Province/state code.
          type:
            - 'null'
            - string
        province:
          minLength: 1
          description: Full province/state name.
          type:
            - 'null'
            - string
        phone:
          minLength: 1
          description: Contact phone number.
          type:
            - 'null'
            - string
        company:
          minLength: 1
          description: Company name.
          type:
            - 'null'
            - string
      required:
        - firstName
        - lastName
        - address1
        - address2
        - zip
        - city
        - country
        - countryCode
        - provinceCode
        - province
        - phone
        - company
      title: Address
  securitySchemes:
    DelegatedToken:
      type: apiKey
      name: X-Delegated-Token
      in: header
    AccessToken:
      type: http
      scheme: bearer

````