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

# Validate Discounts

> Validate if a collection of discounts is valid for a product.  This includes discounts that would normally be considered order level discounts.



## OpenAPI

````yaml /openapi/openapi_catalog_storefront.json post /commerce/catalog/storefront/products/{productCode}/validateDiscounts
openapi: 3.0.1
info:
  description: |-
    <div id="overview_CATALOG_STOREFRONT">
                <h2>CATALOG STOREFRONT</h2>
                <p>The Catalog Storefront APIs are a collection of resources for managing storefront categories, currencies, price lists, products, and
                    product search. This controls how the products in your catalog are organized and displayed on the
                    storefront. See the
                    <a href="/concept-guides/catalog">Catalog user guides</a>
                    for information about the related features in the Unified Commerce Admin.</p>
                <p>Use the <strong>Currencies</strong> resource to retrieve exchange rates for displaying prices on your storefront.</p>
                <p>Use the <strong>Storefront Categories</strong> resource to view the product category hierarchy as it appears to shoppers
                    who are browsing the storefront. The hierarchy can be returned as a flat list or as a category tree.</p>
                <p>Use the <strong>Pricelists</strong> resource to retrieve the details of a price list. The details may contain a hierarchy
                    of ancestor and/or descendant price lists dependening on your configuration.</p>
                <p>Use the <strong>Storefront Products</strong> resource to manage the shopper product selection process during a visit to
                    the web storefront. You can update product options as shoppers pick and choose their product choices. A
                    shopper cannot add a product to a cart until all of its required options have been selected.</p>
                <p>Use the <strong>Product Search</strong> resource to provide dynamic search results to shoppers as they browse and search
                    for products on the web storefront, and to suggest possible search terms as the shopper enters text. The related <strong>Search Redirect</strong>
                    resource allows you to retrieve any search redirect items.</p>
            </div>
  title: Catalog Storefront
  version: 0.0.1
servers:
  - description: Kibo Base URL
    url: '{baseUrl}/api'
    variables:
      baseUrl:
        default: https://t1000000.sb.usc1.gcp.kibocommerce.com
        description: Base URL
security:
  - bearerAuth: []
paths:
  /commerce/catalog/storefront/products/{productCode}/validateDiscounts:
    post:
      tags:
        - StorefrontProducts
      summary: Validate Discounts
      description: >-
        Validate if a collection of discounts is valid for a product.  This
        includes discounts that would normally be considered order level
        discounts.
      parameters:
        - description: ''
          in: path
          name: productCode
          required: true
          schema:
            type: string
        - description: ''
          in: query
          name: variationProductCode
          schema:
            type: string
        - description: >-
            Customer Id may be set in the querystring or in the user claims bag
            if the caller context is a shopper.
          in: query
          name: customerAccountId
          schema:
            format: int32
            type: integer
        - description: ''
          in: query
          name: allowInactive
          schema:
            type: boolean
        - description: ''
          in: query
          name: skipInventoryCheck
          schema:
            default: false
            type: boolean
        - description: limits which fields are returned in the response body
          in: query
          name: responseFields
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DiscountSelections'
        description: ''
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DiscountValidationSummary'
            text/json:
              schema:
                $ref: '#/components/schemas/DiscountValidationSummary'
            text/plain:
              schema:
                $ref: '#/components/schemas/DiscountValidationSummary'
          description: OK
components:
  schemas:
    DiscountSelections:
      description: Discount Selections
      properties:
        discountIds:
          description: Discount Ids
          items:
            format: int32
            type: integer
          nullable: true
          type: array
      type: object
    DiscountValidationSummary:
      description: >-
        Provides a summary (more accurately it is a container) for valid
        discounts for potentially valid discounts for a product
      properties:
        applicableDiscounts:
          description: Applicable/Valid Discounts
          items:
            $ref: '#/components/schemas/CatalogRuntimesDiscount'
          nullable: true
          type: array
      type: object
    CatalogRuntimesDiscount:
      description: Discount name and expiration date.
      properties:
        discountId:
          description: Unique identifier of the discount.
          format: int32
          type: integer
        expirationDate:
          description: Date when the discount expires.
          format: date-time
          nullable: true
          type: string
        friendlyDescription:
          description: Description of the discount.
          nullable: true
          type: string
        impact:
          description: The Impact of the individual Discount
          format: double
          type: number
        name:
          description: Name of the discount.
          nullable: true
          type: string
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: JWT
      description: JWT Authorization header using the Bearer scheme.
      scheme: bearer
      type: http

````