> ## 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 POS order

> Creates an order from a POS cart. Returns an `Order` with `payment_required` and `payment_info`. Include `payment_method` to create an initial payment request. When the customer's loyalty points, credit balance or a discount pay the whole order, no payment is requested, whatever the method. Paid by points or a discount alone, the order comes back already `confirmed` (`awaiting_approval` when the store doesn't approve orders automatically; `complete` when it is collected in store with nothing to ship) with `payment_status` `success`. Paid by its credit balance, with or without points, it stays `pending` until that balance is settled against it. If the customer can't be identified at that moment, the order comes back `pending`, and its purchase completes once the customer is identified. When the credit balance pays only part of the order, its payments include a bank transfer for that credit, and the order stays `pending` until the credit is settled against it and the rest is paid. If the store's type can't be determined for the cashier's session, the request fails with a 503 and the `store-type-unavailable` error code, and nothing is placed: retry, or sign in on the device again. Credit balance applied to the cart must be within what the customer can spend now, which leaves out credit their other unpaid orders have claimed. When credit balance can't be used for a moment, an order using it fails with a 409 and the `credit-balance-unavailable` error code, and nothing is placed: retry shortly. The payment method must be one the store offers on the POS's sales channel; any other is refused with a 400.



## OpenAPI

````yaml https://openapi.commercengine.io/ce-pos.json post /pos/orders
openapi: 3.2.0
info:
  title: CE POS APIs
  description: >-
    The consolidated Point of Sale surface. Every operation is served under the
    storefront base URL; the POS backend proxies some of them to the admin
    service.
  version: '1.0'
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:
  - Authorization: []
tags:
  - name: section-identity
    summary: Identity
    kind: nav
  - name: Devices
    description: >-
      Set up the till: pair a device with the store using its pairing code, list
      the store's `PosLocation`s and `PosDevice`s, and claim a device for the
      signed-in user or release it.
    summary: Devices
    kind: nav
    parent: section-identity
  - name: Authentication
    description: >-
      Sign a staff member in on a paired device with a one-time password over
      SMS, WhatsApp or email, then refresh the access token or log out.
    summary: Authentication
    kind: nav
    parent: section-identity
  - name: Users
    description: >-
      The staff member signed in on the till, as a `PosUser` with their
      location, device and roles.
    summary: Users
    kind: nav
    parent: section-identity
  - name: section-customers
    summary: Customers
    kind: nav
  - name: Customers
    description: >-
      Look up the shopper at the till: list customers (`CustomerListItem`) and
      read one's full `CustomerDetail`.
    summary: Customers
    kind: nav
    parent: section-customers
  - name: Addresses
    description: >-
      A customer's saved addresses, as `Address` objects: list, add, update and
      remove them.
    summary: Addresses
    kind: nav
    parent: section-customers
  - name: section-catalog
    summary: Catalog
    kind: nav
  - name: Products
    description: >-
      Browse and search the catalog at the till: list `Product`s and SKUs, read
      a product and its variants, and show similar, up-sell and cross-sell
      items.
    summary: Products
    kind: nav
    parent: section-catalog
  - name: Reviews
    description: Read product reviews at the till.
    summary: Reviews
    kind: nav
    parent: section-catalog
  - name: Categories
    description: >-
      The store's categories, as `ProductCategory` objects with their child
      categories.
    summary: Categories
    kind: nav
    parent: section-catalog
  - name: Inventory
    description: >-
      Stock at the store's locations: list it by item, read an item's
      `InventoryDetail`, and follow the `InventoryActivity` that moved it.
    summary: Inventory
    kind: nav
    parent: section-catalog
  - name: section-shopping
    summary: Shopping
    kind: nav
  - name: Carts
    description: >-
      The till's `Cart`: create it, add, update or remove items, link the
      customer, set the address, and apply loyalty points or credit balance.
      Each update returns the full, updated `Cart`.
    summary: Carts
    kind: nav
    parent: section-shopping
  - name: Coupons & promotions
    description: >-
      The coupons and promotions a cart can use: list what the store offers, see
      which apply to a cart and why the rest don't, and apply or remove a
      coupon.
    summary: Coupons & promotions
    kind: nav
    parent: section-shopping
  - name: Fulfillment
    description: >-
      List the delivery and collect-in-store options for a cart, and save the
      cart's choice.
    summary: Fulfillment
    kind: nav
    parent: section-shopping
  - name: section-orders
    summary: Orders
    kind: nav
  - name: Orders
    description: >-
      Place an order from the till's cart and follow it: list orders, read an
      `OrderDetail` and its activity, check stock before it ships, and get its
      invoice, receipt and shipments.
    summary: Orders
    kind: nav
    parent: section-orders
  - name: Order payments
    description: >-
      Collect payment for an order: add payments toward what is left to pay,
      across one or more methods, poll the payment status, and retry a failed or
      expired payment.
    summary: Order payments
    kind: nav
    parent: section-orders
  - name: Shipments
    description: >-
      The shipments that fulfill orders: list them, read a `ShipmentDetail` with
      its activity and invoice, approve, reject or update one, send a
      replacement, and refund a shortfall.
    summary: Shipments
    kind: nav
    parent: section-orders
  - name: section-payments
    summary: Payments
    kind: nav
  - name: Payments
    description: >-
      The payment methods the till accepts and the checks around paying with
      them: card BIN details, VPA verification, and authenticating a payment
      with a direct OTP.
    summary: Payments
    kind: nav
    parent: section-payments
  - name: section-store
    summary: Store
    kind: nav
  - name: Locations
    description: States and pincodes for address forms.
    summary: Locations
    kind: nav
    parent: section-store
