Discount document (Shop API 18.1)
Document representing a discount that was either optionally
applied when creating a custom price adjustment or applied by the
promotion engine. The property 
type is mandatory; the
properties amount and priceBookId are
used only in association with specific types. Some examples: - Type 
percentagewith percentage15.00: a 15% discount was applied. - Type 
amountwith amount5.99: a discount was applied to reduce the (unit) price by 5.99. - Type 
fixed_pricewith amount49.99: a discount was applied to reduce the price to 49.99. - Type 
free: a discount was applied to reduce the price to zero. - Type 
price_book_pricewith price_book_idMyPriceBook: a discount was applied to set the price to that defined in MyPriceBook. 
| Property | Type | Constraints | Description | 
|---|---|---|---|
amount
 | 
Decimal | The amount that is used with the amount and fixed price types. | |
percentage
 | 
Decimal | The percentage that is used with percentage types. | |
price_book_id
 | 
String | The price book id that is used with some types. | |
type
 | 
Enum {percentage, fixed_price, amount, free, price_book_price, bonus, total_fixed_price, bonus_choice, percentage_off_options} | mandatory=true, nullable=false | The type of discount. | 
X
OCAPI versions 15.x and 16.x will be retired on March 31, 2021. For dates and more information, see the OCAPI versioning and deprecation policy and this Knowledge Article.