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

> All active promotions



## OpenAPI

````yaml get /carts/available-promotions
openapi: 3.1.0
info:
  version: '1.0'
  title: CE Storefront APIs
  summary: Customer-facing e-commerce API for building exceptional shopping experiences
  description: >-
    Public-facing API for Commerce Engine storefronts, enabling seamless
    shopping experiences with product browsing, cart management, checkout
    processing, user accounts, and order tracking. Perfect for building web,
    mobile, and headless commerce applications.
  contact:
    name: Support
    email: support@commercengine.io
    url: https://www.commercengine.io/contact-us
  license:
    url: https://www.commercengine.io/contact-us
    name: All Rights Reserved
servers:
  - url: https://staging.api.commercengine.io/api/v1/{store_id}/storefront
    description: Staging Server
    variables:
      store_id:
        description: Store ID
        default: store_id
    x-speakeasy-server-id: staging
  - url: https://prod.api.commercengine.io/api/v1/{store_id}/storefront
    description: Prod Server
    variables:
      store_id:
        description: Store ID
        default: store_id
    x-speakeasy-server-id: prod
security: []
tags:
  - name: Analytics
    description: Analytics
  - name: Auth
    description: auth
  - name: Campaigns
    description: Campaigns
  - name: Carts
    description: Carts
  - name: Catalog
    description: Catalog
  - name: Common
    description: Common
  - name: Coupons & promotions
    description: Coupons & promotions
  - name: Customers
    description: Customers
  - name: Juspay
    description: Juspay Payments
  - name: KYC
    description: KYC
  - name: Marketplace
    description: Marketplace
  - name: Orders
    description: Orders
  - name: Others
    description: Others
  - name: Payments
    description: Payments
  - name: PayU
    description: PayU Payments
  - name: POS
    description: POS
  - name: Shipping
    description: Shipping
  - name: Store
    description: Store
  - name: Subscriptions
    description: Subscriptions
externalDocs:
  url: https://llm-docs.commercengine.io
  description: Commerce Engine API Reference Documentation
paths:
  /carts/available-promotions:
    parameters: []
    get:
      tags:
        - Carts
      summary: Retrieve all promotions
      description: All active promotions
      operationId: list-promotions
      parameters:
        - $ref: '#/components/parameters/CustomerGroupId'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                required:
                  - message
                  - success
                  - content
                properties:
                  message:
                    type: string
                  success:
                    type: boolean
                  content:
                    properties:
                      promotions:
                        type: array
                        items:
                          $ref: '#/components/schemas/Promotion'
                    required:
                      - promotions
                    type: object
        '401':
          $ref: '#/components/responses/Unauthorized'
      security:
        - Authorization: []
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/storefront/operations/list-promotions
        description: API reference for the list-promotions operation
