POST
/
{locale}
/
shop
/
loyalty-cards
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": 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
    }
  }
}

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

locale
string
required
Language code for localized content (e.g., “en”, “lt”)

Request Body

shop_id
integer
required
Unique identifier of the shop to create loyalty card for
card_design
string
Preferred card design theme (classic, modern, seasonal)
initial_data
object
Optional initial card data and preferences

Response

success
boolean
Indicates if the card was successfully created
message
string
Human-readable message about the operation
data
object
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": 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
    }
  }
}