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
Whether the request was successful.
Rewards available to all customers.
Display name of the reward.
Description of what the reward provides.
Number of points required to redeem.
Reward category (e.g. "fixed", "percentage", "free_shipping").
Type of discount applied.
VIP tier required to redeem, or null if available to all.
Formatted minimum spend required to use the discount.
Product metadata for free-product rewards, or null for non-product rewards.Show Product metadata properties
URL of the product image.
The product handle for URL construction.
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": []
}
}