> ## 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.

# Create order

> Creates an order from a cart. Returns an `Order` object along with `payment_required` and `payment_info`. When `payment_required` is `true`, use `payment_info` to initiate the payment flow, then poll `/orders/{order_number}/payment-status` from your return URL.



## OpenAPI

````yaml post /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:
    post:
      tags:
        - Orders
      summary: Create order
      description: >-
        Creates an order from a cart. Returns an `Order` object along with
        `payment_required` and `payment_info`. When `payment_required` is
        `true`, use `payment_info` to initiate the payment flow, then poll
        `/orders/{order_number}/payment-status` from your return URL.
      operationId: create-order
      requestBody:
        description: Request body
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - cart_id
              properties:
                cart_id:
                  type: string
                payment_method:
                  $ref: '#/components/schemas/PaymentMethodPayload'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                required:
                  - message
                  - success
                  - content
                properties:
                  message:
                    type: string
                  success:
                    type: boolean
                  content:
                    properties:
                      order:
                        $ref: '#/components/schemas/Order'
                      payment_required:
                        type: boolean
                      payment_info:
                        oneOf:
                          - $ref: '#/components/schemas/JusPayHyperCheckoutResponse'
                          - $ref: '#/components/schemas/JusPayExpressCheckoutResponse'
                          - $ref: '#/components/schemas/PayuPaymentInfo'
                    required:
                      - order
                      - payment_required
                      - payment_info
                    type: object
          links:
            GetCreatedOrder:
              operationId: get-order-detail
              parameters:
                order_number: $response.body#/content/order/order_number
              description: Retrieve the newly created order.
            PollPaymentStatus:
              operationId: get-payment-status
              parameters:
                order_number: $response.body#/content/order/order_number
              description: Poll the payment status of the newly created order.
            AuthenticateDirectOtp:
              operationId: authenticate-direct-otp
              requestBody:
                challenge_id: >-
                  $response.body#/content/payment_info/payment/authentication/params/challenge_id
                txn_id: >-
                  $response.body#/content/payment_info/payment/authentication/params/id
              description: >-
                Authenticate with direct OTP when express checkout returns
                `payment.authentication.params` with `submit_otp_allowed: true`.
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
      security:
        - Authorization: []
      externalDocs:
        url: https://llm-docs.commercengine.io/storefront/operations/create-order
        description: API reference for the create-order operation
