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

# Orders List

> Fetch a list of orders with optional filtering and pagination.



## OpenAPI

````yaml https://app.stainless.com/api/spec/documented/henry-sdk/openapi.documented.yml get /orders
openapi: 3.1.0
info:
  title: Henry Labs API
  version: 1.5.0
  description: Playground for Henry Labs API endpoints
  contact:
    name: Henry Labs API Support
    email: support@henrylabs.ai
servers:
  - url: https://api.henrylabs.ai/v1
    description: Production server
security:
  - ApiKeyAuth: []
tags:
  - name: Product
    description: Product search, details, and data enrichment
  - name: Cart
    description: Universal user shopping cart management
  - name: Orders
    description: Order management post purchase
  - name: Merchants
    description: Merchant information and status
  - name: Card
    description: Card tokenization and management
paths:
  /orders:
    get:
      tags:
        - Orders
      summary: Orders List
      description: Fetch a list of orders with optional filtering and pagination.
      operationId: ordersList
      parameters:
        - in: query
          name: cursor
          schema:
            description: Cursor returned from the previous response
            example: '2023-01-01T00:00:00Z'
            type: string
          description: Cursor returned from the previous response
        - in: query
          name: limit
          schema:
            default: 20
            description: Limit the number of results
            example: 20
            type: number
            minimum: 1
            maximum: 100
          description: Limit the number of results
        - in: query
          name: status
          schema:
            description: Filter orders by status
            example: complete
            type: string
            enum:
              - pending
              - processing
              - complete
              - cancelled
          description: Filter orders by status
        - in: query
          name: cartId
          schema:
            description: Filter orders by cart ID
            example: sa2aEsCz9PRM
            type: string
          description: Filter orders by cart ID
      responses:
        '200':
          description: Orders fetched successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ordersListResponse'
        '400':
          description: Bad request - Invalid parameters
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  status:
                    type: string
                  message:
                    type: string
                required:
                  - success
                  - status
                  - message
                additionalProperties: false
        '401':
          description: Unauthorized - Invalid API key
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  status:
                    type: string
                  message:
                    type: string
                required:
                  - success
                  - status
                  - message
                additionalProperties: false
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import HenrySDK from '@henrylabs/sdk';

            const client = new HenrySDK({
              apiKey: process.env['HENRY_SDK_API_KEY'], // This is the default and can be omitted
            });

            const orders = await client.orders.list();

            console.log(orders.data);
