Skip to main content
POST
/
{locale}
/
shop
/
games
/
{id}
/
restart
Restart Game
curl --request POST \
  --url https://api.example.com/{locale}/shop/games/{id}/restart \
  --header 'Content-Type: application/json' \
  --data '
{
  "card_id": 123,
  "shop_id": 123
}
'
{
  "success": true,
  "message": "Game restarted successfully",
  "data": {
    "progress": {
      "current_step": 0,
      "completed": false,
      "completed_at": null
    }
  }
}

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

id
integer
required
The game ID
card_id
integer
required
The customer’s loyalty card ID
shop_id
integer
required
The shop ID where the restart is happening

Response

success
boolean
Indicates if the request was successful
data.message
string
Success message
data.progress
object
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.