LoyaltyPointAccrualRule
When updating, already existing fields omitted from the payload will generally not be deleted unless otherwise specified. Time selector, item set ID, and tier ID are exceptions.
- accrualType: integer
_fixed requiredA fixed point value that will be earned for a transaction regardless of the amount spent, as long as the minimum spend criteria is met.
- accrualType: number
_multiplier requiredThe ratio of how many points are earned per smallest unit of currency (cents for USD). 5 points per dollar would be a multiplier of 5 points/100 cents, or 0.05.
- minType: integer
_spend _amount requiredHow much (in smallest currency unit/cents) must be spent in a transaction to earn points.
- nameType: stringrequired
- createdType: stringFormat: date-time
_at read-onlythe date-time notation as defined by RFC 3339, section 5.6, for example, 2017-07-21T17:32:28Z
- idType: integerread-only
Integer numbers.
- itemType: integer
_set _id Optional. By default, all Items on a Transaction will earn points. By specifying the ID of a Sparkfly Item Set here, only Items in that set will be eligible to earn points.
- programType: integer
_id read-onlyInteger numbers.
- statusType: stringenumread-only
The current status of the Point Accrual Rule.
values- pending
- active
- suspended
- archived
- storeType: integer
_list _id Optional. By default, Transactions placed through any store location will earn points. By specifying the ID of a Sparkfly Store List here, only Transactions made through a Store in that list will be eligible to earn points.
- tierType: integer
_id Optional tier ID for rules for if tiering is enabled.
- timeType: object ยท TimeSelector
_selector Optional. By default, a point accrual rule is always valid, but a time selector can be specified to make it only apply at specific days/dates/times.
- nameType: stringrequired
- timeType: array object[]
_selector _entries Time Selector Entries define when a Time Selector is active. A Time Selector can have 0..N Entries, and any of them being active will result in the Time Selector being active at a given time.
When a Time Selector Entry is compared against a provided local date-time, the date component ({start|end}_{year|month|day} fields) is checked first. These fields are interpreted differently depending on whether an Entry is Continuous or a Block. Next, the time is checked to make sure it is in the desired range optionally set by the {start|end}_time fields. Lastly, the Entry can be made valid on only certain days of the week by setting the on_{day} fields.
- updatedType: stringFormat: date-time
_at read-onlythe date-time notation as defined by RFC 3339, section 5.6, for example, 2017-07-21T17:32:28Z
{
"name": "5 points per dollar plus 10 points per visit base rule ",
"accrual_multiplier": 0.05,
"accrual_fixed": 10,
"min_spend_amount": 0
}