redeemReward
Redeem a reward for the logged in customer
RivoJS.redeemReward(rewardId).then(function(resp){
console.log(resp)
});
Parameters
Parameter | Type | Description |
---|---|---|
rewardId | Number | The unique identifier of the reward to be redeemed. |
Sample response
{
"success": true,
"points_tally": 1200,
"points_purchase": {
"id": 75,
"name": "$10 off coupon",
"points_amount": 1000,
"code": "BAL-XXXXXXXX",
"applied_at": "2023-01-30T23:16:11.394Z",
"expires_at": null,
"used_at": null,
"terms_of_service": {
"applies_to": "entire",
"reward_type": "fixed_amount",
"show_tos": false
},
"reward": {
"id": 2,
"name": "$10 off coupon",
"enabled": true,
"points_amount": 1000,
"points_type": "fixed",
"reward_type": "fixed_amount",
"source": "points",
"pretty_display_rewards": "$10 off coupon (1000 points required)",
"icon_url": null,
"terms_of_service": {
"reward_type": "fixed_amount",
"applies_to": "entire",
"show_tos": false
}
}
}
}
Updated over 1 year ago