paths:
  /pos/orders:
    post:
      tags:
        - Orders
      summary: Create POS order
      description: >-
        Creates an order from a POS cart. Returns an `Order` with
        `payment_required` and `payment_info`. Include `payment_method` to
        create an initial payment request. When the customer's loyalty points,
        credit balance or a discount pay the whole order, no payment is
        requested, whatever the method. Paid by points or a discount alone, the
        order comes back already `confirmed` (`awaiting_approval` when the store
        doesn't approve orders automatically; `complete` when it is collected in
        store with nothing to ship) with `payment_status` `success`. Paid by its
        credit balance, with or without points, it stays `pending` until that
        balance is settled against it. If the customer can't be identified at
        that moment, the order comes back `pending`, and its purchase completes
        once the customer is identified. When the credit balance pays only part
        of the order, its payments include a bank transfer for that credit, and
        the order stays `pending` until the credit is settled against it and the
        rest is paid. If the store's type can't be determined for the cashier's
        session, the request fails with a 503 and the `store-type-unavailable`
        error code, and nothing is placed: retry, or sign in on the device
        again. Credit balance applied to the cart must be within what the
        customer can spend now, which leaves out credit their other unpaid
        orders have claimed. When credit balance can't be used for a moment, an
        order using it fails with a 409 and the `credit-balance-unavailable`
        error code, and nothing is placed: retry shortly. The payment method
        must be one the store offers on the POS's sales channel; any other is
        refused with a 400.
      operationId: create-pos-order
      parameters: []
      requestBody:
        description: Request body
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - cart_id
              properties:
                cart_id:
                  type: string
                  maxLength: 256
                  minLength: 1
                  pattern: \S
                payment_method:
                  $ref: '#/components/schemas/PosPaymentMethodPayload'
                device_id:
                  type: string
                  maxLength: 256
                  minLength: 1
                  pattern: \S
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                required:
                  - message
                  - success
                  - content
                  - events
                properties:
                  message:
                    type: string
                  success:
                    type: boolean
                  content:
                    properties:
                      order:
                        $ref: '#/components/schemas/Order'
                      payment_required:
                        description: >-
                          `true` when something is left to pay after the
                          customer's loyalty points, credit balance and
                          discounts; `false` when they pay the whole order.
                        type: boolean
                      payment_info:
                        description: >-
                          Gateway initiation details when an auto payment method
                          is used and something is left to pay; otherwise
                          `null`. Always `null` when `payment_required` is
                          `false`.
                        anyOf:
                          - $ref: '#/components/schemas/JusPayHyperCheckoutResponse'
                          - $ref: '#/components/schemas/JusPayExpressCheckoutResponse'
                          - type: 'null'
                          - $ref: '#/components/schemas/PayuPaymentInfo'
                    required:
                      - order
                      - payment_required
                      - payment_info
                    type: object
                  events:
                    description: >-
                      Analytics events to emit for the change this request made,
                      each with a server-issued `event_id`. Replay them to your
                      analytics destinations so your client-side and server-side
                      copies of the same action dedupe. Empty when the request
                      produced no analytics event.
                    type: array
                    items:
                      $ref: '#/components/schemas/OrderCreatedEvent'
        '400':
          $ref: '#/components/responses/BadRequest'
          description: >-
            Invalid cart, payment method or device. The device must exist and
            belong to the session location.
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
          description: The active cart or requested order was not found.
        '408':
          $ref: '#/components/responses/RequestTimeout'
        '409':
          description: >-
            The order uses credit balance, which can't be used at the moment.
            Nothing is placed; retry shortly.
          content:
            application/json:
              schema:
                type: object
                required:
                  - message
                  - success
                  - code
                properties:
                  message:
                    type: string
                    examples:
                      - >-
                        Paying with credit balance waits for the payment ledger
                        update to finish; try again shortly
                  success:
                    type: boolean
                    default: false
                  code:
                    type: string
                    examples:
                      - credit-balance-unavailable
                  details:
                    type: string
        '500':
          $ref: '#/components/responses/InternalServerError'
        '503':
          description: >-
            The store's type can't be determined for the cashier's session yet.
            Nothing is placed; retry, or sign in on the device again.
          content:
            application/json:
              schema:
                type: object
                required:
                  - message
                  - success
                  - code
                properties:
                  message:
                    type: string
                    examples:
                      - The store's type is not known yet. Try again.
                  success:
                    type: boolean
                    default: false
                  code:
                    type: string
                    examples:
                      - store-type-unavailable
                  details:
                    type: string
        '504':
          $ref: '#/components/responses/GatewayTimeout'
      security:
        - Authorization: []
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/admin-pos/operations/create-pos-order
components:
  schemas:
    PosPaymentMethodPayload:
      $ref: '#/components/schemas/OrderPaymentMethodPayload'
      title: POSPaymentMethodPayload
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/admin-pos/schemas/PosPaymentMethodPayload
    Order:
      title: Order
      type: object
      externalDocs:
        url: https://llm-docs.commercengine.io/admin-pos/schemas/Order
      required:
        - order_number
        - order_date
        - status
        - payment_status
        - payment_success_date
        - customer_note
        - is_promotion_applied
        - promotion_discount_amount
        - promotion_discount_percent
        - is_coupon_applied
        - coupon_code
        - coupon_discount_amount
        - coupon_discount_percent
        - applied_promotions
        - applied_coupons
        - promotion_savings
        - coupon_savings
        - other_savings
        - total_savings
        - on_subscription
        - subtotal
        - subtotal_including_tax
        - shipping_estimated_cost
        - shipping_discount_amount
        - shipping_amount
        - shipping_tax_rate
        - shipping_tax_amount
        - shipping_amount_including_tax
        - fulfillment_preference
        - estimated_delivery_days
        - handling_charge_excluding_tax
        - handling_charge_tax_amount
        - handling_charge_including_tax
        - total_tax
        - grand_total
        - loyalty_points_earned
        - loyalty_points_redeemed
        - credit_balance_used
        - to_be_paid
        - order_items_count
        - order_items
        - billing_address
        - shipping_address
        - currency
        - metadata
        - is_cancellation_allowed
        - cancellation_refund_details
        - feedback
        - cart_id
        - coupon_id
        - cancellation_reason
        - shipping_provider_id
        - courier_company_id
        - shipping_provider_name
        - courier_company_name
        - fulfillment_type
        - items_tax_amount
        - loyalty_point_eligible_amount
        - sales_channel
        - created_at
        - modified_at
        - shipments
      properties:
        order_number:
          description: >-
            Unique, human-readable order identifier used across all order
            endpoints.
          type: string
        order_date:
          type: string
          format: date-time
        status:
          $ref: '#/components/schemas/OrderStatus'
          description: >-
            Current fulfillment status of the order. Progresses from `confirmed`
            through shipping stages to `complete`; a collect-in-store order with
            nothing to ship is `complete` as soon as it is paid, unless it was
            already accepted on the customer's credit line (it then stays
            `confirmed`). `pending` while it awaits payment, and
            `payment_failed` once every payment attempt failed (a payment retry
            reopens it). An order with one shipment can also take that
            shipment's `schedule_requested`, `processing`, `sent_to_store`,
            `ready_to_collect` or `lost`.
        payment_status:
          $ref: '#/components/schemas/OrderPaymentStatus'
          description: >-
            Current payment status. Poll `/orders/{order_number}/payment-status`
            after a payment attempt until this is `success` or `failed`.
            `debit_scheduled` and `collection_due`: the order is on the
            customer's credit line, to be debited from their bank account by
            NACH mandate, or collected later. `refund_initiated` and `refunded`:
            refunds covering what was paid are on their way, or done.
        payment_success_date:
          type:
            - string
            - 'null'
          format: date-time
        customer_note:
          type:
            - string
            - 'null'
        is_promotion_applied:
          type: boolean
        promotion_discount_amount:
          type: number
          format: double
        promotion_discount_percent:
          type:
            - number
            - 'null'
          format: double
        is_coupon_applied:
          type: boolean
        coupon_code:
          type:
            - string
            - 'null'
        coupon_discount_amount:
          type: number
          format: double
        coupon_discount_percent:
          type:
            - number
            - 'null'
          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: Monetary promotion savings; bonus loyalty points are excluded.
          type: number
          format: float
          minimum: 0
        coupon_savings:
          description: Monetary coupon savings; bonus loyalty points are excluded.
          type: number
          format: float
          minimum: 0
        other_savings:
          description: >-
            Nonnegative markdown savings between listing price and original
            selling price, across positive-quantity items.
          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
        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:
          description: >-
            How the customer wants to receive the order. `null` when the order
            has no fulfillment preference (e.g. created without a checkout).
          oneOf:
            - $ref: '#/components/schemas/FulfillmentPreference'
            - type: 'null'
        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: number
          minimum: 0
        loyalty_points_redeemed:
          type: number
          minimum: 0
        credit_balance_used:
          type: number
        to_be_paid:
          type: number
          format: double
        order_items_count:
          type: integer
        order_items:
          type: array
          items:
            $ref: '#/components/schemas/OrderItemRead'
        billing_address:
          $ref: '#/components/schemas/OrderAddress'
        shipping_address:
          $ref: '#/components/schemas/OrderAddress'
        currency:
          type: object
          properties:
            name:
              type: string
            code:
              type: string
            symbol:
              type: string
        metadata:
          description: >-
            Additional metadata associated with the order: its point-of-sale
            details, and the custom metadata given at checkout as further keys.
          type:
            - object
            - 'null'
          properties:
            pos_user_id:
              description: >-
                The point-of-sale user who placed the order; `null` when not
                placed at a point of sale.
              type:
                - string
                - 'null'
            pos_device_id:
              description: >-
                The point-of-sale device the order was placed on; `null` when
                not placed at a point of sale.
              type:
                - string
                - 'null'
            origin_location_id:
              description: The store location the order was placed at; `null` when not set.
              type:
                - string
                - 'null'
        is_cancellation_allowed:
          description: >-
            True for non-POS orders in draft, pending, awaiting_approval,
            schedule_requested or confirmed status.
          type: boolean
        cancellation_refund_details:
          description: >-
            Breakdown of the refund the customer would receive upon
            cancellation. Returned even when cancellation is unavailable; check
            `is_cancellation_allowed` before offering cancellation.
          type: object
          properties:
            loyalty_point:
              description: >-
                loyalty point redeemed will be rollbacked and credited to user
                account.
              type: number
            refundable_amount:
              description: >-
                What the customer gets back on cancellation: what the order's
                payments have left after its earlier refunds, refunds in
                progress included. Money held for an admin's review isn't
                included: it is refunded once the review releases it.
              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: >-
                How the refund is paid: `bank-transfer` to the customer's bank
                account when a bank transfer (credit balance included) paid the
                order; `original-payment-mode`, back through the payment
                gateway, otherwise. A cash or other offline payment is handed
                back by the store in the way it was paid, in either mode, with
                no bank account needed for it.
              type: string
              enum:
                - original-payment-mode
                - bank-transfer
          required:
            - loyalty_point
            - refundable_amount
            - cancellation_charges
            - cancellation_charges_reason
            - payment_mode
        feedback:
          type:
            - string
            - 'null'
        cart_id:
          description: ULID of the cart this order was created from. `null` if unavailable.
          type:
            - string
            - 'null'
        coupon_id:
          description: ID of the applied coupon. `null` when no coupon is applied.
          type:
            - string
            - 'null'
        cancellation_reason:
          description: Reason the order was cancelled. `null` when not cancelled.
          type:
            - string
            - 'null'
        shipping_provider_id:
          description: Order-level shipping provider ID. `null` until resolved.
          type:
            - string
            - 'null'
        courier_company_id:
          description: Order-level courier company ID. `null` until resolved.
          type:
            - string
            - 'null'
        shipping_provider_name:
          description: >-
            Order-level shipping provider name. Currently always `null`
            (resolved per shipment under `shipments[]`).
          type:
            - string
            - 'null'
        courier_company_name:
          description: >-
            Order-level courier company name. Currently always `null` (resolved
            per shipment under `shipments[]`).
          type:
            - string
            - 'null'
        fulfillment_type:
          description: >-
            Fulfillment type for the order (e.g. `delivery`,
            `collect-in-store`).
          type: string
        items_tax_amount:
          description: >-
            Total tax amount for the order items (same concept as the legacy
            `item_total_tax`).
          type: number
          format: double
          minimum: 0
        loyalty_point_eligible_amount:
          description: Order amount eligible for loyalty-point earning.
          type: number
        sales_channel:
          description: The sales channel the order belongs to.
          type: object
          properties:
            id:
              type:
                - string
                - 'null'
            name:
              type:
                - string
                - 'null'
            type:
              type:
                - string
                - 'null'
          required:
            - id
            - name
            - type
        created_at:
          description: Creation timestamp (ISO-8601).
          type: string
          format: date-time
        modified_at:
          description: Last-modification timestamp (ISO-8601).
          type: string
          format: date-time
        shipments:
          type: array
          items:
            $ref: '#/components/schemas/OrderShipment'
    JusPayHyperCheckoutResponse:
      title: JusPayHyperCheckoutResponse
      type: object
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/admin-pos/schemas/JusPayHyperCheckoutResponse
      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/admin-pos/schemas/JusPayExpressCheckoutResponse
      required:
        - txn_id
        - txn_uuid
        - status
        - order_id
        - 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/admin-pos/schemas/PayuPaymentInfo
      required:
        - key
        - txnid
        - amount
        - productinfo
        - firstname
        - email
        - phone
        - furl
        - surl
        - hash
      properties:
        key:
          type: string
        txnid:
          type: string
        amount:
          description: Payment amount as a decimal string with two fractional digits.
          type: string
        productinfo:
          type: string
        firstname:
          description: >-
            The billing first name, or null when the order has no billing
            address (a till sale without one).
          type:
            - string
            - 'null'
        lastname:
          type: string
        email:
          description: >-
            The billing email, or null when the order has no billing address (a
            till sale without one).
          type:
            - string
            - 'null'
        phone:
          description: >-
            The billing phone, or null when the order has no billing address (a
            till sale without one).
          type:
            - string
            - 'null'
        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: >-
            JSON-encoded subscription consent. Contains `billingAmount` as a
            decimal string, `billingCurrency` `INR`, `billingCycle` `ADHOC`, and
            `paymentStartDate` and `paymentEndDate` as dates. Pass this string
            unchanged with the payment.
          type: string
          contentMediaType: application/json
        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
    OrderCreatedEvent:
      title: OrderCreatedEvent
      description: Emitted when an order is placed, on every channel including POS.
      type: object
      externalDocs:
        url: https://llm-docs.commercengine.io/admin-pos/schemas/OrderCreatedEvent
      required:
        - event
        - event_id
        - order_number
        - cart_id
      properties:
        event:
          type: string
          const: Order Created
        event_id:
          description: >-
            Server-issued event id (ULID). Send it with your client-side copy of
            this event so both copies dedupe.
          type: string
          pattern: ^[0-7][0-9A-HJKMNP-TV-Z]{25}$
        order_number:
          description: The `Order` that was created.
          type: string
        cart_id:
          description: >-
            The cart the order was created from, or `null` when it did not
            originate from a cart.
          type:
            - string
            - 'null'
    OrderPaymentMethodPayload:
      title: OrderPaymentMethodPayload
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/admin-pos/schemas/OrderPaymentMethodPayload
      anyOf:
        - $ref: '#/components/schemas/JusPayHyperCheckout'
        - $ref: '#/components/schemas/JusPayExpressCheckout'
        - $ref: '#/components/schemas/ManualPaymentMethodCheckout'
    OrderStatus:
      title: OrderStatus
      type: string
      externalDocs:
        url: https://llm-docs.commercengine.io/admin-pos/schemas/OrderStatus
      enum:
        - draft
        - awaiting_approval
        - confirmed
        - schedule_requested
        - partially_scheduled
        - awaiting_shipment
        - shipped
        - partially_shipped
        - undelivered
        - partially_undelivered
        - return_to_origin
        - partially_return_to_origin
        - complete
        - partially_delivered
        - cancelled
        - pending
        - payment_failed
        - sent_to_store
        - ready_to_collect
        - processing
        - lost
    OrderPaymentStatus:
      title: OrderPaymentStatus
      type: string
      externalDocs:
        url: https://llm-docs.commercengine.io/admin-pos/schemas/OrderPaymentStatus
      enum:
        - pending
        - success
        - failed
        - partially_paid
        - refund_initiated
        - refunded
        - unsettled
        - settled
        - partially_settled
        - manual_review
        - debit_scheduled
        - collection_due
    AppliedPromotion:
      title: AppliedPromotion
      description: Details about an active promotion applied to a cart/order
      type: object
      externalDocs:
        url: https://llm-docs.commercengine.io/admin-pos/schemas/AppliedPromotion
      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
            - fixed-price
        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
            - 'null'
        scope:
          type:
            - string
            - 'null'
    AppliedCoupon:
      title: AppliedCoupon
      description: Details about an active coupon applied to a cart/order
      type: object
      externalDocs:
        url: https://llm-docs.commercengine.io/admin-pos/schemas/AppliedCoupon
      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
            - tiered-discount
        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/admin-pos/schemas/FulfillmentPreference
      discriminator:
        propertyName: fulfillment_type
        mapping:
          collect-in-store: '#/components/schemas/CollectInStoreFulfillment'
          delivery: '#/components/schemas/DeliveryFulfillment'
          partial-collect-and-delivery: '#/components/schemas/PartialCollectAndDelivery'
      oneOf:
        - $ref: '#/components/schemas/CollectInStoreFulfillment'
        - $ref: '#/components/schemas/DeliveryFulfillment'
        - $ref: '#/components/schemas/PartialCollectAndDelivery'
      x-tags:
        - Carts
    OrderItemRead:
      title: OrderItemRead
      externalDocs:
        url: https://llm-docs.commercengine.io/admin-pos/schemas/OrderItemRead
      allOf:
        - $ref: '#/components/schemas/OrderItem'
        - type: object
          required:
            - promotion_discount_percent
            - coupon_discount_percent
            - discount_amount
            - attributes
            - associated_options
            - seller_id
            - seller_product_id
            - seller_variant_id
            - seller_detail
    OrderAddress:
      title: OrderAddress
      description: >-
        A billing or shipping address as recorded on the order: a copy made when
        the order was placed, so later changes to the customer's saved addresses
        don't alter it. Its fields are `null` when the order was placed without
        them (e.g. at a point of sale).
      type: object
      externalDocs:
        url: https://llm-docs.commercengine.io/admin-pos/schemas/OrderAddress
      required:
        - id
        - first_name
        - last_name
        - business_name
        - phone
        - country_code
        - address_line1
        - address_line2
        - landmark
        - pincode
        - city
        - state
        - country
        - gstin
        - tax_identification_number
        - email
        - is_email_verified
        - is_phone_verified
      properties:
        id:
          description: 'Always `null`: the order''s address is a copy, not a saved address.'
          type: 'null'
        first_name:
          type:
            - string
            - 'null'
        last_name:
          type:
            - string
            - 'null'
        business_name:
          type:
            - string
            - 'null'
        phone:
          description: 10 digit phone number without country code.
          type:
            - string
            - 'null'
        country_code:
          description: Country calling code with a plus sign prefix, e.g. `+91`.
          type:
            - string
            - 'null'
        address_line1:
          type:
            - string
            - 'null'
        address_line2:
          type:
            - string
            - 'null'
        landmark:
          type:
            - string
            - 'null'
        pincode:
          type:
            - string
            - 'null'
        city:
          type:
            - string
            - 'null'
        state:
          type:
            - string
            - 'null'
        country:
          type:
            - string
            - 'null'
        gstin:
          description: GSTIN of the business the order was placed for, if given.
          type:
            - string
            - 'null'
        tax_identification_number:
          description: Tax Identification Number specific to the country of operation.
          type:
            - string
            - 'null'
        email:
          type:
            - string
            - 'null'
        is_email_verified:
          type: boolean
        is_phone_verified:
          type: boolean
    OrderShipment:
      title: OrderShipment
      description: Order shipment model
      type: object
      externalDocs:
        url: https://llm-docs.commercengine.io/admin-pos/schemas/OrderShipment
      required:
        - reference_number
        - status
        - total_weight
        - total_boxes
        - shipment_items_count
        - shipment_items
        - shipping_amount
        - shipping_tax_amount
        - shipping_amount_including_tax
        - courier_company_name
        - shipping_label_url
        - awb_no
        - tracking_url
        - eta_delivery
        - shipped_date
        - delivered_date
        - is_return_allowed
        - cancellation_reason
        - created_at
        - modified_at
        - shipping_estimated_cost
        - shipping_tax_rate
        - shipping_discount_amount
        - courier_company_id
        - shipping_provider_id
        - shipping_provider_name
        - promised_delivery_date
        - estimated_delivery_date
        - out_for_delivery_date
        - fulfillment_type
        - seller_id
        - seller_detail
      properties:
        reference_number:
          type: string
        status:
          $ref: '#/components/schemas/ShipmentStatus'
        total_weight:
          type: number
        total_boxes:
          type:
            - integer
            - 'null'
        shipment_items_count:
          type: integer
        shipment_items:
          type: array
          items:
            $ref: '#/components/schemas/OrderShipmentItem'
        shipping_amount:
          type: number
          format: double
        shipping_tax_amount:
          type: number
          format: double
        shipping_amount_including_tax:
          type: number
          format: double
        courier_company_name:
          type:
            - string
            - 'null'
        shipping_label_url:
          type:
            - string
            - 'null'
        awb_no:
          type:
            - string
            - 'null'
        tracking_url:
          type:
            - string
            - 'null'
        eta_delivery:
          type:
            - string
            - 'null'
        shipped_date:
          type:
            - string
            - 'null'
          format: date-time
        delivered_date:
          type:
            - string
            - 'null'
          format: date-time
        is_return_allowed:
          type: boolean
          default: false
        cancellation_reason:
          type:
            - string
            - 'null'
        created_at:
          type: string
          format: date-time
        modified_at:
          type: string
          format: date-time
        shipping_estimated_cost:
          type: number
          format: double
        shipping_tax_rate:
          type: number
          format: double
        shipping_discount_amount:
          type: number
          format: double
        courier_company_id:
          type:
            - string
            - 'null'
        shipping_provider_id:
          type:
            - string
            - 'null'
        shipping_provider_name:
          description: Shipping provider (courier aggregator) name.
          type:
            - string
            - 'null'
        promised_delivery_date:
          type:
            - string
            - 'null'
          format: date-time
        estimated_delivery_date:
          type:
            - string
            - 'null'
          format: date-time
        out_for_delivery_date:
          type:
            - string
            - 'null'
          format: date-time
        fulfillment_type:
          description: >-
            Fulfillment type for the shipment (e.g. `delivery`,
            `collect-in-store`).
          type: string
        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'
    JusPayHyperCheckout:
      title: JusPayHyperCheckout
      type: object
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/admin-pos/schemas/JusPayHyperCheckout
      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
          minLength: 1
          pattern: \S
        return_url:
          description: >-
            Return URL using http, https, ftp or ftps. App-specific URI schemes
            are not accepted.
          type: string
          format: uri
          pattern: ^(?:[hH][tT][tT][pP][sS]?|[fF][tT][pP][sS]?)://
        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/admin-pos/schemas/JusPayExpressCheckout
      oneOf:
        - anyOf:
            - $ref: '#/components/schemas/JusPayNewCard'
            - $ref: '#/components/schemas/JusPaySavedCardToken'
        - $ref: '#/components/schemas/JuspayNetBanking'
        - $ref: '#/components/schemas/JuspayUpiCollect'
        - $ref: '#/components/schemas/JuspayUpiIntent'
    ManualPaymentMethodCheckout:
      title: ManualPaymentMethodCheckout
      type: object
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/admin-pos/schemas/ManualPaymentMethodCheckout
      required:
        - payment_provider_slug
      properties:
        payment_provider_slug:
          description: >-
            The slug of an active manual payment method configured for the
            store.
          type: string
        payment_method_type:
          description: Optional label stored on the created payment request.
          type: string
      not:
        anyOf:
          - required:
              - integration_type
          - required:
              - mandate_id
          - properties:
              payment_method_type:
                const: NACH
            required:
              - payment_method_type
          - properties:
              payment_provider_slug:
                const: icici-ecollection
            required:
              - payment_provider_slug
    CollectInStoreFulfillment:
      title: CollectInStoreFulfillment
      type: object
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/admin-pos/schemas/CollectInStoreFulfillment
      required:
        - fulfillment_type
        - pickup_location_id
        - preference_type
      properties:
        fulfillment_type:
          type: string
          const: collect-in-store
        preference_type:
          type: string
          enum:
            - user
            - auto
          readOnly: true
        pickup_location_id:
          type:
            - string
            - 'null'
        pickup_location_name:
          type:
            - string
            - 'null'
          readOnly: true
    DeliveryFulfillment:
      title: DeliveryFulfillment
      type: object
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/admin-pos/schemas/DeliveryFulfillment
      required:
        - fulfillment_type
        - shipments
        - preference_type
      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
              - shipping_provider_name
              - courier_company_name
    PartialCollectAndDelivery:
      title: PartialCollectAndDelivery
      description: >-
        Automatic preferences can omit `collect_in_store` and `delivery`.
        Provide both for a user-selected preference.
      type: object
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/admin-pos/schemas/PartialCollectAndDelivery
      required:
        - fulfillment_type
        - preference_type
      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
                - 'null'
            pickup_location_name:
              type:
                - string
                - 'null'
              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
    OrderItem:
      type: object
      externalDocs:
        url: https://llm-docs.commercengine.io/admin-pos/schemas/OrderItem
      required:
        - product_id
        - product_name
        - product_image_url
        - product_type
        - sku
        - product_slug
        - variant_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
        - associated_options
        - attributes
        - seller_id
        - seller_detail
        - promotion_discount_percent
        - coupon_discount_percent
        - discount_amount
        - seller_product_id
        - seller_variant_id
      properties:
        product_id:
          type: string
        product_name:
          type:
            - string
            - 'null'
        product_image_url:
          type:
            - string
            - 'null'
        product_type:
          type:
            - string
            - 'null'
          enum:
            - physical
            - digital
            - bundle
            - null
        sku:
          type: string
        product_slug:
          type:
            - string
            - 'null'
        variant_slug:
          type:
            - string
            - 'null'
        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
            - 'null'
        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:
          description: The tax type used by the product's pricing, such as `GST`.
          type: string
          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'
        promotion_discount_percent:
          description: Promotion discount expressed as a percentage.
          type: number
          format: double
          minimum: 0
        coupon_discount_percent:
          description: Coupon discount expressed as a percentage.
          type: number
          format: double
          minimum: 0
        discount_amount:
          description: >-
            Total discount amount for the line ((listing_price - selling_price)
            * quantity).
          type: number
          format: double
        seller_product_id:
          description: >-
            Seller's product ID. Relevant for marketplace stores; `null`
            otherwise.
          type:
            - string
            - 'null'
        seller_variant_id:
          description: >-
            Seller's variant ID. Relevant for marketplace stores; `null`
            otherwise.
          type:
            - string
            - 'null'
    ShipmentStatus:
      type: string
      externalDocs:
        url: https://llm-docs.commercengine.io/admin-pos/schemas/ShipmentStatus
      enum:
        - unscheduled
        - schedule_requested
        - scheduled
        - packed
        - shipped
        - in_transit
        - out_for_delivery
        - delivery_attempted
        - undelivered
        - return_to_origin
        - delivered
        - cancelled
        - ready_to_collect
        - sent_to_store
        - processing
        - lost
    OrderShipmentItem:
      title: OrderShipmentItem
      description: A line in an order shipment.
      type: object
      externalDocs:
        url: https://llm-docs.commercengine.io/admin-pos/schemas/OrderShipmentItem
      required:
        - allowed_return_quantity
        - product_id
        - product_name
        - product_image_url
        - variant_id
        - variant_name
        - quantity
        - free_quantity
        - is_free_item
      properties:
        product_id:
          type: string
        product_name:
          type:
            - string
            - 'null'
        product_image_url:
          type:
            - string
            - 'null'
        variant_id:
          type:
            - string
            - 'null'
        variant_name:
          type:
            - string
            - 'null'
        quantity:
          type: integer
        free_quantity:
          type: integer
        is_free_item:
          type: boolean
        allowed_return_quantity:
          type: integer
          minimum: 0
    SellerInfo:
      title: SellerInfo
      type: object
      externalDocs:
        url: https://llm-docs.commercengine.io/admin-pos/schemas/SellerInfo
      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
            - 'null'
      examples: []
    JusPayNewCard:
      title: JusPayNewCard
      externalDocs:
        url: https://llm-docs.commercengine.io/admin-pos/schemas/JusPayNewCard
      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
              minLength: 1
              pattern: \S
            card_exp_month:
              type: string
              minLength: 1
              pattern: \S
            card_exp_year:
              type: string
              minLength: 1
              pattern: \S
            name_on_card:
              type: string
              minLength: 1
              pattern: \S
            card_security_code:
              type: string
              minLength: 1
              pattern: \S
            auth_type:
              type: string
              default: OTP
              minLength: 1
              pattern: \S
          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/admin-pos/schemas/JusPaySavedCardToken
      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: Optional card payment method supported by the payment provider.
              type: string
              minLength: 1
              pattern: \S
            card_token:
              description: >-
                Token of the card. This is the token that is used to identify
                the card in the gateway.
              type: string
              minLength: 1
              pattern: \S
            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
              minLength: 1
              pattern: \S
            auth_type:
              type: string
              default: OTP
              minLength: 1
              pattern: \S
          required:
            - save_to_locker
            - payment_method_type
            - card_token
            - card_security_code
    JuspayNetBanking:
      title: JuspayNetBanking
      externalDocs:
        url: https://llm-docs.commercengine.io/admin-pos/schemas/JuspayNetBanking
      allOf:
        - $ref: '#/components/schemas/JusPayExpressCheckoutCommonField'
        - type: object
          properties:
            payment_method_type:
              type: string
              const: NB
            payment_method:
              type: string
              minLength: 1
              pattern: \S
          required:
            - payment_method_type
            - payment_method
    JuspayUpiCollect:
      title: JuspayUpiCollect
      externalDocs:
        url: https://llm-docs.commercengine.io/admin-pos/schemas/JuspayUpiCollect
      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
              minLength: 1
              pattern: \S
          required:
            - payment_method_type
            - payment_method
            - upi_vpa
    JuspayUpiIntent:
      title: JuspayUpiIntent
      externalDocs:
        url: https://llm-docs.commercengine.io/admin-pos/schemas/JuspayUpiIntent
      allOf:
        - $ref: '#/components/schemas/JusPayExpressCheckoutCommonField'
        - type: object
          properties:
            payment_method_type:
              type: string
              const: UPI
            payment_method:
              type: string
              const: UPI_PAY
            sdk_params:
              description: Must be true for UPI intent.
              type: boolean
              default: true
              const: true
          required:
            - payment_method_type
            - payment_method
    FulfillmentItem:
      title: FulfillmentItem
      type: object
      externalDocs:
        url: https://llm-docs.commercengine.io/admin-pos/schemas/FulfillmentItem
      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
          minimum: 1
    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/admin-pos/schemas/AssociatedOption
      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/admin-pos/schemas/ProductAttribute
      discriminator:
        propertyName: type
        mapping:
          color: '#/components/schemas/ColorAttribute'
          single-select: '#/components/schemas/SingleSelectAttribute'
          multi-select: '#/components/schemas/MultiSelectAttribute'
          text: '#/components/schemas/TextAttribute'
          date: '#/components/schemas/DateAttribute'
          number: '#/components/schemas/NumberAttribute'
          boolean: '#/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
    JusPayExpressCheckoutCommonField:
      title: JusPayExpressCheckoutCommonField
      type: object
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/admin-pos/schemas/JusPayExpressCheckoutCommonField
      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
          minLength: 1
          pattern: \S
        return_url:
          description: >-
            Return URL using http, https, ftp or ftps. App-specific URI schemes
            are not accepted.
          type: string
          format: uri
          pattern: ^(?:[hH][tT][tT][pP][sS]?|[fF][tT][pP][sS]?)://
        get_client_auth_token:
          type: boolean
          default: false
        redirect_after_payment:
          type: boolean
          default: true
        sdk_params:
          type: boolean
          default: true
        auth_type:
          type: string
          default: OTP
    ColorOption:
      title: ColorOption
      type: object
      externalDocs:
        url: https://llm-docs.commercengine.io/admin-pos/schemas/ColorOption
      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/admin-pos/schemas/SingleSelectOption
      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/admin-pos/schemas/ColorAttribute
      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
          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
          required:
            - name
            - hexcode
    SingleSelectAttribute:
      title: SingleSelectAttribute
      description: Attribute for single-select values
      type: object
      readOnly: true
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/admin-pos/schemas/SingleSelectAttribute
      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
          const: 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/admin-pos/schemas/MultiSelectAttribute
      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
          const: 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/admin-pos/schemas/TextAttribute
      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
          const: 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/admin-pos/schemas/DateAttribute
      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
          const: date
        value:
          description: >-
            `YYYY-MM-DD`, optionally followed by ` HH:MM`, ` HH:MM:SS`, or `
            HH:MM:SS.ffffff`.
          type: string
    NumberAttribute:
      title: NumberAttribute
      description: Attribute for numeric values
      type: object
      readOnly: true
      externalDocs:
        url: https://llm-docs.commercengine.io/admin-pos/schemas/NumberAttribute
      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
          const: 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/admin-pos/schemas/BooleanAttribute
      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
          const: 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
              errors:
                type: object
              details:
                type: string
    Unauthorized:
      description: >-
        Authentication failed. Codes include `token-required`, `token-expired`
        and `token_not_valid` for an invalid or expired token.
      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
              details:
                type: string
    Forbidden:
      description: >-
        Access denied. `token-required` requires an authenticated session;
        `permission-denied` means the caller cannot access this resource. On
        POS, `session-expired` requires signing in again.
      content:
        application/json:
          schema:
            type: object
            required:
              - code
              - message
              - success
            properties:
              code:
                type: string
              message:
                type: string
                x-speakeasy-error-message: true
              success:
                type: boolean
              details:
                type: string
    NotFound:
      description: Requested resource not found
      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
              details:
                type: string
    RequestTimeout:
      description: The request timed out.
      content:
        application/json:
          schema:
            type: object
            required:
              - code
              - message
              - success
            properties:
              code:
                type: string
              message:
                type: string
                x-speakeasy-error-message: true
              success:
                type: boolean
              details:
                type: string
    InternalServerError:
      description: The request failed because of an unexpected error.
      content:
        application/json:
          schema:
            type: object
            required:
              - code
              - message
              - success
            properties:
              code:
                type: string
              message:
                type: string
                x-speakeasy-error-message: true
              success:
                type: boolean
              details:
                type: string
    GatewayTimeout:
      description: The request timed out.
      content:
        application/json:
          schema:
            type: object
            required:
              - code
              - message
              - success
            properties:
              code:
                type: string
              message:
                type: string
                x-speakeasy-error-message: true
              success:
                type: boolean
              details:
                type: string
  securitySchemes:
    Authorization:
      type: http
      description: Access token
      scheme: bearer

````

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