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

# List Orders

> The "List Orders" API allows to retrieve a paginated list of orders. Customize your results by filtering orders based on name, alt type, order status, payment mode, date range, type of source, contact, funnel products or paginate through the list using the provided query parameters. This endpoint provides a straightforward way to explore and retrieve order information.



## OpenAPI

````yaml /api-reference/payments/openapi.json get /payments/orders
openapi: 3.0.0
info:
  title: Payments API
  description: Documentation for payments API
  version: '1.0'
  contact: {}
servers:
  - url: https://services.leadconnectorhq.com
security: []
tags:
  - name: Payments
    description: Documentation for payments API
  - name: Integrations
    description: Documentation for payments API
  - name: Orders
    description: Documentation for payments API
  - name: Order fulfillments
    description: Documentation for payments API
  - name: Order Notes
    description: Documentation for payments API
  - name: Transactions
    description: Documentation for payments API
  - name: Subscriptions
    description: Documentation for payments API
  - name: Coupons
    description: Documentation for payments API
  - name: Custom Provider
    description: Documentation for payments API
paths:
  /payments/orders:
    get:
      tags:
        - Orders
      summary: List Orders
      description: >-
        The "List Orders" API allows to retrieve a paginated list of orders.
        Customize your results by filtering orders based on name, alt type,
        order status, payment mode, date range, type of source, contact, funnel
        products or paginate through the list using the provided query
        parameters. This endpoint provides a straightforward way to explore and
        retrieve order information.
      operationId: list-orders
      parameters:
        - name: Version
          in: header
          description: API Version
          required: true
          schema:
            type: string
            enum:
              - '2021-07-28'
        - name: locationId
          required: false
          in: query
          description: LocationId is the id of the sub-account.
          schema:
            example: 3SwdhCu3svxI8AKsPJt6
            type: string
        - name: altId
          required: true
          in: query
          description: 'AltId is the unique identifier e.g: location id.'
          schema:
            example: 3SwdhCu3svxI8AKsPJt6
            type: string
        - name: status
          required: false
          in: query
          description: Order status.
          schema:
            example: completed
            type: string
        - name: paymentStatus
          required: false
          in: query
          description: Payment Status of the Order
          schema:
            example: unpaid
            enum:
              - paid
              - unpaid
              - refunded
              - partially_paid
            type: string
        - name: paymentMode
          required: false
          in: query
          description: Mode of payment.
          schema:
            example: live
            type: string
        - name: startAt
          required: false
          in: query
          description: Starting interval of orders.
          schema:
            example: '2024-02-01'
            type: string
        - name: endAt
          required: false
          in: query
          description: Closing interval of orders.
          schema:
            example: '2024-02-13'
            type: string
        - name: search
          required: false
          in: query
          description: The name of the order for searching.
          schema:
            example: Awesome order
            type: string
        - name: contactId
          required: false
          in: query
          description: Contact id for filtering of orders.
          schema:
            example: XPLSw2SVagl12LMDeTmQ
            type: string
        - name: funnelProductIds
          required: false
          in: query
          description: Funnel product ids separated by comma.
          schema:
            example: 61dd0c7dc077f712a5f787ff,61d6afc9d39ac5e35965c017
            type: string
        - name: sourceId
          required: false
          in: query
          description: Source id
          schema:
            example: 61dd0c7dc077f712a5f787ff
            type: string
        - name: limit
          required: false
          in: query
          description: >-
            The maximum number of items to be included in a single page of
            results
          schema:
            default: 10
            example: 20
            type: number
        - name: offset
          required: false
          in: query
          description: >-
            The starting index of the page, indicating the position from which
            the results should be retrieved.
          schema:
            default: 0
            example: 0
            type: number
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListOrdersResponseDto'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestDTO'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedDTO'
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnprocessableDTO'
      security:
        - Location-Access:
            - payments/orders.readonly
