> ## 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 Discount Target

> Retrieves the discount target, that is which products, categories, or shipping methods are eligible for the discount.



## OpenAPI

````yaml /openapi/openapi_catalog_admin.json get /commerce/catalog/admin/discounts/{discountId}/target
openapi: 3.0.1
info:
  description: |-
    <div id="overview_CATALOG_ADMIN">
                <h2>CATALOG ADMINISTRATION</h2>
                <p>The Catalog Administration APIs are a collection of resources for configuring the catalogs and products offered to your shoppers, including
                    discounts and coupon sets, faceting, price lists, and different types or variations of products. 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>Attributes</strong> resource to manage localization and attribute configurations for your catalogs. This current version of the Attributes API includes localizedContent to
                    support <a href="/pages/catalog-structure#multi-locale-catalogs">multi-locale catalogs</a>, which was not present in the legacy API model. If
                    you were a client prior to May 2024 and have upgraded your implementation to support this feature,
                    you can still access attribute data that has not yet been rewritten to the new model by providing
                    an x-api-version header set to "1". </p>
                <p>Use the <strong>Categories</strong> resource to organize products and control where they appear on the storefront. Create
                    and maintain a hierarchy of categories and subcategories where the site will store properties. This current version of the Categories API includes localizedContent to
                    support <a href="/pages/catalog-structure#multi-locale-catalogs">multi-locale catalogs</a>, which was not present in the legacy API model. If
                    you were a client prior to May 2024 and have upgraded your implementation to support this feature,
                    you can still access category data that has not yet been rewritten to the new model by providing
                    an x-api-version header set to "1". </p>
                <p>Use the <strong>Coupon Sets</strong> resource to view and create coupon sets. You can use coupon sets to group multiple
                    coupon codes together and associate them with one or more discounts.</p>
                <p>Use the <strong>Currency</strong> resource to manage the currency localization rules and exchange rates for any of the
                    currencies that are supported for placing orders in.</p>
                <p>Use the <strong>Discounts</strong> and <strong>Discount Settings</strong> resources to define and manage discounts to apply to products, product categories, or
                    orders. This current version of the Discounts API includes localizedContent to
                    support <a href="/pages/catalog-structure#multi-locale-catalogs">multi-locale catalogs</a>, which was not present in the legacy Products API model. If
                    you were a client prior to May 2024 and have upgraded your implementation to support this feature,
                    you can still access discount data that has not yet been rewritten to the new model by providing
                    an x-api-version header set to "1". </p>
                <p>Use the <strong>Facets</strong> resource to manage the facets shoppers use to filter product display results on a
                    storefront. Facets can include categories, product attributes, or prices, and use either a range of
                    values or discrete values.</p>
                <p>Use the <strong>Master Catalog</strong> resource to view details of the master catalogs associated with a tenant and to
                    manage the product publishing mode for each master catalog.</p>
                <p>Use the <strong>Price Lists</strong> resources to view and create price lists. You can use price lists to override the
                    catalog pricing of products for specific customer segments and/or sites.</p>
                <p>Use the <strong>Products</strong>, <strong>Product Types/Extras/Options/Properties</strong>, and <strong>Product Sort Definitions</strong> resources to create new product definitions in the master catalog and determine which
                    catalogs will feature products. This current version of the Products API includes localizedContent to
                    support <a href="/pages/catalog-structure#multi-locale-catalogs">multi-locale catalogs</a>, which was not present in the legacy Products API model. If
                    you were a client prior to May 2024 and have upgraded your implementation to support this feature,
                    you can still access product data that has not yet been rewritten to the new model by providing
                    an x-api-version header set to "1".</p>
                <p>Use the <strong>Publishing</strong> resource to publish pending product updates together as part of a set.</p>
                <p>Use the <strong>Search</strong> resource to manage all settings and options for providing product search on your site, as
                    well as search tuning rules.</p>
            </div>
  title: Catalog Admin
  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/admin/discounts/{discountId}/target:
    get:
      tags:
        - Discounts
      summary: Get Discount Target
      description: >-
        Retrieves the discount target, that is which products, categories, or
        shipping methods are eligible for the discount.
      parameters:
        - description: Unique identifier of the discount. System-supplied and read-only.
          in: path
          name: discountId
          required: true
          schema:
            format: int32
            type: integer
        - 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/CatalogAdminsDiscountTarget'
            text/json:
              schema:
                $ref: '#/components/schemas/CatalogAdminsDiscountTarget'
            text/plain:
              schema:
                $ref: '#/components/schemas/CatalogAdminsDiscountTarget'
          description: OK
