{
"discounts": [
{
"value": 20,
"type": "ABSOLUTE",
"description": "T-shirt for free for orders over $100",
"appliesToProducts": [45723490,35498525]
},
{
"value": 10,
"type": "PERCENT",
"description": "10% off. Thanks for liking us on Facebook!"
}
]
}
An array of JSON data of type 'CustomDiscounts' with the following fields:
CustomDiscounts
Name | Type | Description |
---|---|---|
value | number | Discount amount |
type | number | Discount type: ABSOLUTE or PERCENT . Default is ABSOLUTE |
description | string | Discount description. Is displayed to customer at cart page and in order details |
appliesToProducts | Array of numbers | Determines which products (product IDs ) in cart will get the discount applied to them. If appliesToProducts is an empty array or not specified, the discount will spread out evenly towards all products in cart. |
Bold fields are mandatory.