Loyalty API
Loyalty endpoints exposed by the Devotel CPaaS API
Base path: /api/v1/loyalty/program
Endpoint count: 4
Get the loyalty program
GET /api/v1/loyalty/program
Fetch your workspace’s active loyalty program configuration — its earn rules, tiers, and points-expiry window — so you can render or inspect how points accrue. Returns the saved program, or the built-in default when none has been authored yet. Requires the contacts:read scope.
Create the loyalty program
POST /api/v1/loyalty/program
Create or replace your workspace’s active loyalty program in a single call. Send the full program body: a name, the earnRules (per-event or per-unit point grants), the tiers (each with a threshold and benefits, including a base tier at threshold 0), and an optional pointsExpiryDays. Requires the contacts:write scope.
Update the loyalty program
PUT /api/v1/loyalty/program
Update your workspace’s active loyalty program. This is an idempotent full replace: send the complete program — its earn rules, tiers, and points-expiry window — and it overwrites the current configuration. Requires the contacts:write scope.
Reset the loyalty program
DELETE /api/v1/loyalty/program
Reset your workspace’s loyalty program back to the built-in default. The points ledger (earned and redeemed history) is untouched — only the program configuration reverts. Requires the contacts:write scope.