API Reference
Integrate Loyalty+ with your POS, e-commerce, or custom application
🔑Authentication
All POS API endpoints require an API key. Generate one from your Admin Portal under Billing → API Key.
X-API-Key: loy_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx📡POS Endpoints
Use X-API-Key header for authentication
/v1/pos/checkinAward points to a customer
Request Body
{
"phone": "+353123456789",
"storeId": "cuid_optional",
"amount": 25.5,
"units": 3
}Response
{
"success": true,
"customerId": "cuid_xxx",
"pointsAwarded": 25,
"totalPoints": 125,
"rewardThreshold": 100,
"rewardAvailable": true
}- • Use 'phone' or 'customerId' to identify customer
- • Include 'amount' for SPEND mode, 'units' for UNIT mode
/v1/pos/customer/:identifierLook up customer by phone or ID
Response
{
"customerId": "cuid_xxx",
"name": "John Doe",
"phone": "+353123456789",
"status": "ACTIVE",
"totalPoints": 125,
"rewardAvailable": true
}/v1/pos/balance/:identifierQuick balance check
Response
{
"customerId": "cuid_xxx",
"totalPoints": 125
}/v1/pos/redeemRedeem points for a reward
Request Body
{
"phone": "+353123456789",
"points": 100
}Response
{
"success": true,
"redemptionId": "cuid_xxx",
"pointsRedeemed": 100,
"rewardTitle": "Free Coffee",
"remainingPoints": 25
}👥Customer Management
Use Bearer JWT token (admin login) for authentication
/v1/owner/customersCreate a new customer
Request Body
{
"name": "John Doe",
"phone": "+353123456789",
"notes": "VIP customer",
"initialPoints": 50
}Response
{
"success": true,
"customer": {
"id": "cuid_xxx",
"name": "John Doe",
"phone": "+353123456789",
"totalPoints": 50
}
}/v1/owner/customersList all customers (paginated)
Response
{
"customers": [
{
"id": "...",
"name": "...",
"totalPoints": 125
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 150
}
}- • Query params: page, limit, search, statusFilter, sortBy, sortOrder
/v1/owner/customers/:idGet customer details with points history
Response
{
"customer": {
"id": "...",
"name": "...",
"status": "ACTIVE"
},
"pointsHistory": [
{
"delta": 10,
"reason": "Visit"
}
],
"totalPoints": 125
}/v1/owner/customers/:idUpdate customer (edit or lock/unlock)
Request Body
{
"name": "Jane Doe",
"phone": "+353987654321",
"status": "BLOCKED"
}Response
{
"success": true,
"customer": {
"id": "...",
"name": "Jane Doe",
"status": "BLOCKED"
}
}- • Set status to 'BLOCKED' to lock, 'ACTIVE' to unlock
/v1/owner/customers/:id/pointsAdd or deduct points with audit trail
Request Body
{
"points": -50,
"reason": "Refund for cancelled order"
}Response
{
"success": true,
"newBalance": 75,
"adjustment": -50
}- • Use positive number to add, negative to deduct
/v1/owner/customers/:idPermanently delete a customer
Response
{
"success": true,
"message": "Customer deleted permanently"
}💻Code Examples
curl -X POST https://api.loyaltyplus.app/v1/pos/checkin \
-H "Content-Type: application/json" \
-H "X-API-Key: loy_your_api_key_here" \
-d '{"phone": "+353123456789", "amount": 25.50}'const response = await fetch('https://api.loyaltyplus.app/v1/owner/customers', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_JWT_TOKEN'
},
body: JSON.stringify({
name: 'John Doe',
phone: '+353123456789',
initialPoints: 50
})
});
const data = await response.json();Ready to Integrate?
Log in to your Admin Portal to generate an API key and start integrating.