LoyaltyPointAccrualRule
When updating, already existing fields omitted from the payload will generally not be deleted unless otherwise specified. Time selector, item set ID, ineligible 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: string Format: 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.
- ineligibleType: integer
_item _set _id Optional. The ID of a Sparkfly Item Set whose Items are excluded from earning points. When specified, Items in that set never earn points, even if they also appear in the eligible item_set_id. By default, no Items are excluded.
- itemType: integer
_set _id Optional. The ID of a Sparkfly Item Set whose Items are eligible to earn points. By default, all Items on a Transaction can earn points. When specified, only Items in that set are eligible to earn points (subject to any ineligible_item_set_id exclusions).
- programType: integer
_id read-onlyInteger numbers.
- statusType: string enumread-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: string Format: 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
}