> ## 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 Order Level Discounts

> Retrieves a list of order level discounts that appear on the storefront according to specified filter criteria.



## OpenAPI

````yaml /openapi/openapi_pricing.json post /commerce/catalog/storefront/discounts/orders
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/orders:
    post:
      tags:
        - Discounts
      summary: Get Order Level Discounts
      description: >-
        Retrieves a list of order level discounts that appear on the storefront
        according to specified filter criteria.
      parameters:
        - 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/FindOrderDiscountsRequest'
        description: ''
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/FindDiscountsResponse'
                type: array
            text/json:
              schema:
                items:
                  $ref: '#/components/schemas/FindDiscountsResponse'
                type: array
            text/plain:
              schema:
                items:
                  $ref: '#/components/schemas/FindDiscountsResponse'
                type: array
          description: OK
components:
  schemas:
    FindOrderDiscountsRequest:
      allOf:
        - $ref: '#/components/schemas/FindDiscountsRequestBase'
        - additionalProperties: false
          type: object
      description: Request parameters to search for order level discounts
    FindDiscountsResponse:
      properties:
        discounts:
          items:
            $ref: '#/components/schemas/PricingRuntimeDiscount'
          nullable: true
          type: array
        purchaseRequirements:
          items:
            $ref: '#/components/schemas/ProductDiscountMap'
          nullable: true
          type: array
        targets:
          items:
            $ref: '#/components/schemas/ProductDiscountMap'
          nullable: true
          type: array
      type: object
    FindDiscountsRequestBase:
      description: Request parameters to search for discounts
      properties:
        customerSegmentIds:
          description: >-
            List of customer segments that the discounts are applicable to.

            If not specified, only discounts that are not restricted to any
            customer segment are returned.

            When specified, only discounts that are applicable to one of the
            specified customer segments are returned.
          items:
            format: int32
            type: integer
          nullable: true
          type: array
        includeUnconditional:
          description: >-
            When true, include discounts that are applied when there is no
            condition on the discount.

            By default, these are not included.
          type: boolean
        isPurchaseRequirement:
          description: >-
            Set false to exclude discounts that require one of the specified
            products to be purchased

            default is true
          type: boolean
        labels:
          description: |-
            List of discount labels to filter discounts by.
            Limit: 10 labels
          items:
            type: string
          nullable: true
          type: array
        locationCodes:
          description: |-
            List of location codes to filter discounts by.
            when not specified all discounts are returned.
          items:
            type: string
          nullable: true
          type: array
        productCodes:
          description: |-
            List of product codes to query for discounts
            Limit: 20 product codes
          items:
            type: string
          nullable: true
          type: array
        targetType:
          description: |-
            Types of discounts to search for Product, Shipping, or All
            when not specified, all types are returned.
          nullable: true
          type: string
      type: object
    PricingRuntimeDiscount:
      description: >-
        Name of the discount that can be applied and its expiration date. The
        discount can be on a single product or the

        entire order.
      properties:
        amount:
          format: double
          type: number
        amountType:
          description: >-
            Type of discount, which can be either a percentage off the price, a
            specific monetary amount, or free. Possible values: "Percentage,"
            "Amount," and "Free".
          nullable: true
          type: string
        code:
          description: Unique identifier of the discount.
          nullable: true
          type: string
        condition:
          $ref: '#/components/schemas/PricingRuntimeDiscountCondition'
        discountId:
          description: Unique identifier of the discount. System-supplied and read-only.
          format: int32
          type: integer
        doesNotApplyToMultiShipToOrders:
          nullable: true
          type: boolean
        doesNotApplyToProductsWithSalePrice:
          type: boolean
        expirationDate:
          deprecated: true
          description: When the discount expires. If null, there's no expiration date.
          format: date-time
          nullable: true
          type: string
        friendlyDescription:
          description: Friendly description of the discount.
          nullable: true
          type: string
        includedPriceLists:
          items:
            type: string
          nullable: true
          type: array
        isPublic:
          nullable: true
          type: boolean
        labels:
          items:
            type: string
          nullable: true
          type: array
        maxDiscountValuePerRedemption:
          format: double
          nullable: true
          type: number
        maxRedemptions:
          format: int32
          nullable: true
          type: integer
        maximumDiscountValuePerOrder:
          format: double
          nullable: true
          type: number
        maximumRedemptionsPerOrder:
          format: int32
          nullable: true
          type: integer
        maximumUsesPerUser:
          format: int32
          nullable: true
          type: integer
        name:
          description: Name of the discount.
          nullable: true
          type: string
        redemptions:
          format: int32
          type: integer
        requiresAuthenticatedUser:
          type: boolean
        scope:
          nullable: true
          type: string
        stackingLayer:
          format: int32
          type: integer
        target:
          $ref: '#/components/schemas/PricingRuntimeDiscountTarget'
        type:
          nullable: true
          type: string
      type: object
    ProductDiscountMap:
      properties:
        discountIds:
          items:
            format: int32
            type: integer
          nullable: true
          type: array
        productCode:
          nullable: true
          type: string
      type: object
    PricingRuntimeDiscountCondition:
      properties:
        couponCode:
          description: >-
            ShippingMethodCode 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
        customerSegmentIds:
          description: List of customer groups for which the discount applies
          items:
            format: int32
            type: integer
          nullable: true
          type: array
        excludedCategoryIds:
          description: >-
            List of categories to discount. When a discount applies to a
            category, all products in the category are discounted.
          items:
            format: int32
            type: integer
          nullable: true
          type: array
        excludedProductCodes:
          description: List of products that are eligible for the discount.
          items:
            type: string
          nullable: true
          type: array
        expirationDate:
          description: >-
            Date when the discount expires. Default is null (no expiration
            date).
          format: date-time
          nullable: true
          type: string
        includedCategoryIds:
          description: >-
            List of categories to discount. When a discount applies to a
            category, all products in the category are discounted.
          items:
            format: int32
            type: integer
          nullable: true
          type: array
        includedProductCodes:
          description: List of products that are eligible for the discount.
          items:
            type: string
          nullable: true
          type: array
        maximumOrderAmount:
          description: >-
            If the discount is for products, how many product can you have and
            still be eligible for the discount.

            If the discount is for an order, what is the max the order can total
            to be eligible for the discount. For example, you might want to
            offer a 10% discount on orders under $100.
          format: double
          nullable: true
          type: number
        minDistinctProductsRequired:
          description: >-
            Minimum number of distinct products that must be purchased that are
            also not free.
          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.
          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: >-
            If the discount is for products, how many products must be purchased
            to be eligible for the discount.

            If the discount is for an order, how much the order must total to be
            eligible for the discount. For example, you might want to offer a
            10% discount on orders over $100.
          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.

            Valid values are null and ints greater than zero
          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 0
          format: int32
          nullable: true
          type: integer
        paymentWorkflows:
          description: |-
            List of payment types that are valid for this discount.
            An empty list signifies all payment types.
          items:
            type: string
          nullable: true
          type: array
        requiresCoupon:
          description: >-
            If true, the shopper needs to enter a coupon code to redeem the
            discount.
          type: boolean
        startDate:
          description: >-
            Date when the discount can goes into effect, in the format
            yyyy-mm-dd.
          format: date-time
          nullable: true
          type: string
      type: object
    PricingRuntimeDiscountTarget:
      properties:
        excludedCategoriesOperator:
          nullable: true
          type: string
        excludedCategoryIds:
          items:
            format: int32
            type: integer
          nullable: true
          type: array
        excludedProductCodes:
          items:
            type: string
          nullable: true
          type: array
        includeAllProducts:
          description: >-
            When IncludeAllProducts is true then IncludedCategories and
            IncludedProducts are not evaluated and should be 

            empty.  Only exclusions apply.
          type: boolean
        includedCategoriesOperator:
          nullable: true
          type: string
        includedCategoryIds:
          items:
            format: int32
            type: integer
          nullable: true
          type: array
        includedProductCodes:
          items:
            type: string
          nullable: true
          type: array
        shippingMethods:
          items:
            type: string
          nullable: true
          type: array
        shippingZones:
          items:
            type: string
          nullable: true
          type: array
        type:
          nullable: true
          type: string
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: JWT
      description: JWT Authorization header using the Bearer scheme.
      scheme: bearer
      type: http

````