Skip to main content
Skip to main content

DiscountRule

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

Properties

idstringRequired
The discount rule'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.
descriptionstringRequired
A short description of the discount
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.
valuenumberRequired
The value that the discount represents; this will depend on the type of the discount
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.
metadataRecord<string, unknown>Required
An optional key-value map with additional details
Was this section helpful?