Partner API Documentation
Complete reference for integrating Apple Wallet and Google Wallet notifications
Authentication
All requests go to https://api.eluneconnections.com and carry your API key in the X-API-Key header (except POST /api/partner/register).
X-API-Key: tu_api_key Content-Type: application/json
Points and rewards
Add and subtract customer points from your system (online store, POS, CRM). The customer’s card updates on their phone automatically.
Adds points to a customer.
| Field | Type | Required | Description |
|---|---|---|---|
referenceId |
string | Yes | Your card ID in Elune (we give it to you with the API key). referenciaId also works. |
findBy |
object | Yes* | Finds the customer by a form field: { "field": "email", "value": "ana@example.com" }. |
serialNumber |
string | Yes* | Alternative to findBy: the serial number of the customer’s card. |
amount |
integer | Yes | Points (greater than 0). |
concept |
string | No | Movement text. If sent, the customer gets a phone notification ("+10 pts: Order #1001"); if not, it is added silently. |
externalReference |
string | No | Your operation ID (e.g. the order number), up to 100 characters. The same reference on the same card is applied only once: resending it returns 200 without repeating it. Highly recommended. |
* Send findBy or serialNumber. With findBy the value is matched as is and, for phone fields, with or without the country prefix.
{
"referenceId": "TU_REFERENCE_ID",
"findBy": { "field": "email", "value": "ana@example.com" },
"amount": 25,
"concept": "Pedido #1001",
"externalReference": "order-1001"
}{
"success": true,
"message": "Points added successfully",
"previousBalance": 100,
"balance": 125,
"transaction": { "id": 8812, "amount": 25, "type": "EARN", "externalReference": "order-1001", ... }
}Subtracts points (refunds, adjustments). Returns 400 if the balance is not enough.
| Field | Type | Required | Description |
|---|---|---|---|
referenceId |
string | Yes | Your card ID in Elune (we give it to you with the API key). referenciaId also works. |
findBy |
object | Yes* | Finds the customer by a form field: { "field": "email", "value": "ana@example.com" }. |
serialNumber |
string | Yes* | Alternative to findBy: the serial number of the customer’s card. |
amount |
integer | Yes | Points (greater than 0). |
concept |
string | No | Movement text. If sent, the customer gets a phone notification ("+10 pts: Order #1001"); if not, it is added silently. |
externalReference |
string | No | Your operation ID (e.g. the order number), up to 100 characters. The same reference on the same card is applied only once: resending it returns 200 without repeating it. Highly recommended. |
* Send findBy or serialNumber. With findBy the value is matched as is and, for phone fields, with or without the country prefix.
{
"referenceId": "TU_REFERENCE_ID",
"findBy": { "field": "email", "value": "ana@example.com" },
"amount": 25,
"externalReference": "refund-1001"
}A customer’s balance. Params: referenciaId + field + value, or serialNumber.
GET /api/points/balance?referenciaId=TU_REFERENCE_ID&field=email&value=ana@example.com
{ "balance": 125, "serialNumber": "a1b2c3d4-0000-4000-8000-000000000000" }A customer’s movements, newest first. Same params as /balance plus limit (default 20, max 100).
{ "balance": 125, "serialNumber": "a1b2c3d4-...", "transactions": [ { "amount": 25, "type": "EARN", "concept": "Pedido #1001", "externalReference": "order-1001", "createdAt": "..." } ] }Active rewards of the card, cheapest first.
[ { "id": 12, "name": "Café gratis", "pointsCost": 100, "stock": null, "maxPerCustomer": null, ... } ]Redeems a reward: subtracts the points and leaves it pending delivery in the dashboard.
| Field | Type | Required | Description |
|---|---|---|---|
referenceId |
string | Yes | Your card ID in Elune (we give it to you with the API key). referenciaId also works. |
findBy |
object | Yes* | Finds the customer by a form field: { "field": "email", "value": "ana@example.com" }. |
serialNumber |
string | Yes* | Alternative to findBy: the serial number of the customer’s card. |
rewardId |
integer | Yes | Reward ID (from GET /api/points/rewards). |
* Send findBy or serialNumber. With findBy the value is matched as is and, for phone fields, with or without the country prefix.
Online stores (Shopify, WooCommerce…)
Connect your store with a webhook or automation (Shopify Flow, Make, Zapier or your own server):
- Order paid (Shopify: orders/paid) → POST /api/points/add with findBy email = the order email, amount = the points earned and externalReference = "order-" + order id.
- Refund (refunds/create) → POST /api/points/subtract with externalReference = "refund-" + refund id.
- If Shopify resends the same event, nothing happens: with the same externalReference it is never added or subtracted twice.
- A 404 "Card not found" means that customer has no card yet (the email matches none).
curl -X POST https://api.eluneconnections.com/api/points/add \
-H "X-API-Key: $ELUNE_API_KEY" -H "Content-Type: application/json" \
-d '{"referenceId":"TU_REFERENCE_ID","findBy":{"field":"email","value":"ana@example.com"},"amount":25,"concept":"Pedido #1001","externalReference":"order-1001"}'Issued cards
Create the card for a user of your system (externalId) and give them the link to save it in Apple or Google Wallet. {id} accepts the externalId or the serialNumber.
Creates the card (if it already exists for that externalId, returns it with status EXISTING).
{ "externalId": "user-42", "referenceId": "opcional" }{ "serialNumber": "…", "externalId": "user-42", "downloadUrl": "https://api.eluneconnections.com/api/notification-card/i/{referenceId}/{serialNumber}", "status": "CREATED" }Paginated list. Params: status (ACTIVE, CREATED, DISABLED), referenceId, page, size (max 200).
Status of one card (ACTIVE when installed).
Disables the card and removes it from phones.
Notifications
Send notifications to installed cards. They count towards your plan usage.
Send to several cards (1 to 1000). Returns 202 and calls your webhook with notification.completed when done.
{ "message": "Hoy 2x1 en cafés", "title": "Mi tienda", "url": "https://…", "recipients": ["user-42", "user-43"] }{ "success": true, "notificationId": 991, "status": "SENDING", "accepted": 2 }Send to one card. Body: message, title, url.
Card models and settings
For platforms managing card design through the API.
Creates a company and returns its apiKey (only this once). Fields: companyName and email (required), logoUrl, colorCode, textColor, webhookUrl, cardLanguage…
Changes name, colors, logo, banner, webhookUrl and language. Only what you send changes.
Uploads the logo (multipart, field logo).
Uploads the banner (multipart, field banner).
Creates a notification card model (name required).
Lists your notification card models.
Updates a model (name, cardLanguage, pointsEnabled, logoUrl, bannerUrl…).
Deletes a model (not the last one).
Webhooks
If you set webhookUrl (at registration or with PUT /api/partner/config), Elune sends you a JSON POST { "event", "data", "timestamp" }:
- card.installed: a user saves a card created with POST /api/partner/cards. data: serialNumber, externalId, platform, installedAt.
- card.uninstalled: removed from an iPhone (Android does not report it).
- notification.completed: a /api/partner/notify send finished. data: notificationId, summary { total, sent, failed }, results.
Errors
/api/partner routes return { "error": "…" }. /api/points routes return { "success": false, "message": "…" }.
200 / 201 / 202 | OK (202: processed in the background). |
400 | Invalid request (missing field, insufficient balance…). |
401 | Missing or invalid API key. |
403 | The card or reference is not yours, or you exceeded your plan limit. |
404 | Not found (e.g. the customer has no card). |
500 | Our error: retry and, if it persists, contact us. |
Quick Reference — All Endpoints
| Method | Path | Description |
|---|---|---|
| POST | /api/points/add | Adds points to a customer. |
| POST | /api/points/subtract | Subtracts points (refunds, adjustments). Returns 400 if the balance is not enough. |
| GET | /api/points/balance | A customer’s balance. Params: referenciaId + field + value, or serialNumber. |
| GET | /api/points/history | A customer’s movements, newest first. Same params as /balance plus limit (default 20, max 100). |
| GET | /api/points/rewards/{referenceId} | Active rewards of the card, cheapest first. |
| POST | /api/points/redeem | Redeems a reward: subtracts the points and leaves it pending delivery in the dashboard. |
| POST | /api/partner/cards | Creates the card (if it already exists for that externalId, returns it with status EXISTING). |
| GET | /api/partner/cards | Paginated list. Params: status (ACTIVE, CREATED, DISABLED), referenceId, page, size (max 200). |
| GET | /api/partner/cards/{id} | Status of one card (ACTIVE when installed). |
| DELETE | /api/partner/cards/{id} | Disables the card and removes it from phones. |
| POST | /api/partner/notify | Send to several cards (1 to 1000). Returns 202 and calls your webhook with notification.completed when done. |
| POST | /api/partner/cards/{id}/notify | Send to one card. Body: message, title, url. |
| POST | /api/partner/register | Creates a company and returns its apiKey (only this once). Fields: companyName and email (required), logoUrl, colorCode, textColor, webhookUrl, cardLanguage… |
| PUT | /api/partner/config | Changes name, colors, logo, banner, webhookUrl and language. Only what you send changes. |
| PUT | /api/partner/config/logo | Uploads the logo (multipart, field logo). |
| PUT | /api/partner/config/banner | Uploads the banner (multipart, field banner). |
| POST | /api/partner/references | Creates a notification card model (name required). |
| GET | /api/partner/references | Lists your notification card models. |
| PUT | /api/partner/references/{id} | Updates a model (name, cardLanguage, pointsEnabled, logoUrl, bannerUrl…). |
| DELETE | /api/partner/references/{id} | Deletes a model (not the last one). |