Loyalty API
Required scope: loyalty:read
List Loyalty Tiers
GET /api/v1/loyalty_tiers
Returns all active loyalty tiers ordered by level.
Response
{
"data": {
"loyalty_tiers": [
{
"id": 1,
"name": "Bronze",
"level": 1,
"color": "#CD7F32",
"minimum_lifetime_spend": 0,
"discount_percentage": 0,
"points_multiplier": 1.0
},
{
"id": 2,
"name": "Gold",
"level": 3,
"color": "#FFD700",
"minimum_lifetime_spend": 1000,
"discount_percentage": 5,
"points_multiplier": 1.5
}
]
}
}
List Loyalty Rewards
GET /api/v1/loyalty_rewards
Returns available rewards that customers can redeem with points.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
customer_id | integer | Only show rewards this customer can currently redeem |
Available Rewards for a Customer
GET /api/v1/loyalty_rewards/available?customer_id=:id
Returns rewards the specified customer can currently redeem, along with their current points and tier.
Response
{
"data": {
"customer_id": 1,
"customer_name": "Jane Smith",
"loyalty_points": 2450,
"loyalty_tier": "Gold",
"available_rewards": [ ... ]
}
}
Customer Loyalty Info
Customer loyalty data (points, tier, visit count) is included in the Customers API response fields: loyalty_tier, loyalty_points, lifetime_spend, visit_count.