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

# Get Secure Discount by Coupon Code

> Retrieves a non-public discount by coupon code. These can only be accessed by users with the Discount Read behavior.



## OpenAPI

````yaml /openapi/openapi_pricing.json get /commerce/catalog/storefront/discounts/secure/couponCode/{couponCode}
openapi: 3.0.1
info:
  description: OpenAPI Spec for Kibo PricingRuntime Service
  title: Pricing 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/discounts/secure/couponCode/{couponCode}:
    get:
      tags:
        - Discounts
      summary: Get Secure Discount by Coupon Code
      description: >-
        Retrieves a non-public discount by coupon code. These can only be
        accessed by users with the Discount Read behavior.
      parameters:
        - description: The coupon code of the discount
          in: path
          name: couponCode
          required: true
          schema:
            type: string
        - description: limits which fields are returned in the response body
          in: query
          name: responseFields
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PricingRuntimeDiscount'
            text/json:
              schema:
                $ref: '#/components/schemas/PricingRuntimeDiscount'
            text/plain:
              schema:
                $ref: '#/components/schemas/PricingRuntimeDiscount'
          description: OK
components:
  schemas:
    PricingRuntimeDiscount:
      description: Represents a discount for runtime API.
      properties:
        amount:
          description: |2-
                Amount of the discount, as a percentage or monetary amount, for example 15% or $15.
            Must be either null or greater than zero.
          format: double
          nullable: true
          type: number
        amountType:
          description: |-
            Gets or sets the AmountType of the discount.
            Values: Percentage, Amount, FixedPrice, FreeAutoAdd
          nullable: true
          type: string
        canBeStackedUpon:
          description: Indicates whether or not stacking is enabled for this discount
          nullable: true
          type: boolean
        code:
          description: Gets or sets the code associated with the discount.
          nullable: true
          type: string
        conditions:
          $ref: '#/components/schemas/RuntimeDiscountCondition'
        content:
          additionalProperties:
            nullable: true
            type: string
          description: Gets or sets the content of the discount.
          nullable: true
          type: object
        customProperties:
          description: Gets or sets the custom properties of the discount.
          items:
            $ref: '#/components/schemas/DiscountCustomProperty'
          nullable: true
          type: array
        doesNotApplyToMultiShipToOrders:
          description: |-
            Flag to allow or prevent application to multi-ship-to orders,
            Only applicable to shipping discounts.
          nullable: true
          type: boolean
        doesNotApplyToProductsWithSalePrice:
          description: >-
            Determines whether a discount applies to items with a sale price.
            Applicable 

            on order and line item discounts. For line items, when this is true,
            the discount will 

            be disqualified. For order level discounts, when true, the discount
            will not be applied 

            to those items that have a sale price.
          nullable: true
          type: boolean
        doesNotApplyToSalePrice:
          description: >-
            Determines if the discount should apply to sale price or regular
            price only.

            Discounts will apply to sale prices by default.

            Only applies to LineItem product discounts.
          nullable: true
          type: boolean
        expirationDate:
          description: Gets or sets the expiration date of the discount.
          format: date-time
          nullable: true
          type: string
        hasPurchaseConditions:
          description: >-
            Indicates if this discount has purchase conditions that must be met
            before 

            the discount is applied
          type: boolean
        id:
          description: Gets or sets the unique identifier for the discount.
          format: int32
          type: integer
        includedPriceLists:
          description: >-
            Products receiving a price from a price list specified here or a
            child of a specified 

            price list can be discounted.
          items:
            type: string
          nullable: true
          type: array
        isBxGx:
          description: >-
            Readonly property indicating that the condition required purchase is
            the 

            same as the target items.  Used in BxGx and BoGo type discounts.
          nullable: true
          type: boolean
        isGroupDiscount:
          description: >-
            When set to true then the discount is applied to all of the target
            items once the minimum quantity per redemption is met.
          type: boolean
        isPublic:
          description: Gets or sets a value indicating whether the discount is public.
          nullable: true
          type: boolean
        isSubscriptionDiscount:
          description: >-
            Gets or sets a value indicating whether the discount is a
            subscription discount.
          nullable: true
          type: boolean
        isUnconditional:
          description: >-
            Gets or sets a value indicating whether the discount is
            unconditional.
          type: boolean
        labels:
          description: List of distinct labels associated with the discount.
          items:
            type: string
          nullable: true
          type: array
        maximumDiscountImpactPerOrder:
          description: |-
            Maximum impact this discount can apply on a single order.
             Must be either null or greater than zero.
          format: double
          nullable: true
          type: number
        maximumDiscountImpactPerRedemption:
          description: |-
            Maximum impact this discount can apply on a single line item.
             Must be either null or greater than zero.
          format: double
          nullable: true
          type: number
        maximumRedemptionsPerOrder:
          description: Maximum number of redemptions for the discount per registered user.
          format: int32
          nullable: true
          type: integer
        maximumUsesPerUser:
          description: |-
            Maximum number of times a user can redeem this discount.
             Must be either null or greater than zero.
          format: int32
          nullable: true
          type: integer
        preventLineItemShippingDiscounts:
          description: >-
            Prevents Line Item Shipping discounts from being applied when a Line
            Item Product  

            discount has been applied
          nullable: true
          type: boolean
        preventOrderProductDiscounts:
          description: >-
            Prevents Order Product discounts from being applied when a Line Item
            Product  

            or Shipping discount has been applied
          nullable: true
          type: boolean
        preventOrderShippingDiscounts:
          description: >-
            Prevents Order Shipping discounts from being applied when a Line
            Item Product/Shipping  

            or Order Product discount has been applied
          nullable: true
          type: boolean
        pricingContext:
          description: |-
            The pricing context this discount is applicable to.
            Values: Any,
            OnlinePurchase,
            ContinuityOrder
          nullable: true
          type: string
        purchaseRequirementType:
          description: >-
            Used to determin how discount is evaluated.  When set to TargetOnly,
            then only the Target is

            used to drive the purchase requirement.  When set to Combination,
            then the Target and Condition

            are used to drive the purchase requirement.
          nullable: true
          type: string
        reevalFreeItemMinOrderPostDiscounts:
          description: >-
            Enables post-order-discount minimum re-evaluation for eligible
            free-item discounts.

            Values null and false are treated as disabled.
          nullable: true
          type: boolean
        scope:
          description: |-
            Gets or sets the scope of the discount.
            Values: Order, LineItem
          nullable: true
          type: string
        stackingLayer:
          description: Indicates which stacking layer this discount is a part of
          format: int32
          nullable: true
          type: integer
        startDate:
          description: Gets or sets the start date of the discount.
          format: date-time
          nullable: true
          type: string
        target:
          $ref: '#/components/schemas/RuntimeDiscountTarget'
        thresholdMessage:
          $ref: '#/components/schemas/ThresholdMessage'
      type: object
    RuntimeDiscountCondition:
      description: ''
      properties:
        categoriesToExcludeFromMinOrderTotal:
          description: >-
            List of categories to discount. When a discount applies to a
            category, all products in the category are discounted.
          items:
            $ref: '#/components/schemas/CategoryDiscountCondition'
          nullable: true
          type: array
        continuityRecurrenceSettings:
          $ref: '#/components/schemas/ContinuityRecurrenceSettings'
        couponCode:
          description: >-
            Code of the coupon associated with the discount (if a coupon code is
            required). The merchant can supply the code or the system can
            generate it.
          nullable: true
          type: string
        customerSegments:
          description: List of customer groups for which the discount applies
          items:
            $ref: '#/components/schemas/PricingRuntimeCustomerSegment'
          nullable: true
          type: array
        excludedCategories:
          description: >-
            List of categories to discount. When a discount applies to a
            category, all products in the category are discounted.
          items:
            $ref: '#/components/schemas/CategoryDiscountCondition'
          nullable: true
          type: array
        excludedProducts:
          description: List of products that are eligible for the discount.
          items:
            $ref: '#/components/schemas/ProductDiscountCondition'
          nullable: true
          type: array
        exclusiveLocationCodes:
          description: >-
            List of locations where the item/order should be fulfilled for the
            discount to be valid.
          items:
            type: string
          nullable: true
          type: array
        exclusiveSiteIds:
          description: >-
            The discount condition for site Ids, if present the discount will be
            applied only to these sites.

            If not present discount will work for all sites in a catalog.
          items:
            format: int32
            type: integer
          nullable: true
          type: array
        includedCategories:
          description: >-
            List of categories that must be purchased in order for the discount
            to be valid.
          items:
            $ref: '#/components/schemas/CategoryDiscountCondition'
          nullable: true
          type: array
        includedPaymentWorkflows:
          description: List of payment types that trigger this discount to be valid.
          items:
            type: string
          nullable: true
          type: array
        includedProducts:
          description: List of products that are eligible for the discount.
          items:
            $ref: '#/components/schemas/ProductDiscountCondition'
          nullable: true
          type: array
        maxRedemptionCount:
          description: >-
            Maximum number of times that the discount can be redeemed. Default
            is null (no limit to discount redemptions).
          format: int32
          nullable: true
          type: integer
        maximumOrderAmount:
          description: >-
            Only applies to order.

            Maximum order subtotal after discounts in order for the associated
            discount to be applied
          format: double
          nullable: true
          type: number
        minDistinctProductsRequired:
          description: |-
            The minimum number of distinct products on the order
            Not a quantity calculation.
          format: int32
          nullable: true
          type: integer
        minTotalOrderQuantity:
          description: >-
            The order must contain at least this total quantity of items for the
            discount to apply.

            You must buy a combined quantity of at least x amount.
          format: int32
          nullable: true
          type: integer
        minimumCategorySubtotalBeforeDiscounts:
          description: >-
            Minimum amount that must be purchased in the combined categories
            defined in 

            IncludedCategories.  Amount is calculated before discounting.

            Not used if IncludedCategories is empty.
          format: double
          nullable: true
          type: number
        minimumLifetimeValueAmount:
          description: Minimum lifetime value amount required for this discount to apply
          format: double
          nullable: true
          type: number
        minimumOrderAmount:
          description: >-
            Only applies to order.

            Minimum order subtotal after discounts in order for the associated
            discount to be applied
          format: double
          nullable: true
          type: number
        minimumQuantityProductsRequiredInCategories:
          description: >-
            Minimum quantity of products in the categories specified in
            IncludedCategories that must be purchased to

            qualify for the associated discount.

            Defaults to 1 if  null and IncludedCategories has values
          format: int32
          nullable: true
          type: integer
        minimumQuantityRequiredProducts:
          description: >-
            Minimum quantity of products in the specified IncludedProducts that
            must be purchased to

            qualify for the associated discount.

            Defaults to 1 if  null and IncludedProducts has values.
          format: int32
          nullable: true
          type: integer
        minimumRequiredQuantityPerRedemption:
          description: >-
            Defines a minimum quantity that is required for a target only
            discount
          format: int32
          nullable: true
          type: integer
        productsToExcludeFromMinOrderTotal:
          description: List of products that are eligible for the discount.
          items:
            $ref: '#/components/schemas/ProductDiscountCondition'
          nullable: true
          type: array
        requiresAuthenticatedUser:
          description: |-
            Determines is this discount can be used by an anonymous user 
            Defaults to false to allow discounts for anonymous users.
          type: boolean
        requiresCoupon:
          description: >-
            If true, the shopper needs to enter a coupon code to redeem the
            discount.
          type: boolean
        validFulfillmentMethods:
          description: >-
            The discount condition for fulfillment methods, if present the
            discount will be applied only to these fulfillment methods.

            This must be a value defined in FulfillmentMethodConst below.
          items:
            type: string
          nullable: true
          type: array
        validSubscriptionContinuityOrdinals:
          description: Ordinals at which a continuity order should receive the discount.
          items:
            format: int32
            type: integer
          nullable: true
          type: array
        validSubscriptionFrequencies:
          description: List of subscription frequencies to which the discount will apply.
          items:
            type: string
          nullable: true
          type: array
      type: object
    DiscountCustomProperty:
      description: Represents a custom property for a discount.
      properties:
        code:
          description: Gets or sets the code of the discount custom property.
          nullable: true
          type: string
        name:
          description: Gets or sets the name of the discount custom property.
          nullable: true
          type: string
        value:
          description: Gets or sets the value of the discount custom property.
          nullable: true
          type: string
      type: object
    RuntimeDiscountTarget:
      properties:
        categories:
          description: >-
            List of categories to discount. When a discount applies to a
            category, all products in the category are discounted.
          items:
            $ref: '#/components/schemas/TargetedCategory'
          nullable: true
          type: array
        doNotApplyToHandlingFees:
          description: Prevents the discount from being applied to handling fees
          nullable: true
          type: boolean
        excludeItemsWithExistingProductDiscounts:
          description: >-
            Prevents order scoped discounts from layering over items that
            already have a product discount with the 

            same type.
          nullable: true
          type: boolean
        excludeItemsWithExistingShippingDiscounts:
          description: >-
            Prevents order scoped discounts from layering over items that
            already have a shipping discount with the 

            same type.
          nullable: true
          type: boolean
        excludedCategories:
          description: >-
            List of categories to exclude from the discount. Useful to exclude
            specific child categories.
          items:
            $ref: '#/components/schemas/TargetedCategory'
          nullable: true
          type: array
        excludedCategoriesOperator:
          description: |-
            Applies to Included categories
            Defaults to Any
          nullable: true
          type: string
        excludedProducts:
          description: List of products that are excluded from the discount.
          items:
            $ref: '#/components/schemas/TargetedProduct'
          nullable: true
          type: array
        includeAllProducts:
          description: If yes, the discount applies to all products sold on the storefront.
          nullable: true
          type: boolean
        includedCategoriesOperator:
          description: >-
            Applies to Included categories

            When Any, the target product can belong to any specified category.

            When All, the target product must belong to all specified
            categories.

            Defaults to Any
          nullable: true
          type: string
        maximumQuantityPerRedemption:
          description: >-
            When a condition is specified, this property limits the number of
            items that can be targeted per discount redemption with an order.

            if multiple redemptions are allowed per order then multiples of this
            value would be allowed in multiples of the associated 

            condition.

            If no condition is specified then this value is not used.  

            If null and condition exists, then defaults to 1.
          format: int32
          nullable: true
          type: integer
        products:
          description: List of products that are eligible for the discount.
          items:
            $ref: '#/components/schemas/TargetedProduct'
          nullable: true
          type: array
        shippingMethods:
          description: >-
            Shipping method that is eligible for shipping discounts. This is a
            shipping method defined in Shipping Settings.
          items:
            $ref: '#/components/schemas/TargetedShippingMethod'
          nullable: true
          type: array
        shippingZones:
          description: Shipping Zones that are applicable for this discount
          items:
            $ref: '#/components/schemas/TargetedShippingZone'
          nullable: true
          type: array
        type:
          description: >2-
                Type of target to which the discount applies. Possible values: <pre>Product</pre> or <pre>Shipping</pre>. 
            If this is a <pre>Product</pre> type, you can specify which products
            or categories that the discount applies to.
                If this is a <pre>Shipping</pre> type then you must specify which shipping methods apply.
          nullable: true
          type: string
      type: object
    ThresholdMessage:
      properties:
        discountId:
          format: int32
          type: integer
        message:
          nullable: true
          type: string
        requiresCouponCode:
          type: boolean
        showInCart:
          type: boolean
        showOnCheckout:
          type: boolean
        thresholdValue:
          format: double
          type: number
      type: object
    CategoryDiscountCondition:
      description: Represents a product category and quantity constraint
      properties:
        categoryId:
          description: >-
            Unique identifier of the category to which the discount condition
            applies.
          format: int32
          type: integer
      type: object
    ContinuityRecurrenceSettings:
      properties:
        interval:
          description: Interval until next discount applies
          format: int32
          nullable: true
          type: integer
        startOrdinal:
          description: Continuity ordinal to start discounting
          format: int32
          nullable: true
          type: integer
        stopOrdinal:
          description: Continuity ordinal to stop discounting
          format: int32
          nullable: true
          type: integer
      type: object
    PricingRuntimeCustomerSegment:
      description: Represents a customer segment
      properties:
        id:
          description: |-
            The Customer segment Id.
            This is the  system Id not the code.
          format: int32
          type: integer
      type: object
    ProductDiscountCondition:
      description: Represents a product and quantity constraint
      properties:
        productCode:
          description: Product code of the product to discount.
          nullable: true
          type: string
      type: object
    TargetedCategory:
      properties:
        id:
          description: Unique identifier of the category to which the discount applies.
          format: int32
          nullable: true
          type: integer
      type: object
    TargetedProduct:
      description: Product to discount.
      properties:
        productCode:
          description: Product code of the product to discount.
          nullable: true
          type: string
      type: object
    TargetedShippingMethod:
      description: >-
        Shipping method that is eligible for free shipping. This is the shipping
        method that is defined with the Shipping

        Settings resource.
      properties:
        code:
          description: >-
            Unique identifier of the shipping method as it appears in the
            SiteShippingMethod property of the Shipping Settings

            resource.
          nullable: true
          type: string
        name:
          description: >-
            Name of the shipping method as it appears in
            SiteShippingMethodLocalizedContent of the Shipping Settings
            resource.
          nullable: true
          type: string
      type: object
    TargetedShippingZone:
      description: >-
        Shipping method that is eligible for free shipping. This is the shipping
        method that is defined with the Shipping

        Settings resource.
      properties:
        zone:
          description: >-
            Indicates the shipping zone that this discount is valid for.  If
            zone is provided the

            method selected must be valid for the zone and both populated in the
            order for the discount

            to be valid.
          nullable: true
          type: string
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: JWT
      description: JWT Authorization header using the Bearer scheme.
      scheme: bearer
      type: http

````

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