AdminPostDiscountsReq
The details of the discount to create.
Properties
codestringRequiredA unique code that will be used to redeem the discount
The discount rule that defines how discounts are calculated
is_dynamicbooleanRequiredWhether 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
is_disabledbooleanRequiredWhether the discount code is disabled on creation. If set to
true, it will not be available for customers.Default: false
regionsstring[]RequiredA list of region IDs representing the Regions in which the Discount can be used.
starts_atDateThe date and time at which the discount should be available.
ends_atDateThe date and time at which the discount should no longer be available.
valid_durationstringThe duration the discount runs between
usage_limitnumberMaximum number of times the discount can be used
metadataRecord<string, unknown>An optional set of key-value pairs to hold additional information.
Was this section helpful?