Overview
Restart a completed stamp card game to allow the customer to start fresh. This is useful when a customer has claimed their reward and wants to start collecting stamps again.
Authentication
This endpoint requires Partner API authentication with X-API-Key and X-API-Secret headers.
Parameters
The customer’s loyalty card ID
The shop ID where the restart is happening
Response
Indicates if the request was successful
New (reset) progress information
{
"success": true,
"message": "Game restarted successfully",
"data": {
"progress": {
"current_step": 0,
"completed": false,
"completed_at": null
}
}
}
Example Request
curl -X POST "https://staging-api.loyalty.lt/en/shop/games/1/restart" \
-H "X-API-Key: your_api_key" \
-H "X-API-Secret: your_api_secret" \
-H "Content-Type: application/json" \
-d '{
"card_id": 123,
"shop_id": 1
}'
SDK Example
import { LoyaltySDK } from '@loyaltylt/sdk';
const sdk = new LoyaltySDK({
apiKey: 'your_api_key',
apiSecret: 'your_api_secret',
});
// Restart a game after completion
const result = await sdk.restartGame(1, 123, 1); // gameId, cardId, shopId
console.log('Game restarted, new progress:', result.progress);
Notes
Restarting a game does not affect previous rewards. Once a coupon has been generated, it remains valid regardless of game restart.
This action cannot be undone. The customer’s previous progress will be lost.