curl -X POST "https://staging-api.loyalty.lt/en/shop/coupons/verify" \
-H "X-API-Key: your_api_key" \
-H "X-API-Secret: your_api_secret" \
-H "Content-Type: application/json" \
-d '{
"coupon_code": "K1234567890",
"shop_id": 1
}'
{
"success": true,
"message": "Coupon verified successfully",
"data": {
"coupon": {
"id": 123,
"code": "K1234567890",
"status": "active",
"expiry_time": "2025-01-31T23:59:59Z",
"is_pending": false,
"pending_shop_id": null,
"offer": {
"id": 456,
"title": "Free Coffee",
"description": "Get a free coffee with your stamp card",
"discount_type": "game_reward",
"reward_type": "free_product",
"reward_details": "Free medium coffee"
}
},
"user": {
"id": 789,
"name": "Jonas Jonaitis",
"email": "[email protected]",
"phone": "+37060000000",
"default_card_id": 456,
"points_balance": 150
},
"card": {
"id": 456,
"card_number": "123-456-789",
"user_id": 789,
"points_balance": 150
},
"points_rules": {
"points_enabled": true,
"points_redemption_enabled": true,
"points_per_euro": 1,
"euro_per_point": 0.01
},
"games_count": 3,
"coupons_count": 2
}
}
Verify a coupon by scanning its code (Partner API)
curl -X POST "https://staging-api.loyalty.lt/en/shop/coupons/verify" \
-H "X-API-Key: your_api_key" \
-H "X-API-Secret: your_api_secret" \
-H "Content-Type: application/json" \
-d '{
"coupon_code": "K1234567890",
"shop_id": 1
}'
{
"success": true,
"message": "Coupon verified successfully",
"data": {
"coupon": {
"id": 123,
"code": "K1234567890",
"status": "active",
"expiry_time": "2025-01-31T23:59:59Z",
"is_pending": false,
"pending_shop_id": null,
"offer": {
"id": 456,
"title": "Free Coffee",
"description": "Get a free coffee with your stamp card",
"discount_type": "game_reward",
"reward_type": "free_product",
"reward_details": "Free medium coffee"
}
},
"user": {
"id": 789,
"name": "Jonas Jonaitis",
"email": "[email protected]",
"phone": "+37060000000",
"default_card_id": 456,
"points_balance": 150
},
"card": {
"id": 456,
"card_number": "123-456-789",
"user_id": 789,
"points_balance": 150
},
"points_rules": {
"points_enabled": true,
"points_redemption_enabled": true,
"points_per_euro": 1,
"euro_per_point": 0.01
},
"games_count": 3,
"coupons_count": 2
}
}
Show data
Show coupon
curl -X POST "https://staging-api.loyalty.lt/en/shop/coupons/verify" \
-H "X-API-Key: your_api_key" \
-H "X-API-Secret: your_api_secret" \
-H "Content-Type: application/json" \
-d '{
"coupon_code": "K1234567890",
"shop_id": 1
}'
{
"success": true,
"message": "Coupon verified successfully",
"data": {
"coupon": {
"id": 123,
"code": "K1234567890",
"status": "active",
"expiry_time": "2025-01-31T23:59:59Z",
"is_pending": false,
"pending_shop_id": null,
"offer": {
"id": 456,
"title": "Free Coffee",
"description": "Get a free coffee with your stamp card",
"discount_type": "game_reward",
"reward_type": "free_product",
"reward_details": "Free medium coffee"
}
},
"user": {
"id": 789,
"name": "Jonas Jonaitis",
"email": "[email protected]",
"phone": "+37060000000",
"default_card_id": 456,
"points_balance": 150
},
"card": {
"id": 456,
"card_number": "123-456-789",
"user_id": 789,
"points_balance": 150
},
"points_rules": {
"points_enabled": true,
"points_redemption_enabled": true,
"points_per_euro": 1,
"euro_per_point": 0.01
},
"games_count": 3,
"coupons_count": 2
}
}