DiscountRequest document (Shop API 19.5)

Document representing a discount to be applied to a custom price adjustment. The properties type and value are mandatory.

The type amount describes a (unit) price discount, and its corresponding value (positive) defines the amount each unit is to be reduced. For example, for a $10 discount:

{ "discount" : {"type" : "amount", "value" : 10.00 }, ... }

The type percentage describes a percentage discount, and its corresponding value (positive) defines the percentage reduction. For example, for a 5% discount:

{ "discount" : {"type" : "percentage", "value" : 5 }, ... }

The type fixed_price describes a fixed price discount, and its corresponding value (positive) defines the resulting fixed price for the item. Only one fixed_price discount can be set for each item. For example, to set a fixed price of $15 for the item:

{ "discount" : {"type" : "fixed_price", "value" : 15.00 }, ... }

The type fixed_price is not supported at the order level.

Property Type Constraints Description
type Enum {percentage, fixed_price, amount} mandatory=true, nullable=false The type of discount.
value Decimal mandatory=true, nullable=false The amount of the discount.