Skip to main content
Skip to main content

Discount

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

Properties

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

Default: 0

usage_limitnull | numberRequired
The maximum number of times that a discount can be used.
valid_durationnull | stringRequired
Duration the discount runs between
Was this section helpful?