getUserReward
Get the detail of a user reward.
Description
Get the details of a specific reward from the ones obtained by a user.
Parameters
Parameter | Values | Description | Required |
---|---|---|---|
rewardExternalId | string | Id of the reward you are looking for. | required |
Response
Returns a Promise
containing an object
with the details of the reward. Example:
{
description: 'This is a special reward',
external_id: 'my-reward-external-id',
image_url: '{{image_url}}',
name: 'Test Reward',
condition: '',
holding_days: 0,
nqp_value: 100,
stock: 0,
limited: false,
isDisplayed: true,
};
Code example
splioSDK.getReward('my-reward-external-id').then((reward) => {
console.log('This reward costs:', reward.nqp_value);
});
Updated over 1 year ago