Skip to main content
Skip to main content

DiscountRule

A discount rule defines how a Discount is calculated when applied to a Cart.

Properties

allocationAllocationTypeRequired
The scope that the discount should apply to.
conditionsDiscountCondition[]Required
The details of the discount conditions associated with the rule. They can be used to limit when the discount can be used.
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.
descriptionstringRequired
A short description of the discount
idstringRequired
The discount rule's ID
metadataRecord<string, unknown>Required
An optional key-value map with additional details
typeDiscountRuleTypeRequired
The type of the Discount, can be fixed for discounts that reduce the price by a fixed amount, percentage for percentage reductions or free\_shipping for shipping vouchers.
updated_atDateRequired
The date with timezone at which the resource was updated.
valuenumberRequired
The value that the discount represents; this will depend on the type of the discount
Was this section helpful?