components:
  schemas:
    ordersListResponse:
      type: object
      properties:
        success:
          type: boolean
        status:
          type: string
        message:
          type: string
        data:
          type: array
          items:
            $ref: '#/components/schemas/cartPurchaseStatusResponse'
      required:
        - success
        - status
        - message
        - data
      additionalProperties: false
    cartPurchaseStatusResponse:
      type: object
      properties:
        refId:
          type: string
          pattern: ^[a-zA-Z]{3}-ref_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[0-9a-f]{4}$
        status:
          type: string
          enum:
            - pending
            - processing
            - complete
            - cancelled
        products:
          type: array
          items:
            type: object
            properties:
              status:
                type: string
                enum:
                  - pending
                  - processing
                  - complete
                  - failed
              link:
                type: string
                format: uri
              affiliateProductLink:
                type: string
                format: uri
              quantity:
                type: integer
                exclusiveMinimum: 0
                maximum: 9007199254740991
              merchant:
                type: string
              host:
                type: string
              selectedOptions:
                type: array
                items:
                  type: string
              selectedShipping:
                type: object
                properties:
                  id:
                    type: string
                  value:
                    type: string
                additionalProperties: false
            required:
              - status
              - link
              - quantity
              - merchant
              - host
            additionalProperties: false
        details:
          type: object
          properties:
            hasAccount:
              type: boolean
            name:
              type: object
              properties:
                firstName:
                  type: string
                middleName:
                  type: string
                lastName:
                  type: string
              required:
                - firstName
                - lastName
              additionalProperties: false
            email:
              type: string
            phone:
              type: object
              properties:
                countryCode:
                  type: string
                nationalNumber:
                  type: string
                e164:
                  type: string
                country:
                  type: string
              required:
                - countryCode
                - nationalNumber
                - e164
              additionalProperties: false
            shippingAddress:
              type: object
              properties:
                name:
                  type: object
                  properties:
                    firstName:
                      type: string
                    middleName:
                      type: string
                    lastName:
                      type: string
                  required:
                    - firstName
                    - lastName
                  additionalProperties: false
                email:
                  type: string
                  format: email
                  pattern: >-
                    ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
                phone:
                  type: object
                  properties:
                    countryCode:
                      type: string
                    nationalNumber:
                      type: string
                    e164:
                      type: string
                    country:
                      type: string
                  required:
                    - countryCode
                    - nationalNumber
                    - e164
                  additionalProperties: false
                line1:
                  type: string
                line2:
                  type: string
                city:
                  type: string
                province:
                  type: string
                postalCode:
                  type: string
                countryCode:
                  type: string
              required:
                - line1
                - city
                - province
                - postalCode
                - countryCode
              additionalProperties: false
            card:
              type: object
              properties:
                nameOnCard:
                  type: object
                  properties:
                    firstName:
                      type: string
                    middleName:
                      type: string
                    lastName:
                      type: string
                  required:
                    - firstName
                    - lastName
                  additionalProperties: false
                details:
                  type: object
                  properties: {}
                  additionalProperties: false
                billingAddress:
                  type: object
                  properties:
                    name:
                      type: object
                      properties:
                        firstName:
                          type: string
                        middleName:
                          type: string
                        lastName:
                          type: string
                      required:
                        - firstName
                        - lastName
                      additionalProperties: false
                    email:
                      type: string
                      format: email
                      pattern: >-
                        ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
                    phone:
                      type: object
                      properties:
                        countryCode:
                          type: string
                        nationalNumber:
                          type: string
                        e164:
                          type: string
                        country:
                          type: string
                      required:
                        - countryCode
                        - nationalNumber
                        - e164
                      additionalProperties: false
                    line1:
                      type: string
                    line2:
                      type: string
                    city:
                      type: string
                    province:
                      type: string
                    postalCode:
                      type: string
                    countryCode:
                      type: string
                  required:
                    - line1
                    - city
                    - province
                    - postalCode
                    - countryCode
                  additionalProperties: false
              required:
                - nameOnCard
                - details
              additionalProperties: false
            settings:
              type: object
              properties:
                collectEmail:
                  type: boolean
                collectAddress:
                  type: boolean
                collectPhone:
                  type: boolean
              additionalProperties: false
          required:
            - hasAccount
            - name
            - card
          additionalProperties: false
        result:
          type: object
          properties:
            items:
              type: array
              items:
                type: object
                properties:
                  productLink:
                    type: string
                    format: uri
                  confirmationNumber:
                    type: string
                  quantity:
                    anyOf:
                      - type: integer
                        exclusiveMinimum: 0
                        maximum: 9007199254740991
                      - type: 'null'
                  shipping:
                    type: object
                    properties:
                      id:
                        type: string
                      name:
                        type: string
                      cost:
                        type: object
                        properties:
                          value:
                            type: number
                          currency:
                            type: string
                            enum:
                              - USD
                              - EUR
                              - AUD
                              - SGD
                              - TWD
                              - GBP
                              - CAD
                              - MXN
                              - NPR
                              - INR
                              - DKK
                              - NOK
                              - SEK
                              - CHF
                              - PLN
                              - CZK
                              - JPY
                              - NZD
                              - HKD
                        required:
                          - value
                          - currency
                        additionalProperties: false
                      timeEstimate:
                        type: string
                      minDate:
                        type: string
                      maxDate:
                        type: string
                    required:
                      - id
                      - name
                      - cost
                    additionalProperties: false
                  costs:
                    type: object
                    properties:
                      subtotal:
                        type: object
                        properties:
                          value:
                            type: number
                          currency:
                            type: string
                            enum:
                              - USD
                              - EUR
                              - AUD
                              - SGD
                              - TWD
                              - GBP
                              - CAD
                              - MXN
                              - NPR
                              - INR
                              - DKK
                              - NOK
                              - SEK
                              - CHF
                              - PLN
                              - CZK
                              - JPY
                              - NZD
                              - HKD
                        required:
                          - value
                          - currency
                        additionalProperties: false
                      tax:
                        type: object
                        properties:
                          value:
                            type: number
                          currency:
                            type: string
                            enum:
                              - USD
                              - EUR
                              - AUD
                              - SGD
                              - TWD
                              - GBP
                              - CAD
                              - MXN
                              - NPR
                              - INR
                              - DKK
                              - NOK
                              - SEK
                              - CHF
                              - PLN
                              - CZK
                              - JPY
                              - NZD
                              - HKD
                        required:
                          - value
                          - currency
                        additionalProperties: false
                      shipping:
                        type: object
                        properties:
                          value:
                            type: number
                          currency:
                            type: string
                            enum:
                              - USD
                              - EUR
                              - AUD
                              - SGD
                              - TWD
                              - GBP
                              - CAD
                              - MXN
                              - NPR
                              - INR
                              - DKK
                              - NOK
                              - SEK
                              - CHF
                              - PLN
                              - CZK
                              - JPY
                              - NZD
                              - HKD
                        required:
                          - value
                          - currency
                        additionalProperties: false
                      discount:
                        type: object
                        properties:
                          value:
                            type: number
                          currency:
                            type: string
                            enum:
                              - USD
                              - EUR
                              - AUD
                              - SGD
                              - TWD
                              - GBP
                              - CAD
                              - MXN
                              - NPR
                              - INR
                              - DKK
                              - NOK
                              - SEK
                              - CHF
                              - PLN
                              - CZK
                              - JPY
                              - NZD
                              - HKD
                        required:
                          - value
                          - currency
                        additionalProperties: false
                      total:
                        type: object
                        properties:
                          value:
                            type: number
                          currency:
                            type: string
                            enum:
                              - USD
                              - EUR
                              - AUD
                              - SGD
                              - TWD
                              - GBP
                              - CAD
                              - MXN
                              - NPR
                              - INR
                              - DKK
                              - NOK
                              - SEK
                              - CHF
                              - PLN
                              - CZK
                              - JPY
                              - NZD
                              - HKD
                        required:
                          - value
                          - currency
                        additionalProperties: false
                    required:
                      - total
                    additionalProperties: false
                  appliedCoupon:
                    type: object
                    properties:
                      code:
                        type: string
                      savedAmount:
                        type: object
                        properties:
                          value:
                            type: number
                          currency:
                            type: string
                            enum:
                              - USD
                              - EUR
                              - AUD
                              - SGD
                              - TWD
                              - GBP
                              - CAD
                              - MXN
                              - NPR
                              - INR
                              - DKK
                              - NOK
                              - SEK
                              - CHF
                              - PLN
                              - CZK
                              - JPY
                              - NZD
                              - HKD
                        required:
                          - value
                          - currency
                        additionalProperties: false
                    required:
                      - code
                    additionalProperties: false
                  metadata:
                    type: object
                    propertyNames:
                      type: string
                    additionalProperties: {}
                required:
                  - productLink
                  - confirmationNumber
                  - costs
                additionalProperties: false
            costs:
              type: object
              properties:
                subtotal:
                  type: object
                  properties:
                    value:
                      type: number
                    currency:
                      type: string
                      enum:
                        - USD
                        - EUR
                        - AUD
                        - SGD
                        - TWD
                        - GBP
                        - CAD
                        - MXN
                        - NPR
                        - INR
                        - DKK
                        - NOK
                        - SEK
                        - CHF
                        - PLN
                        - CZK
                        - JPY
                        - NZD
                        - HKD
                  required:
                    - value
                    - currency
                  additionalProperties: false
                serviceFee:
                  type: object
                  properties:
                    value:
                      type: number
                    currency:
                      type: string
                      enum:
                        - USD
                        - EUR
                        - AUD
                        - SGD
                        - TWD
                        - GBP
                        - CAD
                        - MXN
                        - NPR
                        - INR
                        - DKK
                        - NOK
                        - SEK
                        - CHF
                        - PLN
                        - CZK
                        - JPY
                        - NZD
                        - HKD
                  required:
                    - value
                    - currency
                  additionalProperties: false
                total:
                  type: object
                  properties:
                    value:
                      type: number
                    currency:
                      type: string
                      enum:
                        - USD
                        - EUR
                        - AUD
                        - SGD
                        - TWD
                        - GBP
                        - CAD
                        - MXN
                        - NPR
                        - INR
                        - DKK
                        - NOK
                        - SEK
                        - CHF
                        - PLN
                        - CZK
                        - JPY
                        - NZD
                        - HKD
                  required:
                    - value
                    - currency
                  additionalProperties: false
              required:
                - subtotal
                - serviceFee
                - total
              additionalProperties: false
          required:
            - items
            - costs
          additionalProperties: false
        error:
          type: object
          propertyNames:
            type: string
          additionalProperties: {}
      required:
        - refId
        - status
        - products
        - details
      additionalProperties: false
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````