curl --request GET \
--url https://api.example.com/{locale}/shop/games/{id}{
"success": true,
"message": "Game retrieved successfully",
"data": {
"id": 1,
"name": {
"lt": "Kavos kortelė",
"en": "Coffee Card"
},
"description": {
"lt": "Surink 8 antspaudus ir gauk kavą nemokamai!",
"en": "Collect 8 stamps and get a free coffee!"
},
"game_type": "stamps",
"is_active": true,
"start_date": null,
"end_date": null,
"stamps_required": 8,
"stamp_settings": {
"stamps_required": 8,
"reward_type": "free_product",
"product_name": "Cappuccino",
"discount_amount": null,
"points_amount": null,
"expiration_days": 30,
"reset_on_complete": true,
"layout": "grid",
"rows": 2,
"columns": 4,
"background_color": "#f0f9ff",
"text_color": "#0369a1",
"item_name_singular": {
"lt": "antspaudas",
"en": "stamp"
},
"item_name_plural": {
"lt": "antspaudai",
"en": "stamps"
},
"punch_text": {
"lt": "Perkite kavą ir gaukite antspaudą!",
"en": "Buy coffee and get a stamp!"
},
"reward_text": {
"lt": "Nemokama kava!",
"en": "Free coffee!"
},
"stamp_icon": "coffee",
"stamp_icon_type": "icon"
},
"partner_name": "Coffee Shop",
"partner_info": {
"id": 1,
"name": "Coffee Shop",
"description": "Best coffee in town",
"logo": "https://example.com/logo.png"
}
}
}
Get detailed information about a specific game
curl --request GET \
--url https://api.example.com/{locale}/shop/games/{id}{
"success": true,
"message": "Game retrieved successfully",
"data": {
"id": 1,
"name": {
"lt": "Kavos kortelė",
"en": "Coffee Card"
},
"description": {
"lt": "Surink 8 antspaudus ir gauk kavą nemokamai!",
"en": "Collect 8 stamps and get a free coffee!"
},
"game_type": "stamps",
"is_active": true,
"start_date": null,
"end_date": null,
"stamps_required": 8,
"stamp_settings": {
"stamps_required": 8,
"reward_type": "free_product",
"product_name": "Cappuccino",
"discount_amount": null,
"points_amount": null,
"expiration_days": 30,
"reset_on_complete": true,
"layout": "grid",
"rows": 2,
"columns": 4,
"background_color": "#f0f9ff",
"text_color": "#0369a1",
"item_name_singular": {
"lt": "antspaudas",
"en": "stamp"
},
"item_name_plural": {
"lt": "antspaudai",
"en": "stamps"
},
"punch_text": {
"lt": "Perkite kavą ir gaukite antspaudą!",
"en": "Buy coffee and get a stamp!"
},
"reward_text": {
"lt": "Nemokama kava!",
"en": "Free coffee!"
},
"stamp_icon": "coffee",
"stamp_icon_type": "icon"
},
"partner_name": "Coffee Shop",
"partner_info": {
"id": 1,
"name": "Coffee Shop",
"description": "Best coffee in town",
"logo": "https://example.com/logo.png"
}
}
}
X-API-Key and X-API-Secret headers.
stamps, wheel, quiz, collection{
"success": true,
"message": "Game retrieved successfully",
"data": {
"id": 1,
"name": {
"lt": "Kavos kortelė",
"en": "Coffee Card"
},
"description": {
"lt": "Surink 8 antspaudus ir gauk kavą nemokamai!",
"en": "Collect 8 stamps and get a free coffee!"
},
"game_type": "stamps",
"is_active": true,
"start_date": null,
"end_date": null,
"stamps_required": 8,
"stamp_settings": {
"stamps_required": 8,
"reward_type": "free_product",
"product_name": "Cappuccino",
"discount_amount": null,
"points_amount": null,
"expiration_days": 30,
"reset_on_complete": true,
"layout": "grid",
"rows": 2,
"columns": 4,
"background_color": "#f0f9ff",
"text_color": "#0369a1",
"item_name_singular": {
"lt": "antspaudas",
"en": "stamp"
},
"item_name_plural": {
"lt": "antspaudai",
"en": "stamps"
},
"punch_text": {
"lt": "Perkite kavą ir gaukite antspaudą!",
"en": "Buy coffee and get a stamp!"
},
"reward_text": {
"lt": "Nemokama kava!",
"en": "Free coffee!"
},
"stamp_icon": "coffee",
"stamp_icon_type": "icon"
},
"partner_name": "Coffee Shop",
"partner_info": {
"id": 1,
"name": "Coffee Shop",
"description": "Best coffee in town",
"logo": "https://example.com/logo.png"
}
}
}
curl -X GET "https://staging-api.loyalty.lt/en/shop/games/1" \
-H "X-API-Key: your_api_key" \
-H "X-API-Secret: your_api_secret" \
-H "Accept: application/json"
import { LoyaltySDK } from '@loyaltylt/sdk';
const sdk = new LoyaltySDK({
apiKey: 'your_api_key',
apiSecret: 'your_api_secret',
});
// Get game details
const game = await sdk.getGame(1);
console.log('Game:', game.name);
console.log('Stamps required:', game.stamps_required);