components:
  parameters:
    CustomerGroupId:
      name: x-customer-group-id
      in: header
      required: false
      schema:
        type: string
      description: >-
        This param is used to determine product pricing, promotions, and
        subscription rates.  If a valid customer group id is provided, pricing
        details will be retrieved accordingly.  If no matching data is found for
        the specified customer group id, the system will fall back to the
        default customer group id.  If no data is found for the default group
        either, the highest applicable price will be returned.
  schemas:
    Promotion:
      title: Promotion
      externalDocs:
        url: https://llm-docs.commercengine.io/storefront/schemas/Promotion
        description: API reference for the Promotion schema
      allOf:
        - oneOf:
            - $ref: '#/components/schemas/DiscountCouponPromotion'
            - $ref: '#/components/schemas/FreeGoodCouponPromotion'
            - $ref: '#/components/schemas/BuyXGetYCouponPromotion'
            - $ref: '#/components/schemas/VolumeBasedCouponPromotion'
            - $ref: '#/components/schemas/FreeShipingCouponPromotion'
        - type: object
          required:
            - promotion_type
            - can_be_used_with_other_promotion
          properties:
            promotion_type:
              enum:
                - discount
                - free-goods
                - free-shipping
                - buy-x-get-y
                - volume-based
            can_be_used_with_other_promotion:
              type: boolean
    DiscountCouponPromotion:
      title: DiscountCouponPromotion
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/storefront/schemas/DiscountCouponPromotion
        description: API reference for the DiscountCouponPromotion schema
      allOf:
        - $ref: '#/components/schemas/CouponPromotionCommonDetail'
        - type: object
          required:
            - details
            - applies_to_product
          properties:
            details:
              $ref: '#/components/schemas/DiscountRule'
            applies_to_product:
              enum:
                - all
                - product
                - category
    FreeGoodCouponPromotion:
      title: FreeGoodCouponPromotion
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/storefront/schemas/FreeGoodCouponPromotion
        description: API reference for the FreeGoodCouponPromotion schema
      allOf:
        - $ref: '#/components/schemas/CouponPromotionCommonDetail'
        - type: object
          required:
            - details
            - applies_to_product
          properties:
            details:
              $ref: '#/components/schemas/FreeGoodsRule'
            applies_to_product:
              enum:
                - product
    BuyXGetYCouponPromotion:
      title: BuyXGetYCouponPromotion
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/storefront/schemas/BuyXGetYCouponPromotion
        description: API reference for the BuyXGetYCouponPromotion schema
      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/storefront/schemas/VolumeBasedCouponPromotion
        description: API reference for the VolumeBasedCouponPromotion schema
      allOf:
        - $ref: '#/components/schemas/CouponPromotionCommonDetail'
        - type: object
          required:
            - details
            - applies_to_product
          properties:
            details:
              $ref: '#/components/schemas/VolumeBasedRule'
            applies_to_product:
              enum:
                - product
    FreeShipingCouponPromotion:
      title: FreeShipingCouponPromotion
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/storefront/schemas/FreeShipingCouponPromotion
        description: API reference for the FreeShipingCouponPromotion schema
      allOf:
        - $ref: '#/components/schemas/CouponPromotionCommonDetail'
    CouponPromotionCommonDetail:
      title: CouponPromotionCommonDetail
      type: object
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/storefront/schemas/CouponPromotionCommonDetail
        description: API reference for the CouponPromotionCommonDetail schema
      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
            - per_coupon_code_redemptions
        redemption_count:
          type: integer
          readOnly: true
        minimum_order_total:
          type:
            - integer
            - '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/storefront/schemas/DiscountRule
        description: API reference for the DiscountRule schema
      oneOf:
        - $ref: '#/components/schemas/PercentageDiscountRule'
        - $ref: '#/components/schemas/FixedAmountDiscountRule'
    FreeGoodsRule:
      title: FreeGoodsRule
      externalDocs:
        url: https://llm-docs.commercengine.io/storefront/schemas/FreeGoodsRule
        description: API reference for the FreeGoodsRule schema
      oneOf:
        - $ref: '#/components/schemas/AutoScaleBasedOnQuantity'
        - $ref: '#/components/schemas/AutoScaleBasedOnAmount'
        - $ref: '#/components/schemas/CustomSlabsBasedOnQuantity'
        - $ref: '#/components/schemas/CustomSlabsBasedOnAmount'
    BuyXGetYRule:
      title: BuyXGetYRule
      externalDocs:
        url: https://llm-docs.commercengine.io/storefront/schemas/BuyXGetYRule
        description: API reference for the BuyXGetYRule schema
      oneOf:
        - $ref: '#/components/schemas/BuyXGetYRuleBasedOnQuantity'
        - $ref: '#/components/schemas/BuyXGetYRuleBasedOnAmount'
    VolumeBasedRule:
      title: VolumeBasedRule
      type: object
      externalDocs:
        url: https://llm-docs.commercengine.io/storefront/schemas/VolumeBasedRule
        description: API reference for the VolumeBasedRule schema
      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'
    PercentageDiscountRule:
      title: PercentageDiscountRule
      type: object
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/storefront/schemas/PercentageDiscountRule
        description: API reference for the PercentageDiscountRule schema
      required:
        - discount_type
        - discount_percent
        - maximum_discount_amount
        - products
        - category_id
      properties:
        discount_type:
          type: string
          const: percentage
        discount_percent:
          type: number
        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
    FixedAmountDiscountRule:
      title: FixedAmountDiscountRule
      type: object
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/storefront/schemas/FixedAmountDiscountRule
        description: API reference for the FixedAmountDiscountRule schema
      required:
        - discount_type
        - fixed_discount_amount
        - products
        - category_id
      properties:
        discount_type:
          type: string
          const: fixed-amount
        fixed_discount_amount:
          type: number
        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
    AutoScaleBasedOnQuantity:
      title: AutoScaleBasedOnQuantity
      type: object
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/storefront/schemas/AutoScaleBasedOnQuantity
        description: API reference for the AutoScaleBasedOnQuantity schema
      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
    AutoScaleBasedOnAmount:
      title: AutoScaleBasedOnAmount
      type: object
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/storefront/schemas/AutoScaleBasedOnAmount
        description: API reference for the AutoScaleBasedOnAmount schema
      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
    CustomSlabsBasedOnQuantity:
      title: CustomSlabsBasedOnQuantity
      type: object
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/storefront/schemas/CustomSlabsBasedOnQuantity
        description: API reference for the CustomSlabsBasedOnQuantity schema
      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
              - slabs
            properties:
              product_id:
                type:
                  - string
                  - 'null'
              variant_id:
                type:
                  - string
                  - 'null'
              slabs:
                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
    CustomSlabsBasedOnAmount:
      title: CustomSlabsBasedOnAmount
      type: object
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/storefront/schemas/CustomSlabsBasedOnAmount
        description: API reference for the CustomSlabsBasedOnAmount schema
      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
              - slabs
            properties:
              product_id:
                type:
                  - string
                  - 'null'
              variant_id:
                type:
                  - string
                  - 'null'
              slabs:
                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
    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/storefront/schemas/BuyXGetYRuleBasedOnQuantity
        description: API reference for the BuyXGetYRuleBasedOnQuantity schema
      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: It can be null for get_offer_type = free
                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/storefront/schemas/BuyXGetYRuleBasedOnAmount
        description: API reference for the BuyXGetYRuleBasedOnAmount schema
      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: It can be null for get_offer_type = free
                type:
                  - number
                  - 'null'
        maximum_discount_amount:
          description: It can be null for get_offer_type = free
          type:
            - number
            - 'null'
  responses:
    Unauthorized:
      description: Not authorized for given operation on the Resource
      content:
        application/json:
          schema:
            type: object
            required:
              - message
              - success
              - code
            properties:
              message:
                type: string
                examples:
                  - Not authorized for given operation on the Resource.
                x-speakeasy-error-message: true
              success:
                type: boolean
                default: false
              code:
                type: string
                examples:
                  - unauthorized
  securitySchemes:
    Authorization:
      type: http
      description: Access token
      scheme: bearer

````