Skip to main content
Skip to main content

Discount

A discount can be applied to a cart for promotional purposes.

Properties

idstringRequired
The discount's ID
created_atDateRequired
The date with timezone at which the resource was created.
updated_atDateRequired
The date with timezone at which the resource was updated.
deleted_atnull | DateRequired
The date with timezone at which the resource was deleted.
codestringRequired
A unique code for the discount - this will be used by the customer to apply the discount
is_dynamicbooleanRequired
A flag to indicate if multiple instances of the discount can be generated. I.e. for newsletter discounts
rule_idstringRequired
The ID of the discount rule that defines how the discount will be applied to a cart.
ruleDiscountRuleRequired
The details of the discount rule that defines how the discount will be applied to a cart..
is_disabledbooleanRequired
Whether the Discount has been disabled. Disabled discounts cannot be applied to carts
parent_discount_idstringRequired
The Discount that the discount was created from. This will always be a dynamic discount
parent_discountDiscountRequired
The details of the parent discount that this discount was created from.
starts_atDateRequired
The time at which the discount can be used.
ends_atnull | DateRequired
The time at which the discount can no longer be used.
valid_durationnull | stringRequired
Duration the discount runs between
regionsRegion[]Required
The details of the regions in which the Discount can be used.
usage_limitnull | numberRequired
The maximum number of times that a discount can be used.
usage_countnumberRequired
The number of times a discount has been used.

Default: 0

metadataRecord<string, unknown>Required
An optional key-value map with additional details
Was this section helpful?