Skip to main content
GET
/
commerce
/
catalog
/
admin
/
discounts
/
{discountId}
/
target
Error
A valid request URL is required to generate request examples
{
  "type": "<string>",
  "includeAllProducts": true,
  "includedCategoriesOperator": "<string>",
  "categories": [
    {
      "id": 123
    }
  ],
  "excludedCategoriesOperator": "<string>",
  "excludedCategories": [
    {
      "id": 123
    }
  ],
  "products": [
    {
      "productCode": "<string>"
    }
  ],
  "excludedProducts": [
    {
      "productCode": "<string>"
    }
  ],
  "excludeItemsWithExistingShippingDiscounts": true,
  "excludeItemsWithExistingProductDiscounts": true,
  "shippingMethods": [
    {
      "code": "<string>",
      "name": "<string>"
    }
  ],
  "shippingZones": [
    {
      "zone": "<string>"
    }
  ],
  "doNotApplyToHandlingFees": true,
  "maximumQuantityPerRedemption": 123,
  "appliesToLeastExpensiveProductsFirst": true
}

Authorizations

Authorization
string
header
required

JWT Authorization header using the Bearer scheme.

Path Parameters

discountId
integer<int32>
required

Unique identifier of the discount. System-supplied and read-only.

Query Parameters

responseFields
string

limits which fields are returned in the response body

Response

Success

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. Can also specify the minimum amount that the order must total for the discount to apply.

type
string
required
Type of target to which the discount applies. Possible values: <pre>Product</pre> or <pre>Shipping</pre>.

If this is a

Product
type, you can specify which products or categories that the discount applies to. If this is a
Shipping
type then you must specify which shipping methods apply.

includeAllProducts
boolean | null

If yes, the discount applies to all products sold on the storefront.

includedCategoriesOperator
string | null

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

categories
object[] | null

List of categories to discount. When a discount applies to a category, all products in the category are discounted.

excludedCategoriesOperator
string | null

Applies to Included categories Defaults to Any

excludedCategories
object[] | null

List of categories to exclude from the discount. Useful to exclude specific child categories.

products
object[] | null

List of products that are eligible for the discount.

excludedProducts
object[] | null

List of products that are excluded from the discount.

excludeItemsWithExistingShippingDiscounts
boolean | null

Prevents order scoped discounts from layering over items that already have a shipping discount with the same type.

excludeItemsWithExistingProductDiscounts
boolean | null

Prevents order scoped discounts from layering over items that already have a product discount with the same type.

shippingMethods
object[] | null

Shipping method that is eligible for shipping discounts. This is a shipping method defined in Shipping Settings.

shippingZones
object[] | null

Shipping Zones that are applicable for this discount

doNotApplyToHandlingFees
boolean | null

Prevents the discount from being applied to handling fees

maximumQuantityPerRedemption
integer<int32> | null

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.

appliesToLeastExpensiveProductsFirst
boolean | null

Determines which way the discount is optimized. Consumers favor(default - false/null) or tenants favor (when this is set to true) Applies to discounts where target is not a specific product or list of products.
May also impact behavior of Buy X Get Y so that X is the most expensive items and Y the least expensive.