getUserPointsBalance
Get the current points of a connected user.
Description
Get the current points (non-qualifying and qualifying points for tiered programs) of a connected user.
Response
Returns a Promise
containing an object
with the total current points and the next movement (points expirations). Example :
{
"nq_points": {
"next_movement": {
"date": "2023-09-01 13:52:37",
"value": 120
},
"total": 120
},
"q_points": {
"next_movement": null,
"total": 384
}
}
In this example, the user has 250 points including 120 expiring the June 27th 2023.
Code example
splioSDK.getUserPointsBalance().then((points) => {
console.log(`You have ${points.total} points`);
console.log('Number of points expiring: ', points.next_movement.value);
});
Updated over 1 year ago