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

# Retrieve all orders

> Lists all orders for a user. Returns an array of `OrderList` objects with pagination.



## OpenAPI

````yaml get /orders
openapi: 3.1.0
info:
  version: '1.0'
  title: CE Storefront APIs
  summary: Customer-facing e-commerce API for building exceptional shopping experiences
  description: >-
    Public-facing API for Commerce Engine storefronts, enabling seamless
    shopping experiences with product browsing, cart management, checkout
    processing, user accounts, and order tracking. Perfect for building web,
    mobile, and headless commerce applications.
  contact:
    name: Support
    email: support@commercengine.io
    url: https://www.commercengine.io/contact-us
  license:
    url: https://www.commercengine.io/contact-us
    name: All Rights Reserved
servers:
  - url: https://staging.api.commercengine.io/api/v1/{store_id}/storefront
    description: Staging Server
    variables:
      store_id:
        description: Store ID
        default: store_id
    x-speakeasy-server-id: staging
  - url: https://prod.api.commercengine.io/api/v1/{store_id}/storefront
    description: Prod Server
    variables:
      store_id:
        description: Store ID
        default: store_id
    x-speakeasy-server-id: prod
security: []
tags:
  - name: Analytics
    description: Analytics
  - name: Auth
    description: auth
  - name: Campaigns
    description: Campaigns
  - name: Carts
    description: Carts
  - name: Catalog
    description: Catalog
  - name: Common
    description: Common
  - name: Coupons & promotions
    description: Coupons & promotions
  - name: Customers
    description: Customers
  - name: Juspay
    description: Juspay Payments
  - name: KYC
    description: KYC
  - name: Marketplace
    description: Marketplace
  - name: Orders
    description: Orders
  - name: Others
    description: Others
  - name: Payments
    description: Payments
  - name: PayU
    description: PayU Payments
  - name: POS
    description: POS
  - name: Shipping
    description: Shipping
  - name: Store
    description: Store
  - name: Subscriptions
    description: Subscriptions
externalDocs:
  url: https://llm-docs.commercengine.io
  description: Commerce Engine API Reference Documentation
paths:
  /orders:
    get:
      tags:
        - Orders
      summary: Retrieve all orders
      description: >-
        Lists all orders for a user. Returns an array of `OrderList` objects
        with pagination.
      operationId: list-orders
      parameters:
        - $ref: '#/components/parameters/pageParam'
        - $ref: '#/components/parameters/pageLimitParam'
        - $ref: '#/components/parameters/sortingParam'
        - name: status
          in: query
          description: array of string
          schema:
            type: array
            items:
              type: string
        - name: user_id
          in: query
          description: user id
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  success:
                    type: boolean
                  content:
                    properties:
                      orders:
                        type: array
                        items:
                          $ref: '#/components/schemas/OrderList'
                      pagination:
                        $ref: '#/components/schemas/Pagination'
                    type: object
        '401':
          $ref: '#/components/responses/Unauthorized'
      security:
        - Authorization: []
      externalDocs:
        url: https://llm-docs.commercengine.io/storefront/operations/list-orders
        description: API reference for the list-orders operation
