Discount
A discount can be applied to a cart for promotional purposes.
Properties
id
stringRequiredThe discount's ID
created_at
DateRequiredThe date with timezone at which the resource was created.
updated_at
DateRequiredThe date with timezone at which the resource was updated.
deleted_at
null | DateRequiredThe date with timezone at which the resource was deleted.
code
stringRequiredA unique code for the discount - this will be used by the customer to apply the discount
is_dynamic
booleanRequiredA flag to indicate if multiple instances of the discount can be generated. I.e. for newsletter discounts
rule_id
stringRequiredThe ID of the discount rule that defines how the discount will be applied to a cart.
The details of the discount rule that defines how the discount will be applied to a cart..
is_disabled
booleanRequiredWhether the Discount has been disabled. Disabled discounts cannot be applied to carts
parent_discount_id
stringRequiredThe Discount that the discount was created from. This will always be a dynamic discount
The details of the parent discount that this discount was created from.
starts_at
DateRequiredThe time at which the discount can be used.
ends_at
null | DateRequiredThe time at which the discount can no longer be used.
valid_duration
null | stringRequiredDuration the discount runs between
The details of the regions in which the Discount can be used.
usage_limit
null | numberRequiredThe maximum number of times that a discount can be used.
usage_count
numberRequiredThe number of times a discount has been used.
Default: 0
metadata
Record<string, unknown>RequiredAn optional key-value map with additional details
Was this section helpful?