Discount Object¶
The Discounts object represents discounts on individual items, which
appear in the discounts
key in the items object, or as discounts in
the receipt’s discounts
object. Receipt level discounts are those that
apply either to the whole receipt, or represent a summary of discounts that
have been applied to individual items. It is possible for a discount to appear
both in at the receipt level and the item level, whether this is the case
depends on the retailer.
For item discounts, the item to which the discount is attached either triggered the discount (e.g., in multi-buy discounts), or is the item to which the discount is applied (e.g., a percentage discount). It is not possible, other than from context, to tell which type of discount this object represents.
Name |
Type |
Description |
---|---|---|
|
string, required |
the descriptive name of this discount |
|
integer, optional |
the quantity of this discount |
|
float, required |
the amount of discount for this discount line |
|
float, optional |
the discount percentage |
|
Discount Properties Object, optional |
Notes¶
The
quantity
key containsnull
for discounts which are not countable (e.g., a staff discount that is applied to the whole receipt) or where the discount appears in the item object where it often does not make sense to have a quantityAll values present in the discount object are those present on the original receipt, in particular whether the
amount
stored for the discounts is positive or negative is retailer specific.