components:
  parameters:
    pageParam:
      name: page
      in: query
      description: page number of pagination list
      required: false
      schema:
        type: number
        minimum: 1
    pageLimitParam:
      name: limit
      in: query
      description: Number of results per page.
      required: false
      schema:
        type: integer
        maximum: 100
        minimum: 1
    sortingParam:
      name: sort_by
      in: query
      description: 'JSON string format: {"field1":"asc", "field2":"desc"}'
      required: false
      schema:
        description: >-
          json string in format {'field_name':'asc', 'other_field_name':'desc',
          ...}
        type: string
        examples:
          - '{"country":"asc","city":"asc","population":"desc"}'
  schemas:
    OrderList:
      title: OrderList
      description: order list model
      type: object
      externalDocs:
        url: https://llm-docs.commercengine.io/storefront/schemas/OrderList
        description: API reference for the OrderList schema
      properties:
        order_number:
          description: Unique number associated with the order.
          type: string
        order_date:
          description: Date and time when the order was placed.
          type: string
          format: date-time
        status:
          description: >-
            Current status of the order (e.g., "pending," "processing,"
            "shipped," etc.).
          type: string
          enum:
            - draft
            - awaiting_approval
            - confirmed
            - partially_scheduled
            - awaiting_shipment
            - shipped
            - partially_shipped
            - undelivered
            - partially_undelivered
            - return_to_origin
            - partially_return_to_origin
            - complete
            - partially_delivered
            - cancelled
        payment_status:
          description: >-
            Current payment status of the order (e.g., "pending," "success,"
            "failed").
          type: string
          enum:
            - pending
            - success
            - failed
            - partially_paid
        payment_success_date:
          description: >-
            Date and time when the payment for the order was successfully
            processed.
          type: string
          format: date-time
        has_refund:
          description: Indicates whether the order has a refund associated with it or not.
          type: boolean
        on_subscription:
          description: Indicates whether the order includes subscription items.
          type: boolean
        grand_total:
          description: >-
            Total amount for the order, including all items, taxes, and
            discounts.
          type: number
          format: double
        loyalty_point_redeemed:
          description: Number of loyalty points redeemed in the order.
          type: integer
        credit_balance_used:
          description: Amount of credit balance used in the order.
          type: integer
        to_be_paid:
          description: Amount remaining to be paid for the order.
          type: number
          format: double
        order_items_count:
          description: Total count of items included in the order.
          type: integer
        order_items:
          type: array
          items:
            $ref: '#/components/schemas/OrderItem'
        customer_note:
          type:
            - string
            - 'null'
        loyalty_point_earned:
          type: integer
        currency:
          type: object
          properties:
            name:
              type: string
            code:
              type: string
            symbol:
              type: string
        created_at:
          type: string
          format: date-time
        modified_at:
          type: string
          format: date-time
    Pagination:
      description: pagination metadata structure
      type: object
      externalDocs:
        url: https://llm-docs.commercengine.io/storefront/schemas/Pagination
        description: API reference for the Pagination schema
      required:
        - total_records
        - total_pages
        - limit
        - next_page
      properties:
        total_records:
          type: integer
        total_pages:
          type: integer
        previous_page:
          type:
            - integer
            - 'null'
        limit:
          type: integer
        next_page:
          type:
            - integer
            - 'null'
      examples:
        - total_records: 100
          total_pages: 4
          previous_page: null
          next_page: 2
          limit: 25
    OrderItem:
      type: object
      externalDocs:
        url: https://llm-docs.commercengine.io/storefront/schemas/OrderItem
        description: API reference for the OrderItem schema
      required:
        - product_id
        - product_name
        - product_image_url
        - product_type
        - sku
        - slug
        - variant_id
        - variant_name
        - backorder
        - on_promotion
        - on_subscription
        - subscription_plan
        - subscription_interval
        - subscription_frequency
        - quantity
        - free_quantity
        - is_free_item
        - price_including_tax
        - selling_price
        - listing_price
        - selling_price_excluding_tax
        - promotion_discount_amount
        - coupon_discount_amount
        - tax_type
        - tax_rate
        - tax_amount
        - handling_charge_excluding_tax
        - handling_charge_tax_rate
        - handling_charge_including_tax
      properties:
        product_id:
          type: string
        product_name:
          type: string
        product_image_url:
          type:
            - string
            - 'null'
        product_type:
          enum:
            - physical
            - digital
            - bundle
        sku:
          type: string
        slug:
          type: string
        variant_id:
          type:
            - string
            - 'null'
        variant_name:
          type:
            - string
            - 'null'
        backorder:
          description: >-
            backorder


            Indicates whether the item is being fulfilled as a backorder. When
            true, the item is not currently in stock and will ship later once
            inventory is available. This may result in the order being split
            into multiple shipments, with delays for the backordered portion.
          type: boolean
        on_promotion:
          type: boolean
        on_subscription:
          type: boolean
        subscription_plan:
          type:
            - string
            - 'null'
        subscription_interval:
          type:
            - integer
            - 'null'
        subscription_frequency:
          type:
            - string
            - 'null'
        quantity:
          type: integer
          minimum: 0
        free_quantity:
          type: integer
          minimum: 0
        is_free_item:
          type: boolean
        price_including_tax:
          type: boolean
        selling_price:
          type: number
          format: double
          minimum: 0
        listing_price:
          type: number
          format: double
          minimum: 0
        selling_price_excluding_tax:
          type: number
          format: double
          minimum: 0
        promotion_discount_amount:
          type: number
          format: double
          minimum: 0
        coupon_discount_amount:
          type: number
          format: double
          minimum: 0
        tax_type:
          type: string
          default: GST
          const: GST
          examples:
            - GST
        tax_rate:
          type: number
          format: double
          minimum: 0
        tax_amount:
          type: number
          format: double
          minimum: 0
        handling_charge_excluding_tax:
          type: number
          format: double
          minimum: 0
        handling_charge_tax_rate:
          type: number
          format: double
          minimum: 0
        handling_charge_including_tax:
          type: number
          format: double
          minimum: 0
        associated_options:
          oneOf:
            - $ref: '#/components/schemas/AssociatedOption'
              description: Used when `variant_id` is not null.
            - type: 'null'
              description: Null when `variant_id` is null.
        attributes:
          type: array
          items:
            $ref: '#/components/schemas/ProductAttribute'
        seller_id:
          description: >-
            Seller ID. This field is relevant for marketplace type stores only.
            Will return null for b2b and b2c type stores.
          type:
            - string
            - 'null'
        seller_detail:
          description: >-
            Seller detail information. This field is relevant for marketplace
            type stores only. Will return null for b2b and b2c type stores.
          oneOf:
            - $ref: '#/components/schemas/SellerInfo'
            - type: 'null'
    AssociatedOption:
      title: AssociatedOption
      description: >-
        An object where each key is an option name, and the value describes the
        option details.
      type: object
      externalDocs:
        url: https://llm-docs.commercengine.io/storefront/schemas/AssociatedOption
        description: API reference for the AssociatedOption schema
      additionalProperties:
        oneOf:
          - $ref: '#/components/schemas/ColorOption'
          - $ref: '#/components/schemas/SingleSelectOption'
      examples:
        - background_color:
            name: Background Color
            value:
              name: Blue
              hexcode: '#0000FF'
            type: color
          size:
            name: Size
            value: Large
            type: single-select
    ProductAttribute:
      externalDocs:
        url: https://llm-docs.commercengine.io/storefront/schemas/ProductAttribute
        description: API reference for the ProductAttribute schema
      discriminator:
        propertyName: type
        mapping:
          color:
            $ref: '#/components/schemas/ColorAttribute'
          single-select:
            $ref: '#/components/schemas/SingleSelectAttribute'
          multi-select:
            $ref: '#/components/schemas/MultiSelectAttribute'
          text:
            $ref: '#/components/schemas/TextAttribute'
          date:
            $ref: '#/components/schemas/DateAttribute'
          number:
            $ref: '#/components/schemas/NumberAttribute'
          boolean:
            $ref: '#/components/schemas/BooleanAttribute'
      oneOf:
        - $ref: '#/components/schemas/ColorAttribute'
          type: object
        - $ref: '#/components/schemas/SingleSelectAttribute'
          type: object
        - $ref: '#/components/schemas/MultiSelectAttribute'
          type: object
        - $ref: '#/components/schemas/TextAttribute'
          type: object
        - $ref: '#/components/schemas/DateAttribute'
          type: object
        - $ref: '#/components/schemas/NumberAttribute'
          type: object
        - $ref: '#/components/schemas/BooleanAttribute'
          type: object
    SellerInfo:
      title: SellerInfo
      type: object
      externalDocs:
        url: https://llm-docs.commercengine.io/storefront/schemas/SellerInfo
        description: API reference for the SellerInfo schema
      required:
        - id
        - trade_name
        - legal_name
        - business_type
        - tax_identification_number
      properties:
        id:
          type: string
        trade_name:
          type: string
        legal_name:
          type: string
        business_type:
          type: string
        tax_identification_number:
          type: string
      examples: []
    ColorOption:
      title: ColorOption
      type: object
      externalDocs:
        url: https://llm-docs.commercengine.io/storefront/schemas/ColorOption
        description: API reference for the ColorOption schema
      required:
        - name
        - type
        - value
      properties:
        name:
          description: The name of the associated option.
          type: string
        type:
          description: The type of the associated option.
          const: color
        value:
          type: object
          properties:
            hexcode:
              description: 'The hex code of the color (e.g., #000000).'
              type: string
              format: color-hex
              pattern: ^#(?:[0-9a-fA-F]{3}){1,2}$
            name:
              type: string
              description: The name of the color.
          required:
            - name
            - hexcode
    SingleSelectOption:
      title: SingleSelectOption
      type: object
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/storefront/schemas/SingleSelectOption
        description: API reference for the SingleSelectOption schema
      required:
        - name
        - type
        - value
      properties:
        name:
          description: The name of the associated option.
          type: string
        type:
          description: The type of the associated option.
          const: single-select
        value:
          description: The value of the associated option
          type: string
    ColorAttribute:
      title: ColorAttribute
      description: Attribute for colors
      type: object
      readOnly: true
      externalDocs:
        url: https://llm-docs.commercengine.io/storefront/schemas/ColorAttribute
        description: API reference for the ColorAttribute schema
      required:
        - id
        - name
        - key
        - type
        - value
      properties:
        id:
          type: string
        name:
          type: string
        key:
          description: >-
            A lookup safe version of the name that is lowercased and spaces are
            replaced with underscores. For instance, if name is `Product Type`,
            key will be `product_type`
          type: string
        type:
          type: string
          example: color
        value:
          type: array
          items:
            type: object
            required:
              - name
              - hexcode
            properties:
              name:
                type: string
              hexcode:
                description: 'The hex code of the color (e.g., #000000).'
                type: string
                format: color-hex
                pattern: ^#(?:[0-9a-fA-F]{3}){1,2}$
    SingleSelectAttribute:
      title: SingleSelectAttribute
      description: Attribute for single-select values
      type: object
      readOnly: true
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/storefront/schemas/SingleSelectAttribute
        description: API reference for the SingleSelectAttribute schema
      required:
        - id
        - name
        - key
        - type
        - value
      properties:
        id:
          type: string
        name:
          type: string
        key:
          description: >-
            A lookup safe version of the name that is lowercased and spaces are
            replaced with underscores. For instance, if name is `Product Type`,
            key will be `product_type`
          type: string
        type:
          type: string
          example: single-select
        value:
          description: For single-select attributes
          type: string
    MultiSelectAttribute:
      title: MultiSelectAttribute
      description: Attribute for multi-select values
      type: object
      readOnly: true
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/storefront/schemas/MultiSelectAttribute
        description: API reference for the MultiSelectAttribute schema
      required:
        - id
        - name
        - key
        - type
        - value
      properties:
        id:
          type: string
        name:
          type: string
        key:
          description: >-
            A lookup safe version of the name that is lowercased and spaces are
            replaced with underscores. For instance, if name is `Product Type`,
            key will be `product_type`
          type: string
        type:
          type: string
          example: multi-select
        value:
          description: For multi-select attributes
          type: array
          items:
            type: string
    TextAttribute:
      title: TextAttribute
      description: Attribute for text values
      type: object
      readOnly: true
      externalDocs:
        url: https://llm-docs.commercengine.io/storefront/schemas/TextAttribute
        description: API reference for the TextAttribute schema
      required:
        - id
        - name
        - key
        - type
        - value
      properties:
        id:
          type: string
        name:
          type: string
        key:
          description: >-
            A lookup safe version of the name that is lowercased and spaces are
            replaced with underscores. For instance, if name is `Product Type`,
            key will be `product_type`
          type: string
        type:
          type: string
          example: text
        value:
          description: For text attributes
          type: string
    DateAttribute:
      title: DateAttribute
      description: Attribute for date values
      type: object
      readOnly: true
      externalDocs:
        url: https://llm-docs.commercengine.io/storefront/schemas/DateAttribute
        description: API reference for the DateAttribute schema
      required:
        - id
        - name
        - key
        - type
        - value
      properties:
        id:
          type: string
        name:
          type: string
        key:
          description: >-
            A lookup safe version of the name that is lowercased and spaces are
            replaced with underscores. For instance, if name is `Product Type`,
            key will be `product_type`
          type: string
        type:
          type: string
          example: date
        value:
          description: For date attributes
          type: string
          format: date-time
    NumberAttribute:
      title: NumberAttribute
      description: Attribute for numeric values
      type: object
      readOnly: true
      externalDocs:
        url: https://llm-docs.commercengine.io/storefront/schemas/NumberAttribute
        description: API reference for the NumberAttribute schema
      required:
        - id
        - name
        - key
        - type
        - value
      properties:
        id:
          type: string
        name:
          type: string
        key:
          description: >-
            A lookup safe version of the name that is lowercased and spaces are
            replaced with underscores. For instance, if name is `Product Type`,
            key will be `product_type`
          type: string
        type:
          type: string
          example: number
        value:
          description: For numeric attributes
          type: number
    BooleanAttribute:
      title: BooleanAttribute
      description: Attribute for boolean values
      type: object
      readOnly: true
      externalDocs:
        url: https://llm-docs.commercengine.io/storefront/schemas/BooleanAttribute
        description: API reference for the BooleanAttribute schema
      required:
        - id
        - name
        - key
        - type
        - value
      properties:
        id:
          type: string
        name:
          type: string
        key:
          description: >-
            A lookup safe version of the name that is lowercased and spaces are
            replaced with underscores. For instance, if name is `Product Type`,
            key will be `product_type`
          type: string
        type:
          type: string
          example: boolean
        value:
          description: For boolean attributes
          type: boolean
  responses:
    Unauthorized:
      description: Not authorized for given operation on the Resource
      content:
        application/json:
          schema:
            type: object
            required:
              - message
              - success
              - code
            properties:
              message:
                type: string
                examples:
                  - Not authorized for given operation on the Resource.
                x-speakeasy-error-message: true
              success:
                type: boolean
                default: false
              code:
                type: string
                examples:
                  - unauthorized
  securitySchemes:
    Authorization:
      type: http
      description: Access token
      scheme: bearer

````