> ## 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 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-promotions
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-promotions:
    get:
      tags:
        - Coupons & promotions
      summary: Retrieve all promotions
      description: >-
        All active promotions 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-promotions
      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:
                      promotions:
                        type: array
                        items:
                          $ref: '#/components/schemas/AvailablePromotion'
                    required:
                      - promotions
                    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'
        '500':
          $ref: '#/components/responses/InternalServerError'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
      security:
        - Authorization: []
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/admin-pos/operations/pos-list-promotions
components:
  schemas:
    AvailablePromotion:
      title: AvailablePromotion
      description: A promotion available to the current customer and cart.
      type: object
      externalDocs:
        url: https://llm-docs.commercengine.io/admin-pos/schemas/AvailablePromotion
      required:
        - id
        - name
        - promotion_type
        - description
        - tags
        - redemption_limits
        - redemption_count
        - minimum_order_total
        - starts_at
        - expires_at
        - details
        - applies_to_product
        - can_be_used_with_other_promotion
      properties:
        id:
          type: string
        name:
          type: string
        description:
          type:
            - string
            - 'null'
        tags:
          type:
            - array
            - 'null'
          items:
            type: string
        redemption_limits:
          type: object
          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
        minimum_order_total:
          type:
            - number
            - 'null'
        starts_at:
          type:
            - string
            - 'null'
          format: date-time
        expires_at:
          type:
            - string
            - 'null'
          format: date-time
        details:
          type: object
          additionalProperties: true
          properties:
            discount_type:
              type:
                - string
                - 'null'
            discount_percent:
              type:
                - number
                - 'null'
            maximum_discount_amount:
              type:
                - number
                - 'null'
            products:
              type: array
              items:
                type: object
                properties:
                  product_id:
                    type:
                      - string
                      - 'null'
                  variant_id:
                    type:
                      - string
                      - 'null'
                  minimum_quantity:
                    type:
                      - number
                      - 'null'
                  maximum_quantity:
                    type:
                      - number
                      - 'null'
                  minimum_value:
                    type:
                      - number
                      - 'null'
                  maximum_value:
                    type:
                      - number
                      - 'null'
            category_id:
              type: array
              items:
                type: string
            sellers:
              type: array
              items:
                type: string
            fixed_discount_amount:
              type: number
          required:
            - discount_type
            - discount_percent
            - maximum_discount_amount
            - fixed_discount_amount
            - products
            - category_id
            - sellers
        applies_to_product:
          description: Scope of the promotion. Defaults to `all`.
          type: string
        promotion_type:
          type: string
        can_be_used_with_other_promotion:
          type: boolean
      oneOf:
        - type: object
          properties:
            promotion_type:
              type: string
              const: discount
            details:
              type: object
              additionalProperties: true
              properties:
                discount_type:
                  type:
                    - string
                    - 'null'
                discount_percent:
                  type:
                    - number
                    - 'null'
                maximum_discount_amount:
                  type:
                    - number
                    - 'null'
                products:
                  type: array
                  items:
                    type: object
                    properties:
                      product_id:
                        type:
                          - string
                          - 'null'
                      variant_id:
                        type:
                          - string
                          - 'null'
                      minimum_quantity:
                        type:
                          - number
                          - 'null'
                      maximum_quantity:
                        type:
                          - number
                          - 'null'
                      minimum_value:
                        type:
                          - number
                          - 'null'
                      maximum_value:
                        type:
                          - number
                          - 'null'
                category_id:
                  type: array
                  items:
                    type: string
                sellers:
                  type: array
                  items:
                    type: string
                fixed_discount_amount:
                  type: number
          required:
            - promotion_type
        - type: object
          properties:
            promotion_type:
              type: string
              const: free-goods
            details:
              type: object
              additionalProperties: true
              properties:
                discount_type:
                  type:
                    - string
                    - 'null'
                discount_percent:
                  type:
                    - number
                    - 'null'
                maximum_discount_amount:
                  type:
                    - number
                    - 'null'
                products:
                  type: array
                  items:
                    type: object
                    properties:
                      product_id:
                        type:
                          - string
                          - 'null'
                      variant_id:
                        type:
                          - string
                          - 'null'
                      minimum_quantity:
                        type:
                          - number
                          - 'null'
                      maximum_quantity:
                        type:
                          - number
                          - 'null'
                      minimum_value:
                        type:
                          - number
                          - 'null'
                      maximum_value:
                        type:
                          - number
                          - 'null'
                      auto_scale:
                        type: boolean
                      slab:
                        type: object
                        properties:
                          buy_quantity:
                            type: number
                          get_quantity:
                            type: number
                      slabs:
                        type: array
                        items:
                          type: object
                          additionalProperties: true
                category_id:
                  type: array
                  items:
                    type: string
                sellers:
                  type: array
                  items:
                    type: string
                fixed_discount_amount:
                  type: number
          required:
            - promotion_type
        - type: object
          properties:
            promotion_type:
              type: string
              const: volume-based
            details:
              type: object
              additionalProperties: true
              properties:
                discount_type:
                  type:
                    - string
                    - 'null'
                discount_percent:
                  type:
                    - number
                    - 'null'
                maximum_discount_amount:
                  type:
                    - number
                    - 'null'
                products:
                  type: array
                  items:
                    type: object
                    properties:
                      product_id:
                        type:
                          - string
                          - 'null'
                      variant_id:
                        type:
                          - string
                          - 'null'
                      minimum_quantity:
                        type:
                          - number
                          - 'null'
                      maximum_quantity:
                        type:
                          - number
                          - 'null'
                      minimum_value:
                        type:
                          - number
                          - 'null'
                      maximum_value:
                        type:
                          - number
                          - 'null'
                      slabs:
                        type: array
                        items:
                          type: object
                          additionalProperties: true
                category_id:
                  type: array
                  items:
                    type: string
                sellers:
                  type: array
                  items:
                    type: string
                fixed_discount_amount:
                  type: number
          required:
            - promotion_type
        - type: object
          properties:
            promotion_type:
              type: string
              const: buy-x-get-y
            details:
              type: object
              additionalProperties: true
              properties:
                discount_type:
                  type:
                    - string
                    - 'null'
                discount_percent:
                  type:
                    - number
                    - 'null'
                maximum_discount_amount:
                  type:
                    - number
                    - 'null'
                products:
                  type: array
                  items:
                    type: object
                    properties:
                      minimum_quantity:
                        type: integer
                        minimum: 1
                      minimum_purchase_amount:
                        type:
                          - number
                          - 'null'
                      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'
                category_id:
                  type: array
                  items:
                    type: string
                sellers:
                  type: array
                  items:
                    type: string
                fixed_discount_amount:
                  type: number
          required:
            - promotion_type
        - type: object
          properties:
            promotion_type:
              type: string
              const: free-shipping
            details:
              type: object
              additionalProperties: true
              properties:
                discount_type:
                  type:
                    - string
                    - 'null'
                discount_percent:
                  type:
                    - number
                    - 'null'
                maximum_discount_amount:
                  type:
                    - number
                    - 'null'
                products:
                  type: array
                  items:
                    type: object
                    properties:
                      product_id:
                        type:
                          - string
                          - 'null'
                      variant_id:
                        type:
                          - string
                          - 'null'
                      minimum_quantity:
                        type:
                          - number
                          - 'null'
                      maximum_quantity:
                        type:
                          - number
                          - 'null'
                      minimum_value:
                        type:
                          - number
                          - 'null'
                      maximum_value:
                        type:
                          - number
                          - 'null'
                category_id:
                  type: array
                  items:
                    type: string
                sellers:
                  type: array
                  items:
                    type: string
                fixed_discount_amount:
                  type: number
          required:
            - promotion_type
  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
    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.