Skip to main content
POST
/
commerce
/
catalog
/
admin
/
discounts
/
expressions
/
validate
Error
A valid request URL is required to generate request examples
{
  "hasErrors": true,
  "errors": [
    {
      "message": "<string>",
      "expression": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

JWT Authorization header using the Bearer scheme.

Query Parameters

responseFields
string

limits which fields are returned in the response body

Body

application/json

Allows you to define and manage discounts to apply to your products, product categories, or orders. The discounts can be a specified monetary amount off the price, percentage off the price, or for free shipping. You can create a coupon code that applies to the discount.

scope
string
required

Scope to which the discount applies, valid values are: Order, LineItem

target
object
required

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.

amountType
string
required

Type of discount, which can be either a percentage off the price, a specific monetary amount, or free. Possible values: Percentage Amount Free FixedPrice

id
integer<int32> | null

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

content
object

Container for the language-specific name of the discount. You will have a container for each supported language (LocaleCode). This enables you to display the discount name in multiple languages yet manage it as a single discount internally.

localizedContent
object[] | null

Container for the language-specific name of the discount. You will have a container for each supported language (LocaleCode). This enables you to display the discount name in multiple languages yet manage it as a single discount internally.

conditions
object

Specifies constraints that must be satified for a discount to be applied to a target. Constraints are Anded together

currentRedemptionCount
integer<int32> | null

How many times this discount has been redeemed. System-supplied and read-only.

amount
number<double> | null
Amount of the discount, as a percentage or monetary amount, for example 15% or $15.

Must be either null or greater than zero.

status
string | null

Discount status which can be "Active," "Scheduled," or "Expired." System-supplied and read-only.

canBeDeleted
boolean

Signifies that the discount is not referenced and can be hard deleted

doesNotApplyToSalePrice
boolean | null

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.

doesNotApplyToProductsWithSalePrice
boolean | null

Determines whether or not a discount applies to a 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 have a sale price.

isDisabled
boolean | null

Signifies if the discount is disabled (Null is treated as false)

maximumUsesPerUser
integer<int32> | null

Maximum number of times a user can redeem this discount. Must be either null or greater than zero.

maximumDiscountImpactPerOrder
number<double> | null

Maximum impact this discount can apply on a single order. Must be either null or greater than zero.

maximumDiscountImpactPerRedemption
number<double> | null

Maximum impact this discount can apply on a single line item. Must be either null or greater than zero.

maximumRedemptionsPerOrder
integer<int32> | null

Maximum number of redemptions allowed per order. If null, defaults to unlimited.

includedPriceLists
string[] | null

Products receiving a price from a price list specified here or a child of a specified price list can be discounted.

doesNotApplyToMultiShipToOrders
boolean | null

Flag to allow or prevent application to multi-ship-to orders, Only applicable to shipping discounts.

isBxGx
boolean | null

Readonly property indicating that the condition required purchase is the same as the target items. Used in BxGx and BoGo type discounts.

canBeStackedUpon
boolean | null

Indicates whether or not stacking is enabled for this discount

stackingLayer
integer<int32> | null

Indicates which stacking layer this discount is a part of

thresholdMessage
object
preventLineItemShippingDiscounts
boolean | null

Prevents Line Item Shipping discounts from being applied when a Line Item Product
discount has been applied

preventOrderProductDiscounts
boolean | null

Prevents Order Product discounts from being applied when a Line Item Product
or Shipping discount has been applied

preventOrderShippingDiscounts
boolean | null

Prevents Order Shipping discounts from being applied when a Line Item Product/Shipping
or Order Product discount has been applied

hasPurchaseConditions
boolean

Indicates if this discount has purchase conditions that must be met before the discount is applied

purchaseRequirementType
string | null

The type of purchase requirement for this discount, either purchase conditions and targets which
Supports BoGo, and BxGx scenarios. Or Target only that only have a target and no purchase conditions

auditInfo
object
tagCodes
string[] | null

System-supplied and read-only.

isSubscriptionDiscount
boolean | null

Determines how discounts will be evaluated for subscription items and during continuity orders.

isPublic
boolean | null

Determines whether the discount is available for every shopper.

code
string | null

Indicates unique code for the discount, if not present Discount Id is used as a code.

labels
string[] | null

Indicates unique discount labels.

Response

Success

hasErrors
boolean
errors
object[] | null