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

# Retrieve all coupons

> Retrieve active coupons When customer groups are enabled, a missing or unknown x-customer-group-id uses the default group. Requires a signed-in POS staff session with permission for this operation.



## OpenAPI

````yaml https://openapi.commercengine.io/ce-pos.json get /pos/carts/available-coupons
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/carts/available-coupons:
    get:
      tags:
        - Coupons & promotions
      summary: Retrieve all coupons
      description: >-
        Retrieve active coupons When customer groups are enabled, a missing or
        unknown x-customer-group-id uses the default group. Requires a signed-in
        POS staff session with permission for this operation.
      operationId: pos-list-coupons
      parameters:
        - name: x-customer-group-id
          in: header
          description: >-
            Customer group used for eligibility and pricing. A missing or
            unknown value uses the default group.
          required: false
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                required:
                  - message
                  - success
                  - content
                properties:
                  message:
                    type: string
                  success:
                    type: boolean
                  content:
                    properties:
                      coupons:
                        type: array
                        items:
                          $ref: '#/components/schemas/AvailableCoupon'
                    required:
                      - coupons
                    type: object
        '400':
          $ref: '#/components/responses/BadRequest'
          description: >-
            The request is invalid or the available offers could not be
            retrieved.
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
      security:
        - Authorization: []
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/admin-pos/operations/pos-list-coupons
components:
  schemas:
    AvailableCoupon:
      title: AvailableCoupon
      description: A coupon and its selected coupon code.
      externalDocs:
        url: https://llm-docs.commercengine.io/admin-pos/schemas/AvailableCoupon
      allOf:
        - oneOf:
            - allOf:
                - $ref: '#/components/schemas/DiscountCouponPromotion'
                - type: object
                  properties:
                    coupon_type:
                      type: string
                      const: discount
                  required:
                    - coupon_type
            - allOf:
                - $ref: '#/components/schemas/FreeGoodCouponPromotion'
                - type: object
                  properties:
                    coupon_type:
                      type: string
                      const: free-goods
                  required:
                    - coupon_type
            - allOf:
                - $ref: '#/components/schemas/FixedPriceCouponPromotion'
                - type: object
                  properties:
                    coupon_type:
                      type: string
                      const: fixed-price
                  required:
                    - coupon_type
            - allOf:
                - $ref: '#/components/schemas/BuyXGetYCouponPromotion'
                - type: object
                  properties:
                    coupon_type:
                      type: string
                      const: buy-x-get-y
                  required:
                    - coupon_type
            - allOf:
                - $ref: '#/components/schemas/VolumeBasedCouponPromotion'
                - type: object
                  properties:
                    coupon_type:
                      type: string
                      const: volume-based
                  required:
                    - coupon_type
            - allOf:
                - $ref: '#/components/schemas/FreeShippingCouponPromotion'
                - type: object
                  required:
                    - coupon_type
                  properties:
                    coupon_type:
                      const: free-shipping
            - allOf:
                - $ref: '#/components/schemas/AcceleratedRewardCouponPromotion'
                - type: object
                  properties:
                    coupon_type:
                      type: string
                      const: accelerated-rewards
                  required:
                    - coupon_type
            - allOf:
                - $ref: '#/components/schemas/TieredDiscountCouponPromotion'
                - type: object
                  properties:
                    coupon_type:
                      type: string
                      const: tiered-discount
                  required:
                    - coupon_type
        - type: object
          required:
            - coupon_type
            - coupon_code
            - application_rules
            - can_be_used_with_promotion
            - can_earn_loyalty_points
            - can_redeem_loyalty_points
            - terms_and_conditions
          properties:
            coupon_type:
              enum:
                - discount
                - free-goods
                - fixed-price
                - free-shipping
                - buy-x-get-y
                - volume-based
                - accelerated-rewards
                - tiered-discount
            coupon_code:
              description: Selected coupon code, or null when no code is available.
              type:
                - string
                - 'null'
            application_rules:
              type:
                - object
                - 'null'
              properties:
                max_applicable_items:
                  type:
                    - integer
                    - 'null'
                application_priority:
                  type:
                    - string
                    - 'null'
                  enum:
                    - cheapest_first
                    - most_expensive_first
                    - first_added
                    - null
              required:
                - max_applicable_items
                - application_priority
            can_be_used_with_promotion:
              type: boolean
            can_earn_loyalty_points:
              type: boolean
            can_redeem_loyalty_points:
              type: boolean
            terms_and_conditions:
              description: >-
                The coupon's terms as Markdown (bold, italics, lists). A coupon
                without terms of its own gets a sentence from its validity,
                per-customer limit and minimum order value; `null` when there is
                nothing to state.
              type:
                - string
                - 'null'
            has_redemption_limit:
              type: boolean
            redemption_limit:
              type:
                - integer
                - 'null'
            require_minimum_order_total:
              type: boolean
    DiscountCouponPromotion:
      title: DiscountCouponPromotion
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/admin-pos/schemas/DiscountCouponPromotion
      allOf:
        - $ref: '#/components/schemas/CouponPromotionCommonDetail'
        - type: object
          required:
            - details
            - applies_to_product
          properties:
            details:
              $ref: '#/components/schemas/DiscountRule'
            applies_to_product:
              description: >-
                `seller` scopes the discount to specific marketplace sellers
                (`details.sellers`), on marketplace stores only.
              enum:
                - all
                - product
                - category
                - seller
    FreeGoodCouponPromotion:
      title: FreeGoodCouponPromotion
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/admin-pos/schemas/FreeGoodCouponPromotion
      allOf:
        - $ref: '#/components/schemas/CouponPromotionCommonDetail'
        - type: object
          required:
            - details
            - applies_to_product
          properties:
            details:
              $ref: '#/components/schemas/FreeGoodsRule'
            applies_to_product:
              enum:
                - product
    FixedPriceCouponPromotion:
      title: FixedPriceCouponPromotion
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/admin-pos/schemas/FixedPriceCouponPromotion
      allOf:
        - $ref: '#/components/schemas/CouponPromotionCommonDetail'
        - type: object
          required:
            - details
            - applies_to_product
          properties:
            details:
              $ref: '#/components/schemas/FixedPriceRule'
            applies_to_product:
              enum:
                - product
    BuyXGetYCouponPromotion:
      title: BuyXGetYCouponPromotion
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/admin-pos/schemas/BuyXGetYCouponPromotion
      allOf:
        - $ref: '#/components/schemas/CouponPromotionCommonDetail'
        - type: object
          required:
            - details
            - applies_to_product
          properties:
            details:
              $ref: '#/components/schemas/BuyXGetYRule'
            applies_to_product:
              enum:
                - product
    VolumeBasedCouponPromotion:
      title: VolumeBasedCouponPromotion
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/admin-pos/schemas/VolumeBasedCouponPromotion
      allOf:
        - $ref: '#/components/schemas/CouponPromotionCommonDetail'
        - type: object
          required:
            - details
            - applies_to_product
          properties:
            details:
              $ref: '#/components/schemas/VolumeBasedRule'
            applies_to_product:
              enum:
                - product
    FreeShippingCouponPromotion:
      title: FreeShippingCouponPromotion
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/admin-pos/schemas/FreeShippingCouponPromotion
      allOf:
        - $ref: '#/components/schemas/CouponPromotionCommonDetail'
        - type: object
          required:
            - details
            - applies_to_product
          properties:
            details:
              description: >-
                Empty, or `null`, for free shipping on everything; the sellers
                it's limited to when `applies_to_product` is `seller`.
              anyOf:
                - $ref: '#/components/schemas/FreeShippingDetails'
                - type: 'null'
                - type: object
                  required:
                    - sellers
                  properties:
                    sellers:
                      description: The marketplace sellers whose items ship free.
                      type: array
                      items:
                        type: string
                      minItems: 1
                    products:
                      type: array
                      items:
                        type: string
                      maxItems: 0
                    category_id:
                      type: array
                      items:
                        type: string
                      maxItems: 0
            applies_to_product:
              description: >-
                `seller` limits free shipping to specific marketplace sellers
                (`details.sellers`), on marketplace stores only.
              type: string
              enum:
                - all
                - seller
    AcceleratedRewardCouponPromotion:
      title: AcceleratedRewardCouponPromotion
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/admin-pos/schemas/AcceleratedRewardCouponPromotion
      allOf:
        - $ref: '#/components/schemas/CouponPromotionCommonDetail'
        - type: object
          required:
            - details
            - applies_to_product
          properties:
            details:
              $ref: '#/components/schemas/AcceleratedRewardRule'
            applies_to_product:
              enum:
                - product
                - category
    TieredDiscountCouponPromotion:
      title: TieredDiscountCouponPromotion
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/admin-pos/schemas/TieredDiscountCouponPromotion
      allOf:
        - $ref: '#/components/schemas/CouponPromotionCommonDetail'
        - type: object
          required:
            - details
            - applies_to_product
          properties:
            details:
              $ref: '#/components/schemas/TieredDiscountRule'
            applies_to_product:
              description: >-
                Tiered-discount coupons apply to the whole order (`all`) or to
                specific marketplace sellers (`seller`, with `details.sellers`,
                on marketplace stores only).
              enum:
                - all
                - seller
    CouponPromotionCommonDetail:
      title: CouponPromotionCommonDetail
      type: object
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/admin-pos/schemas/CouponPromotionCommonDetail
      required:
        - id
        - name
        - description
        - tags
        - redemption_limits
        - redemption_count
        - minimum_order_total
        - starts_at
        - expires_at
      properties:
        id:
          type: string
          readOnly: true
        name:
          type: string
        description:
          type:
            - string
            - 'null'
        tags:
          type:
            - array
            - 'null'
          items:
            type: string
        redemption_limits:
          type:
            - object
            - 'null'
          properties:
            total_redemptions:
              type:
                - integer
                - 'null'
            per_customer_redemptions:
              type:
                - integer
                - 'null'
            per_coupon_code_redemptions:
              type:
                - integer
                - 'null'
          required:
            - total_redemptions
            - per_customer_redemptions
        redemption_count:
          type: integer
          readOnly: true
        minimum_order_total:
          type:
            - number
            - 'null'
          default: 0
        starts_at:
          type: string
          format: date-time
        expires_at:
          type:
            - string
            - 'null'
          format: date-time
    DiscountRule:
      title: DiscountRule
      externalDocs:
        url: https://llm-docs.commercengine.io/admin-pos/schemas/DiscountRule
      oneOf:
        - $ref: '#/components/schemas/PercentageDiscountRule'
        - $ref: '#/components/schemas/FixedAmountDiscountRule'
    FreeGoodsRule:
      title: FreeGoodsRule
      externalDocs:
        url: https://llm-docs.commercengine.io/admin-pos/schemas/FreeGoodsRule
      oneOf:
        - anyOf:
            - $ref: '#/components/schemas/AutoScaleBasedOnQuantity'
            - $ref: '#/components/schemas/CustomSlabsBasedOnQuantity'
        - anyOf:
            - $ref: '#/components/schemas/AutoScaleBasedOnAmount'
            - $ref: '#/components/schemas/CustomSlabsBasedOnAmount'
    FixedPriceRule:
      title: FixedPriceRule
      externalDocs:
        url: https://llm-docs.commercengine.io/admin-pos/schemas/FixedPriceRule
      oneOf:
        - $ref: '#/components/schemas/FixedPriceRuleBasedQuantity'
        - $ref: '#/components/schemas/FixedPriceRuleBasedAmount'
    BuyXGetYRule:
      title: BuyXGetYRule
      externalDocs:
        url: https://llm-docs.commercengine.io/admin-pos/schemas/BuyXGetYRule
      oneOf:
        - $ref: '#/components/schemas/BuyXGetYRuleBasedOnQuantity'
        - $ref: '#/components/schemas/BuyXGetYRuleBasedOnAmount'
    VolumeBasedRule:
      title: VolumeBasedRule
      type: object
      externalDocs:
        url: https://llm-docs.commercengine.io/admin-pos/schemas/VolumeBasedRule
      required:
        - products
        - maximum_discount_amount
      properties:
        products:
          type: array
          items:
            type: object
            required:
              - product_id
              - variant_id
              - slabs
            properties:
              product_id:
                type:
                  - string
                  - 'null'
              variant_id:
                type:
                  - string
                  - 'null'
              slabs:
                type: array
                items:
                  type: object
                  required:
                    - quantity
                    - condition
                    - discount_percent
                  properties:
                    quantity:
                      type: integer
                    condition:
                      enum:
                        - less-or-equal
                        - greater
                    discount_percent:
                      type: number
        maximum_discount_amount:
          type:
            - number
            - 'null'
    FreeShippingDetails:
      title: FreeShippingDetails
      description: 'Free shipping on everything has no rule: an empty list.'
      type: array
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/admin-pos/schemas/FreeShippingDetails
      items:
        type: string
      default: []
      const: []
      maxItems: 0
    AcceleratedRewardRule:
      title: AcceleratedRewardRule
      type: object
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/admin-pos/schemas/AcceleratedRewardRule
      required:
        - products
        - category_id
        - bonus_loyalty_point
      properties:
        products:
          type: array
          items:
            type: object
            required:
              - product_id
              - variant_id
              - minimum_quantity
              - minimum_value
            properties:
              product_id:
                type:
                  - string
                  - 'null'
              variant_id:
                type:
                  - string
                  - 'null'
              minimum_quantity:
                type:
                  - integer
                  - 'null'
              minimum_value:
                type:
                  - number
                  - 'null'
        category_id:
          description: Array of category ids.
          type: array
          items:
            type: string
        bonus_loyalty_point:
          type: integer
    TieredDiscountRule:
      title: TieredDiscountRule
      type: object
      externalDocs:
        url: https://llm-docs.commercengine.io/admin-pos/schemas/TieredDiscountRule
      required:
        - slabs
        - maximum_discount_amount
      properties:
        slabs:
          type: array
          items:
            $ref: '#/components/schemas/TieredDiscountSlab'
        maximum_discount_amount:
          description: Caps the discount across all slabs. Use `null` for no cap.
          type:
            - number
            - 'null'
        sellers:
          description: >-
            Marketplace seller ids the tiered discount applies to. Required (at
            least one) when `applies_to_product` is `seller`, and accepted only
            on marketplace stores; empty or omitted otherwise.
          type: array
          items:
            type: string
    PercentageDiscountRule:
      title: PercentageDiscountRule
      type: object
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/admin-pos/schemas/PercentageDiscountRule
      required:
        - discount_type
        - discount_percent
        - maximum_discount_amount
        - products
        - category_id
      properties:
        discount_type:
          type: string
          const: percentage
        discount_percent:
          type:
            - number
            - 'null'
        maximum_discount_amount:
          type:
            - number
            - 'null'
        products:
          type: array
          items:
            type: object
            required:
              - product_id
              - variant_id
              - minimum_quantity
              - maximum_quantity
              - minimum_value
              - maximum_value
            properties:
              product_id:
                type:
                  - string
                  - 'null'
              variant_id:
                type:
                  - string
                  - 'null'
              minimum_quantity:
                type:
                  - integer
                  - 'null'
              maximum_quantity:
                type:
                  - integer
                  - 'null'
              minimum_value:
                type:
                  - number
                  - 'null'
              maximum_value:
                type:
                  - number
                  - 'null'
        category_id:
          description: Array of category ids
          type: array
          items:
            type: string
        sellers:
          description: >-
            The marketplace sellers the discount applies to, when
            `applies_to_product` is `seller`.
          type: array
          items:
            type: string
        fixed_discount_amount:
          description: Unused by this rule's `discount_type`.
          type:
            - number
            - 'null'
    FixedAmountDiscountRule:
      title: FixedAmountDiscountRule
      type: object
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/admin-pos/schemas/FixedAmountDiscountRule
      required:
        - discount_type
        - fixed_discount_amount
        - products
        - category_id
      properties:
        discount_type:
          type: string
          const: fixed-amount
        fixed_discount_amount:
          type:
            - number
            - 'null'
        products:
          type: array
          items:
            type: object
            required:
              - product_id
              - variant_id
              - minimum_quantity
              - maximum_quantity
              - minimum_value
              - maximum_value
            properties:
              product_id:
                type:
                  - string
                  - 'null'
              variant_id:
                type:
                  - string
                  - 'null'
              minimum_quantity:
                type:
                  - integer
                  - 'null'
              maximum_quantity:
                type:
                  - integer
                  - 'null'
              minimum_value:
                type:
                  - number
                  - 'null'
              maximum_value:
                type:
                  - number
                  - 'null'
        category_id:
          description: Array of category ids
          type: array
          items:
            type: string
        sellers:
          description: >-
            The marketplace sellers the discount applies to, when
            `applies_to_product` is `seller`.
          type: array
          items:
            type: string
        discount_percent:
          description: Unused by this rule's `discount_type`.
          type:
            - number
            - 'null'
    AutoScaleBasedOnQuantity:
      title: AutoScaleBasedOnQuantity
      type: object
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/admin-pos/schemas/AutoScaleBasedOnQuantity
      required:
        - spending_criteria_type
        - products
      properties:
        spending_criteria_type:
          type: string
          const: minimum-quantity
        products:
          type: array
          items:
            type: object
            required:
              - product_id
              - variant_id
              - auto_scale
              - slab
            properties:
              product_id:
                type:
                  - string
                  - 'null'
              variant_id:
                type:
                  - string
                  - 'null'
              auto_scale:
                type: boolean
                const: true
              slab:
                type: object
                properties:
                  buy_quantity:
                    type: integer
                  get_quantity:
                    type: integer
                  condition:
                    enum:
                      - greater-or-equal
                required:
                  - buy_quantity
                  - get_quantity
                  - condition
    CustomSlabsBasedOnQuantity:
      title: CustomSlabsBasedOnQuantity
      type: object
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/admin-pos/schemas/CustomSlabsBasedOnQuantity
      required:
        - spending_criteria_type
        - products
      properties:
        spending_criteria_type:
          type: string
          const: minimum-quantity
        products:
          type: array
          items:
            type: object
            required:
              - product_id
              - variant_id
            properties:
              product_id:
                type:
                  - string
                  - 'null'
              variant_id:
                type:
                  - string
                  - 'null'
              slab:
                description: The one slab that repeats when `auto_scale` is `true`.
                type: object
                properties:
                  buy_quantity:
                    type: integer
                  get_quantity:
                    type: integer
                  condition:
                    enum:
                      - greater-or-equal
                required:
                  - buy_quantity
                  - get_quantity
                  - condition
              slabs:
                description: The tiers, when `auto_scale` is `false`.
                type: array
                items:
                  type: object
                  properties:
                    buy_quantity:
                      type: integer
                    get_quantity:
                      type: integer
                    condition:
                      enum:
                        - greater-or-equal
                  required:
                    - buy_quantity
                    - get_quantity
                    - condition
              auto_scale:
                description: >-
                  `true` when the reward repeats for every multiple of `slab`
                  the cart reaches; `false` when `slabs` sets each tier.
                type: boolean
    AutoScaleBasedOnAmount:
      title: AutoScaleBasedOnAmount
      type: object
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/admin-pos/schemas/AutoScaleBasedOnAmount
      required:
        - spending_criteria_type
        - products
      properties:
        spending_criteria_type:
          type: string
          const: minimum-purchase-amount
        products:
          type: array
          items:
            type: object
            required:
              - product_id
              - variant_id
              - auto_scale
              - slab
            properties:
              product_id:
                type:
                  - string
                  - 'null'
              variant_id:
                type:
                  - string
                  - 'null'
              auto_scale:
                type: boolean
                const: true
              slab:
                type: object
                properties:
                  minimum_purchase_amount:
                    type: number
                  get_quantity:
                    type: integer
                  condition:
                    enum:
                      - greater-or-equal
                required:
                  - minimum_purchase_amount
                  - get_quantity
                  - condition
    CustomSlabsBasedOnAmount:
      title: CustomSlabsBasedOnAmount
      type: object
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/admin-pos/schemas/CustomSlabsBasedOnAmount
      required:
        - spending_criteria_type
        - products
      properties:
        spending_criteria_type:
          type: string
          const: minimum-purchase-amount
        products:
          type: array
          items:
            type: object
            required:
              - product_id
              - variant_id
            properties:
              product_id:
                type:
                  - string
                  - 'null'
              variant_id:
                type:
                  - string
                  - 'null'
              slab:
                description: The one slab that repeats when `auto_scale` is `true`.
                type: object
                properties:
                  minimum_purchase_amount:
                    type: number
                  get_quantity:
                    type: integer
                  condition:
                    enum:
                      - greater-or-equal
                required:
                  - minimum_purchase_amount
                  - get_quantity
                  - condition
              slabs:
                description: The tiers, when `auto_scale` is `false`.
                type: array
                items:
                  type: object
                  properties:
                    minimum_purchase_amount:
                      type: number
                    get_quantity:
                      type: integer
                    condition:
                      enum:
                        - greater-or-equal
                  required:
                    - minimum_purchase_amount
                    - get_quantity
                    - condition
              auto_scale:
                description: >-
                  `true` when the reward repeats for every multiple of `slab`
                  the cart reaches; `false` when `slabs` sets each tier.
                type: boolean
    FixedPriceRuleBasedQuantity:
      title: FixedPriceRuleBasedQuantity
      type: object
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/admin-pos/schemas/FixedPriceRuleBasedQuantity
      required:
        - spending_criteria_type
        - products
      properties:
        spending_criteria_type:
          type: string
          const: minimum-quantity
        products:
          type: array
          items:
            type: object
            required:
              - product_id
              - variant_id
              - minimum_quantity
              - maximum_quantity
              - offer_price
            properties:
              product_id:
                type:
                  - string
                  - 'null'
              variant_id:
                type:
                  - string
                  - 'null'
              minimum_quantity:
                type: integer
                minimum: 1
              maximum_quantity:
                description: null means there is no limit.
                type:
                  - integer
                  - 'null'
              offer_price:
                type: number
    FixedPriceRuleBasedAmount:
      title: FixedPriceRuleBasedAmount
      type: object
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/admin-pos/schemas/FixedPriceRuleBasedAmount
      required:
        - spending_criteria_type
        - products
      properties:
        spending_criteria_type:
          type: string
          const: minimum-purchase-amount
        products:
          type: array
          items:
            type: object
            required:
              - product_id
              - variant_id
              - minimum_purchase_amount
              - maximum_purchase_amount
              - offer_price
            properties:
              product_id:
                type:
                  - string
                  - 'null'
              variant_id:
                type:
                  - string
                  - 'null'
              minimum_purchase_amount:
                type: number
              maximum_purchase_amount:
                description: null means there is no limit.
                type:
                  - number
                  - 'null'
              offer_price:
                type: number
    BuyXGetYRuleBasedOnQuantity:
      title: BuyXGetYRuleBasedOnQuantity
      description: |-
        Additional fields required in addition to marked as required.
        1) buy_product_id or buy_variant_id or buy_from_category_id
        2) get_product_id or get_variant_id or get_from_category_id
        3) get_free_quantity or get_discount_percent
      type: object
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/admin-pos/schemas/BuyXGetYRuleBasedOnQuantity
      required:
        - spending_criteria_type
        - products
        - maximum_discount_amount
      properties:
        spending_criteria_type:
          type: string
          const: minimum-quantity
        products:
          type: array
          items:
            type: object
            required:
              - minimum_quantity
              - buy_product_id
              - buy_variant_id
              - buy_from_category_id
              - get_product_id
              - get_variant_id
              - get_from_category_id
              - get_quantity
              - get_offer_type
              - get_discount_percent
            properties:
              minimum_quantity:
                type: integer
                minimum: 1
              buy_product_id:
                type:
                  - string
                  - 'null'
              buy_variant_id:
                type:
                  - string
                  - 'null'
              buy_from_category_id:
                type:
                  - string
                  - 'null'
              get_product_id:
                type:
                  - string
                  - 'null'
              get_variant_id:
                type:
                  - string
                  - 'null'
              get_from_category_id:
                type:
                  - string
                  - 'null'
              get_quantity:
                type: integer
                minimum: 1
              get_offer_type:
                enum:
                  - discount
                  - free
              get_discount_percent:
                description: >-
                  Percent off each get item when `get_offer_type` is `discount`,
                  with up to 2 decimal places (for example 99.9). Null when
                  `get_offer_type` is `free`.
                type:
                  - number
                  - 'null'
              minimum_purchase_amount:
                type:
                  - number
                  - 'null'
        maximum_discount_amount:
          description: It can be null for get_offer_type = free
          type:
            - number
            - 'null'
    BuyXGetYRuleBasedOnAmount:
      title: BuyXGetYRuleBasedOnAmount
      description: |-
        Additional fields required in addition to marked as required.
        1) buy_product_id or buy_variant_id or buy_from_category_id
        2) get_product_id or get_variant_id or get_from_category_id
        3) get_free_quantity or get_discount_percent
      type: object
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/admin-pos/schemas/BuyXGetYRuleBasedOnAmount
      required:
        - spending_criteria_type
        - products
        - maximum_discount_amount
      properties:
        spending_criteria_type:
          type: string
          const: minimum-purchase-amount
        products:
          type: array
          items:
            type: object
            required:
              - minimum_purchase_amount
              - buy_product_id
              - buy_variant_id
              - buy_from_category_id
              - get_product_id
              - get_variant_id
              - get_from_category_id
              - get_quantity
              - get_offer_type
              - get_discount_percent
            properties:
              minimum_purchase_amount:
                type: number
                minimum: 1
              buy_product_id:
                type:
                  - string
                  - 'null'
              buy_variant_id:
                type:
                  - string
                  - 'null'
              buy_from_category_id:
                type:
                  - string
                  - 'null'
              get_product_id:
                type:
                  - string
                  - 'null'
              get_variant_id:
                type:
                  - string
                  - 'null'
              get_from_category_id:
                type:
                  - string
                  - 'null'
              get_quantity:
                type: integer
                minimum: 1
              get_offer_type:
                enum:
                  - discount
                  - free
              get_discount_percent:
                description: >-
                  Percent off each get item when `get_offer_type` is `discount`,
                  with up to 2 decimal places (for example 99.9). Null when
                  `get_offer_type` is `free`.
                type:
                  - number
                  - 'null'
        maximum_discount_amount:
          description: It can be null for get_offer_type = free
          type:
            - number
            - 'null'
    TieredDiscountSlab:
      title: TieredDiscountSlab
      externalDocs:
        url: https://llm-docs.commercengine.io/admin-pos/schemas/TieredDiscountSlab
      oneOf:
        - $ref: '#/components/schemas/PercentageTieredDiscountSlab'
        - $ref: '#/components/schemas/FixedAmountTieredDiscountSlab'
    PercentageTieredDiscountSlab:
      title: PercentageTieredDiscountSlab
      type: object
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/admin-pos/schemas/PercentageTieredDiscountSlab
      required:
        - order_value
        - condition
        - discount_type
        - discount_percent
      properties:
        order_value:
          description: The order total the cart is evaluated against for this slab.
          type: number
        condition:
          description: >-
            This key defines how the system will evaluate the order total to
            determine if the discount should be applied, based on the specified
            slab. The last slab must use `greater` so the highest tier stays
            open-ended.
          enum:
            - less-or-equal
            - greater
        discount_type:
          type: string
          const: percentage
        discount_percent:
          type: number
    FixedAmountTieredDiscountSlab:
      title: FixedAmountTieredDiscountSlab
      type: object
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/admin-pos/schemas/FixedAmountTieredDiscountSlab
      required:
        - order_value
        - condition
        - discount_type
        - fixed_discount_amount
      properties:
        order_value:
          description: The order total the cart is evaluated against for this slab.
          type: number
        condition:
          description: >-
            This key defines how the system will evaluate the order total to
            determine if the discount should be applied, based on the specified
            slab. The last slab must use `greater` so the highest tier stays
            open-ended.
          enum:
            - less-or-equal
            - greater
        discount_type:
          type: string
          const: fixed-amount
        fixed_discount_amount:
          type: number
  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
    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.