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.

  • accrual_fixed
    Type: integer
    required

    A fixed point value that will be earned for a transaction regardless of the amount spent, as long as the minimum spend criteria is met.

  • accrual_multiplier
    Type: number
    required

    The 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.

  • min_spend_amount
    Type: integer
    required

    How much (in smallest currency unit/cents) must be spent in a transaction to earn points.

  • name
    Type: string
    required
  • created_at
    Type: string Format: date-time
    read-only

    the date-time notation as defined by RFC 3339, section 5.6, for example, 2017-07-21T17:32:28Z

  • id
    Type: integer
    read-only

    Integer numbers.

  • ineligible_item_set_id
    Type: integer

    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.

  • item_set_id
    Type: integer

    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).

  • program_id
    Type: integer
    read-only

    Integer numbers.

  • status
    Type: string enum
    read-only

    The current status of the Point Accrual Rule.

    values
    • pending
    • active
    • suspended
    • archived
  • store_list_id
    Type: integer

    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.

  • tier_id
    Type: integer

    Optional tier ID for rules for if tiering is enabled.

  • time_selector
    Type: object ยท TimeSelector

    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.

    • name
      Type: string
      required
    • time_selector_entries
      Type: array object[]

      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.

  • updated_at
    Type: string Format: date-time
    read-only

    the date-time notation as defined by RFC 3339, section 5.6, for example, 2017-07-21T17:32:28Z

Examples
{
  "name": "5 points per dollar plus 10 points per visit base rule ",
  "accrual_multiplier": 0.05,
  "accrual_fixed": 10,
  "min_spend_amount": 0
}