Skip to main content
GET
/
{locale}
/
shop
/
games
/
{id}
/
progress
Get Game Progress
curl --request GET \
  --url https://api.example.com/{locale}/shop/games/{id}/progress
{
  "success": true,
  "message": "Game progress retrieved successfully",
  "data": {
    "game": {
      "id": 1,
      "name": {
        "lt": "Kavos kortelė",
        "en": "Coffee Card"
      },
      "game_type": "stamps"
    },
    "progress": {
      "current_step": 5,
      "completed": false,
      "completed_at": null,
      "history": [
        {
          "timestamp": "2024-01-15T10:30:00Z",
          "action": "stamp_added",
          "value": 1,
          "shop_id": 1,
          "performed_by_staff": 42
        },
        {
          "timestamp": "2024-01-14T14:20:00Z",
          "action": "stamp_added",
          "value": 2,
          "shop_id": 1,
          "performed_by_staff": 42
        }
      ]
    },
    "stamps_required": 8,
    "stamp_settings": {
      "stamps_required": 8,
      "reward_type": "free_product",
      "product_name": "Cappuccino",
      "layout": "grid",
      "rows": 2,
      "columns": 4,
      "stamp_icon": "coffee",
      "stamp_icon_type": "icon",
      "background_color": "#f0f9ff",
      "text_color": "#0369a1",
      "punch_text": {
        "lt": "Perkite kavą ir gaukite antspaudą!",
        "en": "Buy coffee and get a stamp!"
      },
      "reward_text": {
        "lt": "Nemokama kava!",
        "en": "Free coffee!"
      }
    }
  }
}

Overview

Get detailed progress information for a specific game and customer. Includes stamp settings, current progress, and history of all actions.

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

Response

success
boolean
Indicates if the request was successful
data.game
object
Game information
data.progress
object
Detailed progress information
data.progress.current_step
integer
Current number of stamps
data.progress.completed
boolean
Whether the game is completed
data.progress.completed_at
string
ISO 8601 timestamp when completed (if completed)
data.progress.history
array
Array of all progress actions
data.stamps_required
integer
Total stamps required to complete
data.stamp_settings
object
Full stamp settings including layout and images
{
  "success": true,
  "message": "Game progress retrieved successfully",
  "data": {
    "game": {
      "id": 1,
      "name": {
        "lt": "Kavos kortelė",
        "en": "Coffee Card"
      },
      "game_type": "stamps"
    },
    "progress": {
      "current_step": 5,
      "completed": false,
      "completed_at": null,
      "history": [
        {
          "timestamp": "2024-01-15T10:30:00Z",
          "action": "stamp_added",
          "value": 1,
          "shop_id": 1,
          "performed_by_staff": 42
        },
        {
          "timestamp": "2024-01-14T14:20:00Z",
          "action": "stamp_added",
          "value": 2,
          "shop_id": 1,
          "performed_by_staff": 42
        }
      ]
    },
    "stamps_required": 8,
    "stamp_settings": {
      "stamps_required": 8,
      "reward_type": "free_product",
      "product_name": "Cappuccino",
      "layout": "grid",
      "rows": 2,
      "columns": 4,
      "stamp_icon": "coffee",
      "stamp_icon_type": "icon",
      "background_color": "#f0f9ff",
      "text_color": "#0369a1",
      "punch_text": {
        "lt": "Perkite kavą ir gaukite antspaudą!",
        "en": "Buy coffee and get a stamp!"
      },
      "reward_text": {
        "lt": "Nemokama kava!",
        "en": "Free coffee!"
      }
    }
  }
}

Example Request

curl -X GET "https://staging-api.loyalty.lt/en/shop/games/1/progress?card_id=123" \
  -H "X-API-Key: your_api_key" \
  -H "X-API-Secret: your_api_secret" \
  -H "Accept: application/json"

SDK Example

import { LoyaltySDK } from '@loyaltylt/sdk';

const sdk = new LoyaltySDK({
  apiKey: 'your_api_key',
  apiSecret: 'your_api_secret',
});

// Get detailed progress for a game
const progress = await sdk.getGameProgress(1, 123); // gameId, cardId
console.log(`Progress: ${progress.progress.current_step}/${progress.stamps_required}`);
console.log('Stamp settings:', progress.stamp_settings);