swellAPI.getVipTiers()

This method returns an array containing all VIP tiers you've set up. You can use this method to build a 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

AttributeTypeDescription
idintThe VIP tier id
namestringThe name of this tier as set in the admin
descriptionstringThe description of this tier
requiredAmountSpentCentsintThe amount of cents a customer must spend within window to earn this tier
requiredAmountSpentstringA version of requiredAmountSpentCents useful for display (e.g. “$100”)
requiredPointsEarnedintThe amount of points a customer must earn within window to earn this tier
requiredPurchasesMadeintThe amount of purchases a customer must make within window to earn this tier
pointsMultiplierdecimalThe points multiplier customers earn for reaching this tier
rankintThis tiers rank compared to all other tiers. Useful for determining order
retain_amount_spent_centsintThe amount of cents a customer must spend within window to retain this tier
retain_points_earnedintThe amount of points a customer must earn within window to retain this tier
retain_purchases_madeintThe quantity of purchases a customer must make within the defined timeframe to retain this tier
retain_referrals_completedintThe quantity of referrals a customer must make within the defined timeframe to retain this tier
regain_amount_spent_centsintThe amount (in cents) a customer must spend within the defined timeframe to regain this tier
regain_points_earnedintThe amount of points a customer must earn within the defined timeframe to regain this tier
regain_purchases_madeintThe quantity of purchases a customer must make within the defined timeframe to regain this tier
regain_referrals_completedintThe quantity of referrals a customer must make within the defined timeframe to regain this tier