commerce/catalog/admin/discounts/target

Retrieves and modifies the products, categories, and shipping methods eligible for discounts in the form of a fixed dollar amount, percentage off a product price, or free shipping.

JSON Example

DiscountTarget Properties

Property Description
appliesToLeastExpensiveProductsFirst

type: bool

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.

categories

type: list of targetedCategory

The list of all categories associated with the product. These categories contain products, can have discounts associated, and define the grouping of products to display on the storefront.

targetedCategory.id

type: int

Unique identifier of the source property, such as a catalog, discount, order, or email template.

For a product field it will be the name of the field.

For a category ID, must be a positive integer not greater than 2000000. By default, Kibo eCommerce auto-generates a category ID when categories are created. If you want to specify an ID during creation (which preserves category link relationships when migrating tenant data from one sandbox to another), you must also include the useProvidedId query string in the endpoint. For example, api/commerce/catalog/admin/categories/?useProvidedId=true. Then, use the id property to specify the desired category ID.

For a product attribute it will be the Attribute FQN.

For a document, the ID must be specified as a 32 character, case-insensitive, alphanumeric string. You can specify the ID as 32 sequential characters or as groups separated by dashes in the format 8-4-4-4-12. For example, bba0a1a885e2413bb097ceacf7bac366
or
bba0a1a8-85e2-413b-b097-ceacf7bac366.

For email templates, the ID must be one of the following values:
BackInStock
OrderChanged
OrderShipped
OrderFulfillmentDetailsChanged
ShopperLoginCreated
ShopperPasswordReset
ReturnCreated
ReturnAuthorized
ReturnUpdated
ReturnRejected
ReturnCancelled
ReturnClosed
RefundCreated
StoreCreditCreated
StoreCreditUpdated
GiftCardCreated

excludedCategories

type: list of targetedCategory

List of the product categories that are not eligible for the discount.

targetedCategory.id

type: int

Unique identifier of the source property, such as a catalog, discount, order, or email template.

For a product field it will be the name of the field.

For a category ID, must be a positive integer not greater than 2000000. By default, Kibo eCommerce auto-generates a category ID when categories are created. If you want to specify an ID during creation (which preserves category link relationships when migrating tenant data from one sandbox to another), you must also include the useProvidedId query string in the endpoint. For example, api/commerce/catalog/admin/categories/?useProvidedId=true. Then, use the id property to specify the desired category ID.

For a product attribute it will be the Attribute FQN.

For a document, the ID must be specified as a 32 character, case-insensitive, alphanumeric string. You can specify the ID as 32 sequential characters or as groups separated by dashes in the format 8-4-4-4-12. For example, bba0a1a885e2413bb097ceacf7bac366
or
bba0a1a8-85e2-413b-b097-ceacf7bac366.

For email templates, the ID must be one of the following values:
BackInStock
OrderChanged
OrderShipped
OrderFulfillmentDetailsChanged
ShopperLoginCreated
ShopperPasswordReset
ReturnCreated
ReturnAuthorized
ReturnUpdated
ReturnRejected
ReturnCancelled
ReturnClosed
RefundCreated
StoreCreditCreated
StoreCreditUpdated
GiftCardCreated

excludedCategoriesOperator

type: string

The operator to use on the excludedCategories field.

Valid values are: "All" and "Any".

excludedProducts

type: list of targetedProduct

List of products that are not eligible for the discount.

targetedProduct.productCode

type: string

The unique, user-defined product code of a product, used throughout Kibo eCommerce to reference and associate to a product.

excludeItemsWithExistingProductDiscounts

type: bool

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

excludeItemsWithExistingShippingDiscounts

type: bool

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

includeAllProducts

type: bool

If true, the target discount applies to all products sold on the site, regardless of product category.

includedCategoriesOperator

type: string

The operator of the includedCategories field.

Valid values are: "All" and "Any".

maximumQuantityPerRedemption

type: int

When a condition is specified, this property limits the number of items that are targeted for each discount redemption with an order. If multiple redemptions are allowed for each order then multiples of this value are 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.

products

type: list of targetedProduct

List of product codes that represent the products to which the discount can apply.

targetedProduct.productCode

type: string

The unique, user-defined product code of a product, used throughout Kibo eCommerce to reference and associate to a product.

shippingMethods

type: list of targetedShippingMethod

The list of shipping method codes that represents the shipping service types to which the discount can apply.

targetedShippingMethod.code

type: string

The unique identifier of the object.

targetedShippingMethod.name

type: string

The user supplied name that appears in Admin. You can use this field for identification purposes.

shippingZones

type: list of targetedShippingZone

The list of shipping zones that are applicable for this discount.

targetedShippingZone.zone

type: string

The zone string for the tenant domain.

type

type: string

The type of scope, which is a developer account or production tenant.

Operations

Operation Name Request URI Description
GetDiscountTarget GET %7bdiscountId%7d%2ftarget%3fresponseFields%3d%7bresponseFields%7d

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

UpdateDiscountTarget PUT %7bdiscountId%7d%2ftarget%3fresponseFields%3d%7bresponseFields%7d

Modifies properties of the discount target, for example, the dollar amount, or precentage off the price.