Skip to main content
Retrieve all rewards configured for the shop, split into regular rewards and tiered rewards (rewards locked behind VIP tiers).

Usage

MageSDK.getShopRewards().then(function(resp) {
  if (resp.success) {
    console.log(resp.data.regularRewards);
    console.log(resp.data.tieredRewards);
  }
});

Response

success
boolean
Whether the request was successful.
data.regularRewards
array
Rewards available to all customers.
data.tieredRewards
array
Rewards restricted to specific VIP tiers. Same shape as regularRewards.

Sample response

{
  "success": true,
  "data": {
    "regularRewards": [
      {
        "id": "reward_abc",
        "name": "\u00a35 off your next order",
        "description": "\u00a35 off your order",
        "pointsCost": 500,
        "category": "fixed",
        "discountType": "fixed",
        "tier": null,
        "minimumSpend": "\u00a320"
      }
    ],
    "tieredRewards": []
  }
}