Get VIP Tier Data

swellAPI.getVipTiers()

https://loyaltyapi.yotpo.com/reference#get-vip-tier-data

This method returns an array containing all vip tiers you setup. You can use this method to build custom interface around your vip tier program.

$(document).on("swell:setup", function(){
    var vipTiers = swellAPI.getVipTiers();

    vipTiers.forEach(function(tier){
      // do something with each tier
    });
  })

VIP Tier Object

Attribute

Type

Description

id

int

The VIP tier id

name

string

The name of this tier as set in the admin

description

string

The description of this tier

requiredAmountSpentCents

int

The amount of cents a customer must spend within window to earn this tier

requiredAmountSpent

string

A version of requiredAmountSpentCents useful for display (e.g. “$100”)

requiredPointsEarned

int

The amount of points a customer must earn within window to earn this tier

requiredPurchasesMade

int

The amount of purchases a customer must make within window to earn this tier

pointsMultiplier

decimal

The points multiplier customers earn for reaching this tier

rank

int

This tiers rank compared to all other tiers. Useful for determining order

retain_amount_spent_cents

int

The amount of cents a customer must spend within window to retain this tier

retain_points_earned

int

The amount of points a customer must earn within window to retain this tier

retain_purchases_made

int

The quantity of purchases a customer must make within the defined timeframe to retain this tier

retain_referrals_completed

int

The quantity of referrals a customer must make within the defined timeframe to retain this tier

regain_amount_spent_cents

int

The amount (in cents) a customer must spend within the defined timeframe to regain this tier

regain_points_earned

int

The amount of points a customer must earn within the defined timeframe to regain this tier

regain_purchases_made

int

The quantity of purchases a customer must make within the defined timeframe to regain this tier

regain_referrals_completed

int

The quantity of referrals a customer must make within the defined timeframe to regain this tier