Discount Rule Object


Manage Discount Rules.

Properties
idstringRead-onlyformat GUID

Discount rule ID.


revisionintegerRead-onlyformat int64

Revision number, which increments by 1 each time the discount rule is updated. To prevent conflicting changes, the current revision must be passed when updating the discount rule.


createdDatestringRead-onlyformat date-time

Date and time the discount rule was created.


updatedDatestringRead-onlyformat date-time

Date and time the discount rule was last updated.


activeboolean

Whether the discount rule is active.

Default: true


namestringminLength 1maxLength 50

Discount rule name.


triggerobject

Discount rule trigger. A set of conditions that must be met for the discounts to be applied. Not passing a trigger will cause the discount to always apply.


activeTimeInfoobject

Time frame in which the discount rule is active.


discountsobject

List of discounts that are applied when one or more triggers are met.

Notes:

  • Currently, only 1 discount can be defined per discount rule.
  • A discount rule can be applied on multiple items per cart.
  • A discount rule can only be applied once per item.

statusstringRead-only
4 enum supported values:
UNDEFINEDLIVEEXPIREDPENDING

Discount rule status.


usageCountintegerRead-only

Number of times the discount rule was used.

Was this helpful?
Yes
No