AdminPostDiscountsReq
constructor
Properties
code
stringRequiredA unique code that will be used to redeem the discount
ends_at
DateThe date and time at which the discount should no longer be available.
is_disabled
booleanRequiredWhether the discount code is disabled on creation. If set to
true
, it will not be available for customers.Default: false
is_dynamic
booleanRequiredWhether the discount should have multiple instances of itself, each with a different code. This can be useful for automatically generated discount codes that all have to follow a common set of rules.
Default: false
metadata
Record<string, unknown>An optional set of key-value pairs to hold additional information.
regions
string[]RequiredA list of region IDs representing the Regions in which the Discount can be used.
The discount rule that defines how discounts are calculated
starts_at
DateThe date and time at which the discount should be available.
usage_limit
numberMaximum number of times the discount can be used
valid_duration
stringThe duration the discount runs between
Was this section helpful?