High-level flow
A typical integration does three things:- Identify the customer. Look up a customer with
GET /v2/loyalty/programs/{programId}/customers, or create one withPOST /v2/loyalty/programs/{programId}/customers. A local phone number matches the stored E.164 value using the program country. - Record activity. Add points with
POST /v2/loyalty/programs/{programId}/customers/{customerId}/points/add. Read program transactions withGET /v2/loyalty/programs/{programId}/transactions. - Surface state back to the user. Fetch the wallet pass URL, point balance, or gift card balance to display in your UI.
A minimal example
LOYALTYDOG_API_URL is https://api.loyalty.dog/v2. Append the route, such as /loyalty/programs/prog_123/customers.
Best practices
- Make calls idempotent. Send an
Idempotency-Keyheader on customer creates and points writes. Use a new UUID for each operation, and send that same key again when you retry it. See Idempotency. - Handle 429s gracefully. Back off when you see rate-limit responses and respect the
Retry-Afterheader. - Subscribe to webhooks. Don’t poll for state changes — let LoyaltyDog notify you. See Webhooks.
- Scope tokens per integration. Use a dedicated app key for each integration so you can rotate or revoke without impacting other systems.
Reference
Full API
Every endpoint, request, and response schema.
Authentication
Bearer tokens, app keys, and rotation.
Webhooks
Real-time event delivery.
MCP server
For AI-assistant-driven integrations.
