> ## 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
            type: string
          in: query
          name: query
          required: false
          description: >-
            Search query. Terms are `field:value`; comparisons `field:>value`,
            `:<`, `:>=`, `:<=`. Quote values in single or double quotes unless
            they are only letters and digits, with single dots between them, or
            a UUID as a filter value. Combine terms with `AND` (binds tighter)
            and `OR`, group with parentheses, negate a term or group with `NOT`
            or a leading `-`. Fields: id, type, subscriptionId, placedAt,
            createdAt, includeOneTime. Example: `subscriptionId:"<subscription
            id>" AND placedAt:>="2026-01-01"`. See [search query
            language](/docs/api-reference/customer/introduction#search-query-language)
            and the [field
            reference](/docs/api-reference/customer/orders/resource#search-query-fields).
            Free-text terms are rejected: orders have no search index behind
            them, unlike customers, products and subscriptions.
            `includeOneTime:true` widens the scope to the customer's full
            Shopify order history and cannot be combined with other filters,
            because we hold no row for those orders to filter on. Changing this
            restarts pagination.
        - schema:
            default: false
            deprecated: true
            type: boolean
          in: query
          name: includeOneTime
          required: false
          description: >-
            DEPRECATED: use `query=includeOneTime:true` instead, so that scope
            and filters travel in one parameter. Still honoured, and still
            mutually exclusive with `query` filters. 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 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:
          description: >-
            `recurring` is a scheduled renewal order, `checkout` the order that
            created the subscription, and `instant` a one-off purchase the
            customer made outside the schedule (an instant order) — it carries
            no billing cycle.
          type: string
          enum:
            - checkout
            - recurring
            - instant
        paymentStatus:
          deprecated: true
          description: >-
            DEPRECATED: use `financialStatus` instead. For a postpaid invoice,
            this carries the invoice's own payment lifecycle (`unpaid` /
            `overdue` / `paid`), whether or not it already has a Shopify order.
            For any other tracked order, it's derived from the order's billing
            attempt (`chargeback` / `refund` / `paid`). Genuine one-time orders
            we never tracked default to `"paid"`, since this proxy
            implementation cannot reliably derive a refund/chargeback signal for
            those. Migrate consumers to `financialStatus`.
          type: string
          enum:
            - paid
            - refund
            - chargeback
            - unpaid
            - overdue
        financialStatus:
          type:
            - 'null'
            - string
        paidAt:
          format: date-time
          description: >-
            When the order was paid in full, or `null` if it never was. `paidAt
            != null` is therefore safe to read as "this order is paid": an order
            that is only partially paid, authorized but uncaptured, pending or
            abandoned reports `null`, never a partial date. A refunded or
            partially refunded order keeps its date, because it was paid in full
            and the money went back afterwards — `financialStatus` is what tells
            you that happened.


            Shopify's `Order` exposes no such field, so this is derived: the
            earliest successful `SALE`/`CAPTURE` transaction on the Shopify
            order, falling back to the order's billing attempt (`processedAt`,
            else `completedAt`) when Shopify records no successful capture — the
            case for an invoice collected off-Shopify by Stripe/Mollie, and the
            only source at all for an invoice with no Shopify order yet.
          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:
          description: >-
            Ids of the Juo subscriptions this order belongs to — the same id
            space as `GET /customer/v1/subscriptions`, so these join directly
            against a subscription resource. Empty for a one-time order.
            Resolved from the order's own subscription links where we track the
            order, and otherwise by mapping each line item's Shopify
            subscription contract back to `Subscription.externalId`; a contract
            with no subscription of ours behind it is omitted rather than
            reported under its Shopify id.
          type: array
          items:
            minLength: 1
            type: string
        payment:
          oneOf:
            - type: 'null'
            - description: >-
                Where this order's payment stands from the customer's side, and
                what they can do about it — `null` when nothing is outstanding
                (a settled order, or one whose payment isn't tracked locally at
                all). Populated for an open postpaid invoice and for a
                delayed-settlement commitment order (ADR 0003) while its balance
                is outstanding. Single source of truth shared with `POST
                /customer/v1/orders/:orderId/pay`'s precondition, so the two
                can't disagree about what is currently payable.
              type: object
              properties:
                state:
                  description: >-
                    `charging` — Juo has a payment attempt in flight right now.
                    `retry_scheduled` — Juo is between auto-charge attempts;
                    `nextAttemptAt` is the next one. `awaiting_customer` — a
                    payable surface exists (Shopify Checkout or the Juo pay
                    page) and the customer can pay right now.
                    `awaiting_payment_method` — no payment method is on file at
                    all. `overdue` — collection is exhausted and nothing will
                    retry; the balance is on the order's Shopify order and there
                    is nothing the customer can pay here.
                  type: string
                  enum:
                    - charging
                    - retry_scheduled
                    - awaiting_customer
                    - awaiting_payment_method
                    - overdue
                nextAttemptAt:
                  format: date-time
                  description: >-
                    When Juo's next auto-charge attempt is due. Only set for
                    `retry_scheduled`; `null` otherwise.
                  type:
                    - 'null'
                    - string
                actions:
                  description: >-
                    Self-service actions available for this order right now.
                    Empty while Juo owns the outcome (`charging`) or once
                    nothing is left to act on (`overdue`), and always empty for
                    an instant order (a one-off purchase, not a cycle invoice)
                    even if it carries an outstanding balance.
                  type: array
                  items:
                    type: string
                    enum:
                      - pay
                      - update-payment-method
                      - add-payment-method
              required:
                - state
                - nextAttemptAt
                - actions
      required:
        - id
        - createdAt
        - placedAt
        - currencyCode
        - type
        - paymentStatus
        - financialStatus
        - paidAt
        - fulfillmentStatus
        - subtotal
        - shipping
        - totalPrice
        - taxesAmount
        - taxesIncluded
        - items
        - discounts
        - deliveryMethod
        - paymentMethod
        - note
        - customAttributes
        - subscriptionIds
        - payment
      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:
          type: string
          enum:
            - Code
            - Manual
        target:
          type: string
          enum:
            - Line
            - 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:
          type: string
          enum:
            - CreditCard
            - PaypalBillingAgreement
            - CustomerShopPayAgreement
            - SepaDirectDebit
            - BLIK
            - MBWay
            - Bacs
        details:
          anyOf:
            - type: object
              properties:
                brand:
                  type: string
                lastDigits:
                  type: string
                maskedNumber:
                  type: string
                expiryMonth:
                  type:
                    - 'null'
                    - integer
                expiryYear:
                  type:
                    - 'null'
                    - integer
                name:
                  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:
                  type: string
                maskedNumber:
                  type: string
                expiryMonth:
                  type:
                    - 'null'
                    - integer
                expiryYear:
                  type:
                    - 'null'
                    - integer
                name:
                  type: string
              required:
                - lastDigits
                - maskedNumber
                - expiryMonth
                - expiryYear
                - name
            - type: object
              properties:
                consumerName:
                  type: string
                consumerAccount:
                  type: string
                consumerBic:
                  type:
                    - 'null'
                    - string
                mandateReference:
                  type: string
                signedAt:
                  format: date-time
                  type:
                    - 'null'
                    - string
              required:
                - consumerName
                - consumerAccount
                - consumerBic
                - mandateReference
                - signedAt
            - type: object
              properties:
                alias:
                  oneOf:
                    - type: 'null'
                    - type: object
                      properties:
                        label:
                          type: string
                        status:
                          type: string
                          enum:
                            - inactive
                            - registered
                            - expired
                            - declined
                        type:
                          type: string
                          enum:
                            - UID
                            - PAYID
                        email:
                          type: string
                      required:
                        - label
                        - status
                        - type
                        - email
              required:
                - alias
            - type: object
              properties:
                phone:
                  type:
                    - 'null'
                    - string
              required:
                - phone
            - type: object
              properties:
                lastDigits:
                  type: string
                maskedNumber:
                  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

````

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