components:
  schemas:
    ListOrdersResponseDto:
      type: object
      properties:
        data:
          description: An array of orders
          type: array
          items:
            $ref: '#/components/schemas/OrderResponseSchema'
        totalCount:
          type: number
          description: total orders count
      required:
        - data
        - totalCount
    BadRequestDTO:
      type: object
      properties:
        statusCode:
          type: number
          example: 400
        message:
          type: string
          example: Bad Request
      required:
        - statusCode
        - message
    UnauthorizedDTO:
      type: object
      properties:
        statusCode:
          type: number
          example: 401
        message:
          type: string
          example: 'Invalid token: access token is invalid'
        error:
          type: string
          example: Unauthorized
      required:
        - statusCode
        - message
        - error
    UnprocessableDTO:
      type: object
      properties:
        statusCode:
          type: number
          example: 422
        message:
          type: array
          items:
            type: string
          example:
            - Unprocessable Entity
        error:
          type: string
          example: Unprocessable Entity
      required:
        - statusCode
        - message
        - error
    OrderResponseSchema:
      type: object
      properties:
        _id:
          type: string
          description: The unique identifier for the order.
          example: 653f5e0cde5a1314e62a837c
        altId:
          type: string
          description: 'AltId is the unique identifier eg: location id.'
          example: 3SwdhCu3svxI8AKsPJt6
        altType:
          type: string
          example: location
          description: AltType is the type of identifier.
        contactId:
          type: string
          example: XPLSw2SVagl12LMDeTmQ
          description: Contact id corresponding to the order.
        contactName:
          type: string
          example: James Bond
          description: Contact name corresponding to the order.
        contactEmail:
          type: string
          example: james.bond@hoopai.com
          description: Contact email corresponding to the order.
        currency:
          type: string
          example: USD
          description: Currency in which order was created.
        amount:
          type: number
          example: '100'
          description: Order value.
        subtotal:
          type: number
          example: '100'
          description: Order sub-total value.
        discount:
          type: number
          example: '10'
          description: Discount value on order.
        status:
          type: string
          description: The status of the order (e.g., completed).
          example: completed
        liveMode:
          type: boolean
          example: 'false'
          description: Order is in live / test mode.
        totalProducts:
          type: number
          example: '5'
          description: Total products in an order.
        sourceType:
          type: string
          example: funnel
          description: 'Source type of order (eg: funnel).'
        sourceName:
          type: string
          example: onestep
          description: Source name for the order.
        sourceId:
          type: string
          description: Source id for the order.
          example: kDj7BHej9Zyyq3QakJmz
        sourceMeta:
          type: object
          description: Meta content for the source of order.
          example: >-
            { domain: "app.hoopai.com", pageId:  "rBVhyYhMsbxbO8ZqOcei",
            pageUrl:  "/v2/preview/rBVhyYhMsbxbO8ZqOcei", stepId:  
            "5a772f62-3fbc-418b-af1b-be8929dd64c2"}
        couponCode:
          type: string
          description: Coupon code for the order.
          example: 100PER
        createdAt:
          format: date-time
          type: string
          description: The creation timestamp of the order.
          example: '2023-11-20T10:23:36.515Z'
        updatedAt:
          format: date-time
          type: string
          description: The last update timestamp of the order.
          example: '2024-01-23T09:57:04.846Z'
        sourceSubType:
          type: string
          description: Source sub-type for the order.
          example: one_step_order_form
        fulfillmentStatus:
          type: string
          description: Fulfillment status of the order.
          example: unfulfilled
        onetimeProducts:
          type: number
          example: '1'
          description: Total one time products in an order.
        recurringProducts:
          type: number
          example: '1'
          description: Total recurring time products in an order.
        createdBy:
          type: string
          example: user123
          description: User ID who created the order.
      required:
        - _id
        - altId
        - altType
        - status
        - sourceType
        - createdAt
        - updatedAt

````