Create Loyalty Card
Create a new personal loyalty card that allows users to earn and redeem points at a specific shop. This endpoint generates a unique card number and initializes the user’s loyalty account.
Users can create one personal loyalty card per shop. Additional cards require third-party integration through separate endpoints.
Path Parameters
Language code for localized content (e.g., “en”, “lt”)
Request Body
Unique identifier of the shop to create loyalty card for
Preferred card design theme (classic
, modern
, seasonal
)
Optional initial card data and preferences Name to display on the card
communication_preferences
Show communication_preferences
Receive email notifications for points and offers
Receive SMS notifications for important updates
Response
Indicates if the card was successfully created
Human-readable message about the operation
Selected card design theme
URL to card’s QR code for easy scanning
ISO 8601 timestamp when card was created
Points earned per euro spent
Available tier levels and requirements
Starting points balance (usually 0)
Starting tier level (Bronze
)
Welcome bonus points awarded (if applicable)
curl -X POST "https://staging-api.loyalty.lt/en/shop/loyalty-cards" \
-H "Authorization: Bearer your_jwt_token" \
-H "Content-Type: application/json" \
-d '{
"shop_id": 45,
"card_design": "modern",
"initial_data": {
"preferred_name": "Jonas J.",
"communication_preferences": {
"email_notifications": true,
"sms_notifications": false
}
}
}'
Success Response
Shop Already Has Card
{
"success" : true ,
"message" : "Loyalty card created successfully" ,
"data" : {
"card" : {
"id" : 124 ,
"card_number" : "LC2024001234" ,
"status" : "active" ,
"card_type" : "personal" ,
"design" : "modern" ,
"qr_code_url" : "https://api.loyalty.lt/qr/LC2024001234" ,
"created_at" : "2024-01-15T18:00:00Z"
},
"shop" : {
"id" : 45 ,
"name" : "Coffee Paradise" ,
"logo_url" : "https://api.loyalty.lt/storage/logos/coffee-paradise.png" ,
"loyalty_program" : {
"points_per_euro" : 2 ,
"tier_system" : [ "Bronze" , "Silver" , "Gold" , "Platinum" ]
}
},
"initial_balance" : {
"points" : 25 ,
"tier" : "Bronze" ,
"welcome_bonus" : 25
}
}
}