components:
  schemas:
    CatalogAdminsDiscountTarget:
      description: "What to discount. Specifies the type of discount (percentage off, monetary amount, or free shipping) and which products, categories, or shipping methods are eligible for the discount.\r\nCan also specify the minimum amount that the order must total for the discount to apply."
      properties:
        appliesToLeastExpensiveProductsFirst:
          description: "Determines which way the discount is optimized.  Consumers favor(default - false/null) or tenants favor (when this is set to true)\r\nApplies to discounts where target is not a specific product or list of products.  \r\nMay also impact behavior of Buy X Get Y so that X is the most expensive items and Y the least expensive."
          nullable: true
          type: boolean
        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/CatalogAdminsTargetedCategory'
          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 \r\nsame type."
          nullable: true
          type: boolean
        excludeItemsWithExistingShippingDiscounts:
          description: "Prevents order scoped discounts from layering over items that already have a shipping discount with the \r\nsame 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/CatalogAdminsTargetedCategory'
          nullable: true
          type: array
        excludedCategoriesOperator:
          description: "Applies to Included categories\r\nDefaults 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\r\nWhen Any, the target product can belong to any specified category.\r\nWhen All, the target product must belong to all specified categories.\r\nDefaults 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.\r\nif multiple redemptions are allowed per order then multiples of this value would be allowed in multiples of the associated \r\ncondition.\r\nIf no condition is specified then this value is not used.  \r\nIf 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/CatalogAdminsTargetedShippingMethod'
          nullable: true
          type: array
        shippingZones:
          description: Shipping Zones that are applicable for this discount
          items:
            $ref: '#/components/schemas/CatalogAdminsTargetedShippingZone'
          nullable: true
          type: array
        type:
          description: "    Type of target to which the discount applies. Possible values: <pre>Product</pre> or <pre>Shipping</pre>. \r\nIf this is a <pre>Product</pre> type, you can specify which products or categories that the discount applies to.\r\n    If this is a <pre>Shipping</pre> type then you must specify which shipping methods apply."
          minLength: 1
          type: string
      required:
        - type
      type: object
    CatalogAdminsTargetedCategory:
      description: >-
        Category to discount. When a discount applies to a category, all
        products in the category are discounted.
      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
    CatalogAdminsTargetedShippingMethod:
      description: "Shipping method that is eligible for free shipping. This is the shipping method that is defined with the Shipping\r\nSettings resource."
      properties:
        code:
          description: "Unique identifier of the shipping method as it appears in the SiteShippingMethod property of the Shipping Settings\r\nresource."
          maxLength: 100
          minLength: 0
          type: string
        name:
          description: >-
            Name of the shipping method as it appears in
            SiteShippingMethodLocalizedContent of the Shipping Settings
            resource.
          nullable: true
          type: string
      required:
        - code
      type: object
    CatalogAdminsTargetedShippingZone:
      description: "Shipping method that is eligible for free shipping. This is the shipping method that is defined with the Shipping\r\nSettings resource."
      properties:
        zone:
          description: "Indicates the shipping zone that this discount is valid for.  If zone is provided the\r\nmethod selected must be valid for the zone and both populated in the order for the discount\r\nto be valid."
          maxLength: 200
          minLength: 0
          type: string
      required:
        - zone
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: JWT
      description: JWT Authorization header using the Bearer scheme.
      scheme: bearer
      type: http

````