Partner API Documentation
Complete reference for integrating Apple Wallet and Google Wallet notifications
1. Authentication
All API requests must include your API Key in the request header.
X-API-Key: your_api_key_here
How to get your API Key
Log in to the Elune dashboard and go to Settings → API. There you will find your key and can regenerate it if necessary.
2. Company Registration
Register a new company in the system. This is the first step to start using the API.
Create a new company account with the provided details.
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Company name |
email | string | Yes | Contact email |
phone | string | No | Contact phone number |
address | string | No | Physical address |
{
"name": "Mi Empresa SL",
"email": "info@miempresa.com",
"phone": "+34 600 000 000"
}{
"id": "emp_a1b2c3d4",
"api_key": "ek_live_xxxxxxxxxxxxxxxxxxxx",
"created_at": "2025-01-15T10:30:00Z"
}3. Configuration
Update your company's visual settings and notification defaults.
Update company configuration. Partial updates are supported — send only the fields you want to change.
| Field | Type | Required | Description |
|---|---|---|---|
color | string | No | Brand primary colour (hex) |
textColor | string | No | Text colour (hex) |
notificationTitle | string | No | Default notification title |
pointsName | string | No | Custom name for your points (e.g. Stars, Credits) |
rewardsEnabled | boolean | No | Enable / disable the rewards catalogue |
4. Card Models (Referencias)
Card models define the visual template for a set of issued cards. You can have multiple models, each with its own design.
Create a new card model with the given configuration.
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Model display name |
description | string | No | Short description (shown on the card) |
color | string | No | Primary colour override (hex) |
textColor | string | No | Text colour override (hex) |
pointsEnabled | boolean | No | Enable loyalty points for this model |
rewardsEnabled | boolean | No | Enable rewards catalogue for this model |
Return all card models belonging to your company.
Update a specific card model. Partial updates supported.
Delete a card model. Already issued cards are not affected.
5. Issued Cards
Issued cards are the actual digital passes added to Apple Wallet or Google Wallet by end users.
Create a new card for an end user. Returns the pass URL to share or embed in a QR code.
| Field | Type | Required | Description |
|---|---|---|---|
refId | string | Yes | Card model ID |
userName | string | Yes | User full name |
userEmail | string | No | User email address |
userPhone | string | No | User phone number |
customFields | object | No | Key-value object with extra user fields |
{
"cardId": "card_x9y8z7w6",
"passUrl": "https://wallet.eluneconnections.com/pass/card_x9y8z7w6",
"qrCode": "data:image/png;base64,..."
}Get the current status of a specific card.
List all cards issued under your company or a specific model.
Deactivate a card. The user will no longer receive notifications.
6. Notifications
Send push notifications directly to the lock screen of users who have your card.
Send a notification to all cards, or filter by field values.
| Field | Type | Required | Description |
|---|---|---|---|
title | string | Yes | Notification title (max 40 chars) |
body | string | Yes | Notification body (max 120 chars) |
filters | array | No | Array of filter objects to target a subset of cards |
{
"title": "¡Oferta especial!",
"body": "2x1 en cafés hoy hasta las 18h ☕",
"filters": [
{ "field": "city", "operator": "eq", "value": "Barcelona" }
]
}Send a notification to a single card by its ID.
| Field | Type | Required | Description |
|---|---|---|---|
cardId | string | Yes | Target card ID |
title | string | Yes | Notification title (max 40 chars) |
body | string | Yes | Notification body (max 120 chars) |
7. Points & Rewards
Manage loyalty points and a redeemable rewards catalogue.
Add points to one or more cards (bulk or single).
| Field | Type | Required | Description |
|---|---|---|---|
points | number | Yes | Number of points to add or subtract |
concept | string | No | Transaction label shown in the history |
cardId | string | No | Target card ID |
filters | array | No | Array of filter objects to target a subset of cards |
Subtract points from one or more cards.
Get the current points balance for a card.
Get the full transaction history for a card.
Redeem a reward for a card.
| Field | Type | Required | Description |
|---|---|---|---|
cardId | string | Yes | Target card ID |
rewardId | string | Yes | Reward ID to redeem |
List all rewards in your catalogue.
8. Webhooks
Register an HTTPS endpoint to receive real-time events from Elune.
Register a webhook URL for a specific event type.
| Field | Type | Required | Description |
|---|---|---|---|
url | string | Yes | Your HTTPS endpoint URL |
event | string | Yes | Event type to subscribe to |
Available event types
card.added | A new card was added to a wallet |
card.deleted | A card was deleted from a wallet |
points.added | Points were added to a card |
reward.redeemed | A user redeemed a reward |
List all registered webhooks for your company.
Delete a webhook registration.
9. Images
Upload logos and banners for your company or specific card models.
Upload by URL Provide a publicly accessible image URL.
Upload by file Upload the image file directly.
Provide a publicly accessible image URL.
- Model banner
- Company banner
- Default banner
Set a company-level banner as a fallback and override it per card model.
10. Error Handling
All error responses follow a consistent format.
{
"error": "invalid_api_key",
"message": "The provided API key is missing or invalid.",
"statusCode": 401
}| Common HTTP status codes | Description |
|---|---|
200 | Request successful |
201 | Resource created |
202 | Accepted for asynchronous processing |
400 | Invalid request |
401 | Missing or invalid API Key |
403 | Quota exceeded |
404 | Resource not found |
500 | Internal server error |
Quick Reference — All Endpoints
| Method | Path | Auth | Description |
|---|---|---|---|
| POST | /register | None | Register company |
| PUT | /company/config | API Key | Update configuration |
| POST | /images/banner | API Key | Upload banner |
| POST | /images/logo | API Key | Upload logo |
| POST | /refs | API Key | Create card model |
| GET | /refs | API Key | List models |
| PUT | /refs/:refId | API Key | Update model |
| DELETE | /refs/:refId | API Key | Delete model |
| POST | /cards | API Key | Create card |
| GET | /cards/:cardId | API Key | Card status |
| GET | /cards | API Key | List cards |
| DELETE | /cards/:cardId | API Key | Deactivate card |
| POST | /notifications/bulk | API Key | Bulk notification |
| POST | /notifications/single | API Key | Single notification |
| POST | /points/add | API Key | Add points |
| POST | /points/subtract | API Key | Subtract points |
| GET | /points/balance/:id | API Key | Balance |
| GET | /points/history/:id | API Key | History |
| POST | /rewards/redeem | API Key | Redeem |
| GET | /rewards | API Key | Rewards |
| POST | /webhooks | API Key | Register company |
| GET | /webhooks | API Key | List models |
| DELETE | /webhooks/:id | API Key | Delete model |