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

# Evaluate coupons

> Evaluates all coupons against the current cart contents. Returns separate `applicable_coupons` and `inapplicable_coupons` arrays with eligibility reasons.



## OpenAPI

````yaml https://openapi.commercengine.io/ce-pos.json get /pos/carts/{id}/evaluate-coupons
openapi: 3.1.0
info:
  title: CE POS APIs
  description: >-
    The consolidated Point of Sale surface. Every operation is served under the
    storefront base URL; operations tagged POSAdmin are proxied to the admin
    service by the POS backend.
  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: POS
    description: Operations backed by the storefront service
  - name: POSAdmin
    description: Operations proxied to the admin service
paths:
  /pos/carts/{id}/evaluate-coupons:
    get:
      tags:
        - POS
      summary: Evaluate coupons
      description: >-
        Evaluates all coupons against the current cart contents. Returns
        separate `applicable_coupons` and `inapplicable_coupons` arrays with
        eligibility reasons.
      operationId: pos-evaluate-coupons
      parameters:
        - name: id
          in: path
          description: Cart Id
          required: true
          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:
                      applicable_coupons:
                        type: array
                        items:
                          $ref: '#/components/schemas/ApplicableCoupon'
                      inapplicable_coupons:
                        type: array
                        items:
                          $ref: '#/components/schemas/InapplicableCoupon'
                    required:
                      - applicable_coupons
                      - inapplicable_coupons
                    type: object
        '401':
          $ref: '#/components/responses/Unauthorized'
      security:
        - Authorization: []
components:
  schemas:
    ApplicableCoupon:
      type: object
      externalDocs:
        url: https://llm-docs.commercengine.io/storefront/schemas/ApplicableCoupon
        description: API reference for the ApplicableCoupon schema
      properties:
        id:
          type: string
        name:
          type: string
        coupon_type:
          $ref: '#/components/schemas/CouponType'
        coupon_code:
          type: array
          items:
            type: string
        estimated_discount:
          type: number
        savings_message:
          type: string
    InapplicableCoupon:
      type: object
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/storefront/schemas/InapplicableCoupon
        description: API reference for the InapplicableCoupon schema
      properties:
        id:
          type: string
        name:
          type: string
        coupon_type:
          $ref: '#/components/schemas/CouponType'
        coupon_code:
          type: array
          items:
            type: string
        reason:
          type: string
        suggestion:
          type: string
    CouponType:
      externalDocs:
        url: https://llm-docs.commercengine.io/storefront/schemas/CouponType
        description: API reference for the CouponType schema
      enum:
        - discount
        - free-goods
        - fixed-price
        - free-shipping
        - buy-x-get-y
        - volume-based
        - accelerated-rewards
  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

````

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