Tiers
Loyalty tiers are lifetime-points thresholds that classify members. When a member's lifetimePoints crosses a tier threshold, they advance automatically and the member.tier_changed webhook fires.
How it works
1. Create tiers with minLifetimePoints thresholds (e.g. Bronze = 0 pts, Silver = 1 000 pts, Gold = 5 000 pts).
2. Every evaluate() call accumulates lifetimePoints on the member.
3. When a threshold is crossed, the member's tier updates automatically and a member.tier_changed webhook fires.
4. Add benefits (EARN_MULTIPLIER, LABEL, EXCLUSIVE_CAMPAIGN) to define what members unlock at each tier.
Endpoints
/tenants/{tenantId}/tiersList all tiers ordered by sortOrder ascending.
/tenants/{tenantId}/tiersCreate a tier. Set minLifetimePoints as the entry threshold. Add benefits to define perks.
/tenants/{tenantId}/tiers/{tierId}Update tier name, minLifetimePoints, benefits, badgeUrl, or sortOrder.
/tenants/{tenantId}/tiers/{tierId}Delete a tier. Returns 409 if members currently hold it. Pass ?force=true to override.
Tier Fields
Benefit Types
EARN_MULTIPLIERmultiplier: numberMembers at this tier earn this multiple of the base points rate. Apply in your checkout logic using the multiplier value.
LABELdescription: stringA text perk shown in the member UI (e.g. "Priority support", "Free delivery").
EXCLUSIVE_CAMPAIGNcampaignId: string (uuid)Only members at this tier (or higher) can earn from the specified campaign.
FREE_REWARDrewardType: string, value: objectA free reward unlocked at this tier. Shape of value depends on your reward catalogue.
Create a tier
curl -X POST "https://loyalty-engine-production-e5cb.up.railway.app/v1/tenants/$TENANT_ID/tiers" \
-H "X-API-Key: sk_test_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Gold",
"minLifetimePoints": 5000,
"sortOrder": 3,
"benefits": [
{ "type": "EARN_MULTIPLIER", "multiplier": 1.5 },
{ "type": "LABEL", "description": "Priority support" }
]
}'List tiers
{
"tiers": [
{
"id": "tier-uuid-1",
"tenantId": "tenant-uuid",
"name": "Bronze",
"minLifetimePoints": 0,
"benefits": [],
"badgeUrl": null,
"sortOrder": 1,
"createdAt": "2026-01-01T00:00:00.000Z",
"updatedAt": "2026-01-01T00:00:00.000Z"
},
{
"id": "tier-uuid-2",
"tenantId": "tenant-uuid",
"name": "Silver",
"minLifetimePoints": 1000,
"benefits": [{ "type": "EARN_MULTIPLIER", "multiplier": 1.25 }],
"badgeUrl": null,
"sortOrder": 2,
"createdAt": "2026-01-01T00:00:00.000Z",
"updatedAt": "2026-01-01T00:00:00.000Z"
},
{
"id": "tier-uuid-3",
"tenantId": "tenant-uuid",
"name": "Gold",
"minLifetimePoints": 5000,
"benefits": [{ "type": "EARN_MULTIPLIER", "multiplier": 1.5 }],
"badgeUrl": null,
"sortOrder": 3,
"createdAt": "2026-01-01T00:00:00.000Z",
"updatedAt": "2026-01-01T00:00:00.000Z"
}
]
}