Skip to main content
GET
/
{locale}
/
shop
/
loyalty-cards
/
info
curl -X GET "https://staging-api.loyalty.lt/en/shop/loyalty-cards/info?card_number=123-456-789" \
  -H "X-API-Key: your_api_key" \
  -H "X-API-Secret: your_api_secret"
{
  "success": true,
  "message": "Card info retrieved successfully",
  "data": {
    "id": 567,
    "card_number": "123-456-789",
    "card_name": "Kavos mėgėjo kortelė",
    "card_type": "partner_specific",
    "points": 1250,
    "is_active": true,
    "transactions_count": 45,
    "last_used_at": "2024-12-07T14:30:00.000Z",
    "redemption": {
      "enabled": true,
      "points_per_currency": 100,
      "currency_amount": 1.00,
      "min_points": 100,
      "max_points": 5000
    },
    "user": {
      "id": 123,
      "name": "Jonas Jonaitis",
      "email": "[email protected]",
      "phone": "+37060000000"
    },
    "partner": {
      "id": 45,
      "name": "Coffee Paradise",
      "logo": "https://staging-api.loyalty.lt/storage/logos/coffee-paradise.png"
    },
    "created_at": "2024-01-15T10:00:00.000Z",
    "updated_at": "2024-12-07T14:30:00.000Z"
  }
}

Get Loyalty Card Info

Retrieve loyalty card information including points balance. This endpoint is essential for checking a customer’s points before processing a transaction or redemption.
This endpoint requires Shop API authentication (X-API-Key and X-API-Secret headers).

Path Parameters

locale
string
required
Language code (e.g., en, lt)

Query Parameters

At least one of the following is required:
The card_number parameter accepts both the card number (e.g., 123-456-789) and the QR code UUID value. This allows you to search by whatever value you have scanned.
card_id
integer
Loyalty card ID
card_number
string
Loyalty card number (e.g., 123-456-789) or QR code value (UUID)
user_id
integer
User ID to find their card

Authentication

X-API-Key
string
required
API key
X-API-Secret
string
required
API secret

Response

success
boolean
Request success status
data
object
curl -X GET "https://staging-api.loyalty.lt/en/shop/loyalty-cards/info?card_number=123-456-789" \
  -H "X-API-Key: your_api_key" \
  -H "X-API-Secret: your_api_secret"
{
  "success": true,
  "message": "Card info retrieved successfully",
  "data": {
    "id": 567,
    "card_number": "123-456-789",
    "card_name": "Kavos mėgėjo kortelė",
    "card_type": "partner_specific",
    "points": 1250,
    "is_active": true,
    "transactions_count": 45,
    "last_used_at": "2024-12-07T14:30:00.000Z",
    "redemption": {
      "enabled": true,
      "points_per_currency": 100,
      "currency_amount": 1.00,
      "min_points": 100,
      "max_points": 5000
    },
    "user": {
      "id": 123,
      "name": "Jonas Jonaitis",
      "email": "[email protected]",
      "phone": "+37060000000"
    },
    "partner": {
      "id": 45,
      "name": "Coffee Paradise",
      "logo": "https://staging-api.loyalty.lt/storage/logos/coffee-paradise.png"
    },
    "created_at": "2024-01-15T10:00:00.000Z",
    "updated_at": "2024-12-07T14:30:00.000Z"
  }
}

Points Redemption Calculation

When redemption is enabled, calculate the maximum discount:
const maxDiscount = points / redemption.points_per_currency * redemption.currency_amount;
Example:
  • Points: 1250
  • points_per_currency: 100
  • currency_amount: 1.00
Max discount: 1250 / 100 × 1.00 = €12.50

Use Cases

Checkout Display

Show customer’s points balance at checkout

Pre-Transaction Check

Verify points before processing redemption

POS Integration

Display points when scanning loyalty card

Account Lookup

Find customer’s card by email/phone