Discount
A discount can be applied to a cart for promotional purposes.
Properties
idstringRequiredThe discount's ID
created_atDateRequiredThe date with timezone at which the resource was created.
updated_atDateRequiredThe date with timezone at which the resource was updated.
deleted_atnull | DateRequiredThe date with timezone at which the resource was deleted.
codestringRequiredA unique code for the discount - this will be used by the customer to apply the discount
is_dynamicbooleanRequiredA flag to indicate if multiple instances of the discount can be generated. I.e. for newsletter discounts
rule_idstringRequiredThe 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_disabledbooleanRequiredWhether the Discount has been disabled. Disabled discounts cannot be applied to carts
parent_discount_idstringRequiredThe 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_atDateRequiredThe time at which the discount can be used.
ends_atnull | DateRequiredThe time at which the discount can no longer be used.
valid_durationnull | stringRequiredDuration the discount runs between
The details of the regions in which the Discount can be used.
usage_limitnull | numberRequiredThe maximum number of times that a discount can be used.
usage_countnumberRequiredThe number of times a discount has been used.
Default: 0
metadataRecord<string, unknown>RequiredAn optional key-value map with additional details
Was this section helpful?