REST API
API Reference
Programmatic access to your Loyalty Loop loyalty platform. Build POS integrations, mobile apps, or automate your loyalty workflows.
10
Endpoints
4
Resources
4
Webhook Events
v1
Version
Professional or Enterprise Plan Required
API access is available on Professional and Enterprise plans. Upgrade your plan →
Base URL
10
Requests
4
Folders
v2.1
Format
How to import
- 1 Download the collection using the button above
- 2 Open Postman → click Import (top-left)
-
3
Drag the
.jsonfile into the import window - 4 Open the collection → go to the Variables tab
-
5
Set
base_urland yourapi_key - 6 Path variables (customer ID, QR code) are set per-request in the Path Variables tab
Collection Variables
| Variable | Default | Description |
|---|---|---|
| base_url | http://loyaltyloop.in | Change to http://localhost for local dev |
| api_key | ll_YOUR_API_KEY | Your API key from Settings → API Access |
Authentication
All requests require a Bearer token in the Authorization header.
Get Your API Key
- 1 Log in to your account
- 2 Upgrade to Professional or Enterprise (if needed)
- 3 Go to Settings → API Access
- 4 Copy and store your API key securely
Keep Your Key Secret
Never expose your API key in client-side code or commit it to version control.
Rate Limits
Requests are throttled per API key to ensure reliability for all users.
Professional
1,000
requests / hour
Enterprise
Custom
contact us for higher limits
Response Headers
Error Handling
Standard HTTP status codes. All errors return a JSON body.
Error Response Format
Endpoints
Customers
Create, retrieve, and manage loyalty customers
List Customers
/customersRetrieve a paginated list of all customers in your loyalty program.
| Parameter | Type | Description |
|---|---|---|
| page | integer | Page number (default: 1) |
| limit | integer | Results per page (default: 50 · max: 100) |
Get Customer
/customers/{id}Retrieve detailed information about a specific customer including their recent transactions.
Get by QR Code
/customers/qr/{qr_code}Look up a customer by their QR code. Use this when scanning a loyalty card before adding stamps.
QR Scan Flow
Scan the customer's QR code → use the qr_code value here to fetch their loyalty status, then call the stamp endpoint.
| Parameter | Type | Description |
|---|---|---|
| qr_code | string | The customer QR code value (e.g. CUS12AB34CD56) |
Create Customer
/customersCreate a new customer in your loyalty program. Returns the created customer with their unique QR code.
| Field | Type | Required | Description |
|---|---|---|---|
| name | string | Required | Customer's full name |
| phone | string | Required | Customer's phone number |
| string | Optional | Customer's email address |
Add Stamps by ID
/customers/{id}/stampsAdd stamps to a customer by their numeric ID and record a visit.
| Field | Type | Description |
|---|---|---|
| stamps | integer | Number of stamps to add (1–10) |
Add Stamps by QR Code
/customers/qr/{qr_code}/stampsAdd stamps using a QR code — the primary scan-and-stamp flow for POS integrations. When stamps reach the program threshold the reward is issued and current_stamps resets to 0.
Recommended for POS / Scanner Integrations
Prefer this endpoint over /customers/{id}/stamps — QR codes are immediately available after a scan.
| Field | Type | Description |
|---|---|---|
| stamps | integer | Stamps to add (1–10 · default: 1) |
When reward_earned is true, show a reward notification and prompt staff to redeem via /redeem.
Analytics
Aggregated loyalty program performance data
Get Analytics
/analyticsGet an aggregated analytics summary for your loyalty program over a specified period.
| Parameter | Type | Description |
|---|---|---|
| days | integer | Days to analyze (default: 30 · max: 365) |
Webhooks
Subscribe to real-time loyalty events
List Webhooks
/webhooksList all registered webhook endpoints for your business.
Register Webhook
/webhooksRegister a webhook URL to receive real-time event notifications. Returns a secret for signature verification — store it securely, it is shown only once.
| Field | Type | Required | Description |
|---|---|---|---|
| url | string | Required | Your publicly accessible HTTPS endpoint |
| events | array | Required | One or more event names to subscribe to |
Available Events
customer.createdNew customer joinedstamp.addedStamps added to a customerreward.redeemedCustomer redeemed a rewardcustomer.updatedCustomer profile updatedDelete Webhook
/webhooks/{id}Delete a webhook by its ID. The endpoint will immediately stop receiving events.
Code Examples
SDKs & Libraries
Official SDKs are in development. For now, use any HTTP client with the code examples above.
Node.js SDK
npm install @loyaltyloop/sdk
Python SDK
pip install loyaltyloop
PHP SDK
composer require loyaltyloop/sdk
TypeScript SDK
npm install @loyaltyloop/ts-sdk
Built a community SDK? Let us know and we'll feature it here.