components:
  schemas:
    PaymentMethodPayload:
      title: PaymentMethodPayload
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/storefront/schemas/PaymentMethodPayload
        description: API reference for the PaymentMethodPayload schema
      oneOf:
        - $ref: '#/components/schemas/JusPayHyperCheckout'
        - $ref: '#/components/schemas/JusPayExpressCheckout'
        - $ref: '#/components/schemas/BankTransferCheckout'
        - $ref: '#/components/schemas/LotusPayCheckout'
    Order:
      title: Order
      type: object
      externalDocs:
        url: https://llm-docs.commercengine.io/storefront/schemas/Order
        description: API reference for the Order schema
      required:
        - applied_promotions
        - applied_coupons
      properties:
        order_number:
          description: >-
            Unique, human-readable order identifier used across all order
            endpoints.
          type: string
        order_date:
          type: string
          format: date-time
        status:
          description: >-
            Current fulfillment status of the order. Progresses from `confirmed`
            through shipping stages to `complete`.
          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
            - pending
        payment_status:
          description: >-
            Current payment status. Poll `/orders/{order_number}/payment-status`
            after a payment attempt until this is `success` or `failed`.
          type: string
          enum:
            - pending
            - success
            - failed
            - partially_paid
        payment_success_date:
          type:
            - string
            - 'null'
        customer_note:
          type:
            - string
            - 'null'
        is_promotion_applied:
          type: boolean
        promotion_discount_amount:
          type: number
          format: double
        promotion_discount_percent:
          type: number
          format: double
        is_coupon_applied:
          type: boolean
        coupon_code:
          type:
            - string
            - 'null'
        coupon_discount_amount:
          type: number
          format: double
        coupon_discount_percent:
          type: number
          format: double
        applied_promotions:
          description: >-
            Information about the promotional offers that have been applied to
            the cart.
          type: array
          items:
            $ref: '#/components/schemas/AppliedPromotion'
        applied_coupons:
          description: >-
            This key provides details about the savings in cart after coupon
            have been applied to the cart.
          type: array
          items:
            $ref: '#/components/schemas/AppliedCoupon'
        promotion_savings:
          description: Total savings from auto-applied promotions.
          type: number
          format: float
          minimum: 0
        coupon_savings:
          description: Total savings from the applied coupon code.
          type: number
          format: float
          minimum: 0
        other_savings:
          description: >-
            Total savings from loyalty points, credit balance, and other
            non-promotion/coupon discounts.
          type: number
          format: float
          minimum: 0
        total_savings:
          description: Combined savings across promotions, coupons, and other discounts.
          type: number
          format: float
          minimum: 0
        on_subscription:
          type: boolean
        subtotal:
          type: number
          format: double
        item_total_tax:
          type: number
          format: double
        subtotal_including_tax:
          type: number
          format: double
        shipping_estimated_cost:
          type: number
          format: double
          minimum: 0
        shipping_discount_amount:
          type: number
          format: double
          minimum: 0
        shipping_amount:
          type: number
          format: double
        shipping_tax_rate:
          type: number
          format: double
          minimum: 0
        shipping_tax_amount:
          type: number
          format: double
          minimum: 0
        shipping_amount_including_tax:
          type: number
          format: double
          minimum: 0
        fulfillment_preference:
          $ref: '#/components/schemas/FulfillmentPreference'
        estimated_delivery_days:
          type:
            - integer
            - 'null'
        handling_charge_excluding_tax:
          type: number
          format: double
          minimum: 0
        handling_charge_tax_amount:
          type: number
          format: double
          minimum: 0
        handling_charge_including_tax:
          type: number
          format: double
          minimum: 0
        total_tax:
          type: number
          format: double
        grand_total:
          type: number
          format: double
        loyalty_points_earned:
          type: integer
          minimum: 0
        loyalty_points_redeemed:
          type: integer
          minimum: 0
        credit_balance_used:
          type: integer
        to_be_paid:
          type: number
          format: double
        order_items_count:
          type: integer
        order_items:
          type: array
          items:
            $ref: '#/components/schemas/OrderItem'
        billing_address:
          $ref: '#/components/schemas/CustomerAddress'
        shipping_address:
          $ref: '#/components/schemas/CustomerAddress'
        currency:
          type: object
          properties:
            name:
              type: string
            code:
              type: string
            symbol:
              type: string
        metadata:
          description: Additional metadata associated with the order.
          type:
            - object
            - 'null'
          additionalProperties:
            type: string
        is_cancellation_allowed:
          description: >-
            Whether the order is eligible for cancellation. Only show the cancel
            action in your UI when this is `true`.
          type: boolean
        cancellation_refund_details:
          description: >-
            Breakdown of the refund the customer would receive upon
            cancellation. Only populated when `is_cancellation_allowed` is
            `true`.
          type: object
          properties:
            loyalty_point:
              description: >-
                loyalty point redeemed will be rollbacked and credited to user
                account.
              type: integer
            refundable_amount:
              description: amount that will be refunded to customer.
              type: number
            cancellation_charges:
              description: amount deducted from paid amount.
              type: number
            cancellation_charges_reason:
              description: reason for cancellation charges.
              type: string
            payment_mode:
              description: payment mode for refund.
              type: string
              enum:
                - original-payment-mode
                - bank-transfer
                - nach-mandate
        feedback:
          type:
            - string
            - 'null'
    JusPayHyperCheckoutResponse:
      title: JusPayHyperCheckoutResponse
      type: object
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/storefront/schemas/JusPayHyperCheckoutResponse
        description: API reference for the JusPayHyperCheckoutResponse schema
      properties:
        id:
          type: string
        status:
          type: string
        order_id:
          type: string
        payment_links:
          type: object
          properties:
            web:
              type: string
            expiry:
              type:
                - string
                - 'null'
        sdk_payload:
          type: object
          properties:
            requestId:
              type: string
            service:
              type: string
            payload:
              type: object
              properties:
                clientId:
                  type: string
                merchantId:
                  type: string
                clientAuthToken:
                  type: string
                clientAuthTokenExpiry:
                  type: string
                environment:
                  type: string
                orderId:
                  type: string
                amount:
                  type: string
                action:
                  type: string
                customerId:
                  type: string
                firstName:
                  type: string
                lastName:
                  type: string
                returnUrl:
                  type: string
                customerPhone:
                  type: string
                customerEmail:
                  type: string
                currency:
                  type: string
                description:
                  type: string
                options.createMandate:
                  description: >
                    Use for taking consent of subscription payments. If this key
                    is used it will ask user to give consent for subscription
                    payment.
                  const: REQUIRED
                mandate.maxAmount:
                  description: Maximum amount that can be charged in recurring payment.
                  type: string
                'mandate.start_date ':
                  description: subscription start time
                  type: string
                'mandate.end_date ':
                  description: subscription end time
                  type: string
                mandate.frequency:
                  description: subscription frequency
                  const: MONTHLY
                'mandate.rule_value ':
                  description: >-
                    When frequency is passed as WEEKLY, FORTNIGHTLY, MONTHLY,
                    BIMONTHLY, QUARTERLY, HALFYEARLY, or YEARLY then is it
                    required that the exact day of the period should be passed.


                    1-7 when frequency is WEEKLY. In weekly, serial numbers
                    start from Monday. Monday represents 1 and Sunday represents
                    7.


                    1-16 when frequency is FORTNIGHTLY. This mandate is executed
                    twice a month. First day of the month is represented by
                    value '1' and ends with '15' on 15th day of the month. Then
                    again starts with '1' for 16th of the month and ends with
                    the last day of the month.


                    1-31 when frequency is MONTHLY, BIMONTHLY, QUARTERLY,
                    HALFYEARLY, or YEARLY.
                  type: string
                  enum:
                    - 1-7
                    - 1-16
                    - 1-31
        order_expiry:
          type: string
          format: date-time
    JusPayExpressCheckoutResponse:
      title: JusPayExpressCheckoutResponse
      type: object
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/storefront/schemas/JusPayExpressCheckoutResponse
        description: API reference for the JusPayExpressCheckoutResponse schema
      required:
        - txn_id
        - txn_uuid
        - status
        - order_id
        - juspay
        - offer_details
        - payment
      properties:
        txn_id:
          description: The transaction ID of the payment.
          type: string
        txn_uuid:
          description: The transaction UUID of the payment.
          type: string
        status:
          description: The status of the payment.
          type: string
        order_id:
          description: The order ID of the payment.
          type: string
        juspay:
          type: object
          properties:
            client_auth_token:
              type: string
            client_auth_token_expiry:
              type: string
        offer_details:
          type: object
          properties:
            offers:
              type: array
              items:
                type: object
          required:
            - offers
        payment:
          type: object
          properties:
            sdk_params:
              type: object
              properties:
                tr:
                  type: string
                merchant_vpa:
                  type: string
                customer_last_name:
                  type: string
                merchant_name:
                  type: string
                pg_intent_url:
                  description: >-
                    The UPI intent URL of the payment. This URL is used to
                    redirect the customer to the UPI app for payment.
                  type: string
                amount:
                  type: string
                tid:
                  type: string
                customer_first_name:
                  type: string
            authentication:
              type: object
              properties:
                method:
                  type: string
                  const: GET
                url:
                  type: string
                  format: uri
                params:
                  description: >-
                    Available only when Direct OTP is enabled for the card;
                    otherwise this object is absent.
                  type: object
                  properties:
                    card_issuer_bank_name:
                      type: string
                    id:
                      description: >-
                        This field is used as txn_id in Verify Direct OTP and
                        Resend Direct OTP endpoints payload.
                      type: string
                    fallback_url:
                      type: string
                    challenge_id:
                      description: >-
                        This field is required in Verify Direct OTP and Resend
                        Direct OTP endpoints.
                      type: string
                    resend_otp_allowed:
                      description: >-
                        This field is used to decide whether API request can be
                        sent to Resend OTP API or not.
                      type: boolean
                    auth_type:
                      type: string
                    submit_otp_allowed:
                      description: >-
                        This field is used to decide whether OTP can be verified
                        using Authenticate Direct OTP API or not.
                      type: boolean
                    card_isin:
                      type: string
              required:
                - method
                - url
    PayuPaymentInfo:
      title: PayuPaymentInfo
      type: object
      externalDocs:
        url: https://llm-docs.commercengine.io/storefront/schemas/PayuPaymentInfo
        description: API reference for the PayuPaymentInfo schema
      properties:
        key:
          type: string
        txnid:
          type: string
        amount:
          type: number
          format: double
        productinfo:
          type: string
        firstname:
          type: string
        lastname:
          type: string
        email:
          type: string
        phone:
          type: string
        si:
          description: >-
            To be used in case we want to take consent for subscription payment.

            To create consent for subscription, value of this parameter must be
            1.
          type: integer
          const: 1
        si_details:
          description: Send this json object for creating subscription consent.
          type: object
          properties:
            billingAmount:
              description: Maximum amount that can be charged in recurring payment.
              type: number
              format: double
            billingCurrency:
              type: string
              const: INR
            billingCycle:
              description: Subscription frequency.
              type: string
              const: MONTHLY
            billingInterval:
              description: >-
                Billing Interval is closely coupled with the billingCycle field
                and denotes at what frequency, the subscription plan needs to be
                executed. For monthly subscriptions, parameter values need to be
                sent in the request are:

                billingCycle = MONTHLY

                billingInterval = 1

                Similarly, by keeping the following values, customer will be
                charged once in every 3 days:

                billingCycle = DAILY

                billingInterval = 3
              type: integer
            paymentStartDate:
              description: subscription start date
              type: string
              format: date
            paymentEndDate:
              description: subscription end date
              type: string
              format: date
        furl:
          description: return url in case of payment failure.
          type: string
        surl:
          description: return url in case of payment success.
          type: string
        hash:
          type: string
    JusPayHyperCheckout:
      title: JusPayHyperCheckout
      type: object
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/storefront/schemas/JusPayHyperCheckout
        description: API reference for the JusPayHyperCheckout schema
      required:
        - payment_provider_slug
        - integration_type
        - return_url
        - action
      properties:
        payment_provider_slug:
          description: The slug of the payment provider in Commerce Engine.
          type: string
        integration_type:
          type: string
          const: hyper-checkout
        gateway_reference_id:
          description: >-
            The reference ID of the payment gateway. When provided, payments
            will always be routed through this gateway.
          type: string
        return_url:
          description: >-
            The URL to which the customer will be redirected after the payment
            is complete.
          type: string
        action:
          description: >-
            The action to be performed. `paymentPage` is the default option that
            you should select when using hyper-checkout.
          type: string
          enum:
            - paymentPage
    JusPayExpressCheckout:
      title: JusPayExpressCheckout
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/storefront/schemas/JusPayExpressCheckout
        description: API reference for the JusPayExpressCheckout schema
      oneOf:
        - $ref: '#/components/schemas/JusPayNewCard'
        - $ref: '#/components/schemas/JusPaySavedCardToken'
        - $ref: '#/components/schemas/JuspayNetBanking'
        - $ref: '#/components/schemas/JuspayUpiCollect'
        - $ref: '#/components/schemas/JuspayUpiIntent'
    BankTransferCheckout:
      title: BankTransferCheckout
      type: object
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/storefront/schemas/BankTransferCheckout
        description: API reference for the BankTransferCheckout schema
      required:
        - payment_provider_slug
        - payment_method_type
      properties:
        payment_provider_slug:
          description: The slug of the payment provider in Commerce Engine.
          type: string
          const: icici-ecollection
        payment_method_type:
          type: string
          const: bank-transfer
    LotusPayCheckout:
      title: LotusPayCheckout
      type: object
      externalDocs:
        url: https://llm-docs.commercengine.io/storefront/schemas/LotusPayCheckout
        description: API reference for the LotusPayCheckout schema
      required:
        - payment_provider_slug
        - payment_method_type
        - mandate_id
      properties:
        payment_provider_slug:
          description: The slug of the payment provider in Commerce Engine.
          type: string
          const: juspay
        payment_method_type:
          type: string
          const: NACH
        mandate_id:
          description: The ID of the active mandate.
          type: string
    AppliedPromotion:
      title: AppliedPromotion
      description: Details about an active promotion applied to a cart/order
      type: object
      externalDocs:
        url: https://llm-docs.commercengine.io/storefront/schemas/AppliedPromotion
        description: API reference for the AppliedPromotion schema
      required:
        - promotion_id
        - promotion_type
        - savings
        - product_id
        - variant_id
        - product_name
        - variant_name
        - applied_sequence
        - scope
      properties:
        promotion_id:
          type: string
        promotion_type:
          enum:
            - discount
            - free-goods
            - free-shipping
            - buy-x-get-y
            - volume-based
        savings:
          type: number
        product_id:
          type:
            - string
            - 'null'
        variant_id:
          type:
            - string
            - 'null'
        product_name:
          type:
            - string
            - 'null'
        variant_name:
          type:
            - string
            - 'null'
        applied_sequence:
          type: number
        scope:
          type: string
    AppliedCoupon:
      title: AppliedPromotion
      description: Details about an active coupon applied to a cart/order
      type: object
      externalDocs:
        url: https://llm-docs.commercengine.io/storefront/schemas/AppliedCoupon
        description: API reference for the AppliedCoupon schema
      required:
        - coupon_id
        - coupon_type
        - savings
        - product_id
        - variant_id
        - product_name
        - variant_name
      properties:
        coupon_id:
          type: string
        coupon_type:
          enum:
            - discount
            - free-goods
            - fixed-price
            - free-shipping
            - buy-x-get-y
            - volume-based
            - accelerated-rewards
        savings:
          type: number
        product_id:
          type:
            - string
            - 'null'
        variant_id:
          type:
            - string
            - 'null'
        product_name:
          type:
            - string
            - 'null'
        variant_name:
          type:
            - string
            - 'null'
    FulfillmentPreference:
      title: FulfillmentPreference
      description: >-
        How the customer wants to receive their order. Discriminated by
        `fulfillment_type`: `delivery` for home delivery, `collect-in-store` for
        in-store pickup, or `partial-collect-and-delivery` for a mix of both.
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/storefront/schemas/FulfillmentPreference
        description: API reference for the FulfillmentPreference schema
      discriminator:
        propertyName: fulfillment_type
        mapping:
          collect-in-store:
            $ref: '#/components/schemas/CollectInStoreFulfillment'
          delivery:
            $ref: '#/components/schemas/DeliveryFulfillment'
          partial-collect-and-delivery:
            $ref: '#/components/schemas/PartialCollectAndDelivery'
      oneOf:
        - $ref: '#/components/schemas/CollectInStoreFulfillment'
        - $ref: '#/components/schemas/DeliveryFulfillment'
        - $ref: '#/components/schemas/PartialCollectAndDelivery'
      x-tags:
        - Carts
    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'
    CustomerAddress:
      title: CustomerAddress
      type:
        - object
        - 'null'
      externalDocs:
        url: https://llm-docs.commercengine.io/storefront/schemas/CustomerAddress
        description: API reference for the CustomerAddress schema
      required:
        - first_name
        - last_name
        - country_code
        - phone
        - email
        - address_line1
        - address_line2
        - landmark
        - pincode
        - city
        - state
        - country
        - tax_identification_number
        - business_name
        - is_phone_verified
        - is_email_verified
      properties:
        id:
          type:
            - string
            - 'null'
          pattern: ^[0123456789ABCDEFGHJKMNPQRSTVWXYZ]{26}$
          readOnly: true
        first_name:
          type: string
        last_name:
          type:
            - string
            - 'null'
        country_code:
          description: "Two-letter code begin with a plus sign prefix that identifies different countries. By default it will be +91 if not provided.\r\n"
          type: string
        phone:
          description: 10 digit phone number without country code.
          type: string
        email:
          type: string
        address_line1:
          type: string
        address_line2:
          type:
            - string
            - 'null'
        landmark:
          type:
            - string
            - 'null'
        pincode:
          type: string
        city:
          type: string
        state:
          type: string
        country:
          type: string
          const: India
        tax_identification_number:
          description: Tax Identification Number specific to the country of operation.
          type:
            - string
            - 'null'
          examples: []
        business_name:
          description: Use in billing & shipping details only.
          type:
            - string
            - 'null'
        is_default_billing:
          description: >-
            Indicates if the address is the default billing address for the
            customer.
          type: boolean
        is_default_shipping:
          description: >-
            Indicates if the address is the default shipping address for the
            customer.
          type: boolean
        is_phone_verified:
          type: boolean
          readOnly: true
        is_email_verified:
          type: boolean
          readOnly: true
        nickname:
          description: Nickname for the address.
          type:
            - string
            - 'null'
          default: null
      examples: []
    JusPayNewCard:
      title: JusPayNewCard
      externalDocs:
        url: https://llm-docs.commercengine.io/storefront/schemas/JusPayNewCard
        description: API reference for the JusPayNewCard schema
      allOf:
        - $ref: '#/components/schemas/JusPayExpressCheckoutCommonField'
        - type: object
          properties:
            save_to_locker:
              description: >-
                Whether to save the card to the locker. If true, the card will
                be saved to the locker and can be used for future payments as
                per RBI regulations.
              type: boolean
            payment_method_type:
              type: string
              const: CARD
            card_number:
              type: string
            card_exp_month:
              type: string
            card_exp_year:
              type: string
            name_on_card:
              type: string
            card_security_code:
              type: string
          required:
            - save_to_locker
            - payment_method_type
            - card_number
            - card_exp_month
            - card_exp_year
            - name_on_card
            - card_security_code
    JusPaySavedCardToken:
      title: JusPaySavedCardToken
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/storefront/schemas/JusPaySavedCardToken
        description: API reference for the JusPaySavedCardToken schema
      allOf:
        - $ref: '#/components/schemas/JusPayExpressCheckoutCommonField'
        - type: object
          properties:
            save_to_locker:
              description: >-
                Whether to save the card to the locker. If true, the card will
                be saved to the locker and can be used for future payments as
                per RBI regulations.
              type: boolean
            payment_method_type:
              type: string
              const: CARD
            payment_method:
              description: >-
                Payment method of the card. Please check which payment method is
                supported by the gateway.
              type: string
              enum:
                - VISA
                - MASTER
                - RUPAY
                - AMEX
                - DINERS
                - DISCOVER
                - JCB
                - MAESTRO
            card_token:
              description: >-
                Token of the card. This is the token that is used to identify
                the card in the gateway.
              type: string
            card_security_code:
              description: >-
                Security code of the card. This is the security code that is
                used to identify the card in the gateway.
              type: string
          required:
            - save_to_locker
            - payment_method_type
            - payment_method
            - card_token
            - card_security_code
    JuspayNetBanking:
      title: JuspayNetBanking
      externalDocs:
        url: https://llm-docs.commercengine.io/storefront/schemas/JuspayNetBanking
        description: API reference for the JuspayNetBanking schema
      allOf:
        - $ref: '#/components/schemas/JusPayExpressCheckoutCommonField'
        - type: object
          properties:
            payment_method_type:
              type: string
              const: NB
            payment_method:
              type: string
          required:
            - payment_method_type
            - payment_method
    JuspayUpiCollect:
      title: JuspayUpiCollect
      externalDocs:
        url: https://llm-docs.commercengine.io/storefront/schemas/JuspayUpiCollect
        description: API reference for the JuspayUpiCollect schema
      allOf:
        - $ref: '#/components/schemas/JusPayExpressCheckoutCommonField'
        - type: object
          properties:
            payment_method_type:
              type: string
              const: UPI
            payment_method:
              type: string
              const: UPI_COLLECT
            upi_vpa:
              type: string
          required:
            - payment_method_type
            - payment_method
            - upi_vpa
    JuspayUpiIntent:
      title: JuspayUpiIntent
      externalDocs:
        url: https://llm-docs.commercengine.io/storefront/schemas/JuspayUpiIntent
        description: API reference for the JuspayUpiIntent schema
      allOf:
        - $ref: '#/components/schemas/JusPayExpressCheckoutCommonField'
        - type: object
          properties:
            payment_method_type:
              type: string
              const: UPI
            payment_method:
              type: string
              const: UPI_PAY
          required:
            - payment_method_type
            - payment_method
    CollectInStoreFulfillment:
      title: CollectInStoreFulfillment
      type: object
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/storefront/schemas/CollectInStoreFulfillment
        description: API reference for the CollectInStoreFulfillment schema
      required:
        - fulfillment_type
        - pickup_location_id
      properties:
        fulfillment_type:
          type: string
          const: collect-in-store
        preference_type:
          type: string
          enum:
            - user
            - auto
          readOnly: true
        pickup_location_id:
          type: string
        pickup_location_name:
          type: string
          readOnly: true
    DeliveryFulfillment:
      title: DeliveryFulfillment
      type: object
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/storefront/schemas/DeliveryFulfillment
        description: API reference for the DeliveryFulfillment schema
      required:
        - fulfillment_type
        - shipments
      properties:
        fulfillment_type:
          type: string
          const: delivery
        preference_type:
          type: string
          enum:
            - user
            - auto
          readOnly: true
        shipments:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              shipping_provider_id:
                type:
                  - string
              shipping_provider_name:
                type:
                  - string
                  - 'null'
                readOnly: true
              courier_company_id:
                type:
                  - string
                  - 'null'
              courier_company_name:
                type:
                  - string
                  - 'null'
                readOnly: true
            required:
              - id
              - shipping_provider_id
    PartialCollectAndDelivery:
      title: PartialCollectAndDelivery
      type: object
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/storefront/schemas/PartialCollectAndDelivery
        description: API reference for the PartialCollectAndDelivery schema
      required:
        - fulfillment_type
        - collect-in-store
        - delivery
      properties:
        fulfillment_type:
          type: string
          const: partial-collect-and-delivery
        preference_type:
          type: string
          enum:
            - user
            - auto
          readOnly: true
        collect-in-store:
          type: object
          properties:
            pickup_location_id:
              type: string
            pickup_location_name:
              type: string
              readOnly: true
            items:
              type: array
              items:
                $ref: '#/components/schemas/FulfillmentItem'
          required:
            - items
            - pickup_location_id
        delivery:
          type: object
          properties:
            shipping_provider_id:
              type: string
            shipping_provider_name:
              type:
                - string
                - 'null'
              readOnly: true
            courier_company_id:
              type:
                - string
                - 'null'
            courier_company_name:
              type:
                - string
                - 'null'
              readOnly: true
            items:
              type: array
              items:
                $ref: '#/components/schemas/FulfillmentItem'
          required:
            - shipping_provider_id
            - items
    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: []
    JusPayExpressCheckoutCommonField:
      title: JusPayExpressCheckoutCommonField
      type: object
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/storefront/schemas/JusPayExpressCheckoutCommonField
        description: API reference for the JusPayExpressCheckoutCommonField schema
      required:
        - payment_provider_slug
        - integration_type
        - return_url
      properties:
        payment_provider_slug:
          description: The slug of the payment provider in Commerce Engine.
          type: string
        integration_type:
          type: string
          const: express-checkout
        gateway_reference_id:
          description: >-
            The reference ID of the payment gateway. When provided, payments
            will always be routed through this gateway.
          type: string
        return_url:
          description: >-
            The URL to which the customer will be redirected after the payment
            is complete.
          type: string
    FulfillmentItem:
      title: FulfillmentItem
      type: object
      externalDocs:
        url: https://llm-docs.commercengine.io/storefront/schemas/FulfillmentItem
        description: API reference for the FulfillmentItem schema
      required:
        - product_id
        - product_name
        - variant_id
        - variant_name
        - quantity
      properties:
        product_id:
          type: string
        product_name:
          type: string
          readOnly: true
        variant_id:
          type:
            - string
            - 'null'
        variant_name:
          type:
            - string
            - 'null'
          readOnly: true
        quantity:
          type: integer
    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:
    BadRequest:
      description: Bad request
      content:
        application/json:
          schema:
            type: object
            required:
              - message
              - success
              - code
            properties:
              message:
                type: string
                x-speakeasy-error-message: true
              success:
                type: boolean
              code:
                type: string
              error:
                type: object
    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

````