import SnagSolutions from '@snagsolutions/sdk';
const client = new SnagSolutions({
apiKey: 'My API Key',
});
const response = await client.loyalty.badges.reward('123e4567-e89b-12d3-a456-426614174333');
console.log(response.data);
{
"message": "<string>",
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"userId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"loyaltyBadgeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "active"
}
}
This endpoint allows you to reward a badge for an account
import SnagSolutions from '@snagsolutions/sdk';
const client = new SnagSolutions({
apiKey: 'My API Key',
});
const response = await client.loyalty.badges.reward('123e4567-e89b-12d3-a456-426614174333');
console.log(response.data);
{
"message": "<string>",
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"userId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"loyaltyBadgeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "active"
}
}
UUID of the badge (converted to lowercase)
"123e4567-e89b-12d3-a456-426614174333"
Body
Schema for a update user badge schema
200
Response returned upon successful update of the user badge
Was this page helpful?