/ping
sk_live_...) s'utilisent exclusivement côté serveur (cURL, Node.js, Ruby, Python) et sont bloquées si un en-tête navigateur Origin est présent.
/bot_challenge
Retourne un challenge signé (`algorithm`, `challenge`, `maxnumber`, `salt`, `signature`) lorsque `ALTCHA_API_ENABLED` (ou `ALTCHA_ENABLED`) est activé. Le jeton Base64 résolu doit être transmis dans `X-Captcha-Token` ou `X-Altcha-Payload`.
/merchants
Requiert le scope `merchants:read` ou `merchants:write`. Respecte l'éventuelle restriction par commerces configurée sur la clé.
| Paramètre | In | Requis | Description |
|---|---|---|---|
| page | query | non | |
| per_page | query | non | |
| active | query | non | |
| sandbox | query | non |
/merchants
| Paramètre | In | Requis | Description |
|---|---|---|---|
| IdempotencyKey | header | oui |
/merchants/{merchant_uuid}
| Paramètre | In | Requis | Description |
|---|---|---|---|
| MerchantUuid | path | oui |
/merchants/{merchant_uuid}/handoff_tokens
Requiert le scope `merchants:write` (clé secrète uniquement).
| Paramètre | In | Requis | Description |
|---|---|---|---|
| MerchantUuid | path | oui |
/merchants/{merchant_uuid}/customers
Requiert `customers:read` (ou `customers:write` / `transactions:write`). Exclut les fiches anonymisées par défaut.
| Paramètre | In | Requis | Description |
|---|---|---|---|
| MerchantUuid | path | oui | |
| page | query | non | |
| per_page | query | non | |
| q | query | non | |
| inactive_days | query | non | |
| min_points | query | non | |
| min_stamps | query | non | |
| birthday_month | query | non | |
| opt_in_sms | query | non | |
| opt_in_email | query | non | |
| include_anonymized | query | non |
/merchants/{merchant_uuid}/customers
| Paramètre | In | Requis | Description |
|---|---|---|---|
| MerchantUuid | path | oui | |
| IdempotencyKey | header | oui |
/merchants/{merchant_uuid}/customers/lookup
| Paramètre | In | Requis | Description |
|---|---|---|---|
| MerchantUuid | path | oui |
/merchants/{merchant_uuid}/customers/{customer_uuid}
| Paramètre | In | Requis | Description |
|---|---|---|---|
| MerchantUuid | path | oui | |
| CustomerUuid | path | oui |
/merchants/{merchant_uuid}/customers/{customer_uuid}/transactions
Requiert `transactions:write` et l'en-tête obligatoire `Idempotency-Key`. Opérations supportées : `earn`, `debit_loyalty`, `redeem_reward`, `gift_card_credit`, `gift_card_debit`, `prepaid_credit`, `prepaid_debit`.
| Paramètre | In | Requis | Description |
|---|---|---|---|
| MerchantUuid | path | oui | |
| CustomerUuid | path | oui | |
| IdempotencyKey | header | oui |
/merchants/{merchant_uuid}/transactions
| Paramètre | In | Requis | Description |
|---|---|---|---|
| MerchantUuid | path | oui |
/merchants/{merchant_uuid}/transactions
| Paramètre | In | Requis | Description |
|---|---|---|---|
| MerchantUuid | path | oui | |
| IdempotencyKey | header | oui |
/merchants/{merchant_uuid}/transactions/{id}/refund
| Paramètre | In | Requis | Description |
|---|---|---|---|
| MerchantUuid | path | oui | |
| id | path | oui | |
| IdempotencyKey | header | oui |
/merchants/{merchant_uuid}/campaigns
| Paramètre | In | Requis | Description |
|---|---|---|---|
| MerchantUuid | path | oui | |
| status | query | non | |
| include_scheduled | query | non |
/merchants/{merchant_uuid}/campaigns
Requiert le scope `campaigns:draft` et `Idempotency-Key`. **Tout envoi direct est interdit** : la campagne est créée exclusivement au statut `pending_approval`, calcule l'audience opt-in exacte et le coût estimé en crédits, et notifie l'administrateur pour validation humaine.
| Paramètre | In | Requis | Description |
|---|---|---|---|
| MerchantUuid | path | oui | |
| IdempotencyKey | header | oui |
/merchants/{merchant_uuid}/campaigns/{uuid}
| Paramètre | In | Requis | Description |
|---|---|---|---|
| MerchantUuid | path | oui | |
| CampaignUuid | path | oui |
/merchants/{merchant_uuid}/campaigns/{uuid}/approve
Requiert le scope `campaigns:approve` (jamais activé par défaut) et `Idempotency-Key`. Applique la règle des 4 yeux : une clé API ne peut jamais approuver un brouillon qu'elle a elle-même créé (`403 self_approval_forbidden`).
| Paramètre | In | Requis | Description |
|---|---|---|---|
| MerchantUuid | path | oui | |
| CampaignUuid | path | oui | |
| IdempotencyKey | header | oui |
/merchants/{merchant_uuid}/campaigns/{uuid}/reject
| Paramètre | In | Requis | Description |
|---|---|---|---|
| MerchantUuid | path | oui | |
| CampaignUuid | path | oui | |
| IdempotencyKey | header | oui |
/webhooks
/webhooks
| Paramètre | In | Requis | Description |
|---|---|---|---|
| IdempotencyKey | header | oui |
/webhooks/{uuid}
| Paramètre | In | Requis | Description |
|---|---|---|---|
| WebhookUuid | path | oui |
/webhooks/{uuid}
| Paramètre | In | Requis | Description |
|---|---|---|---|
| WebhookUuid | path | oui |
/webhooks/{uuid}/ping
| Paramètre | In | Requis | Description |
|---|---|---|---|
| WebhookUuid | path | oui |
/webhooks/{uuid}/deliveries
| Paramètre | In | Requis | Description |
|---|---|---|---|
| WebhookUuid | path | oui |
/catalog/themes
/onboarding/drafts
/onboarding/drafts/{token}
| Paramètre | In | Requis | Description |
|---|---|---|---|
| token | path | oui |
/onboarding/drafts/{token}
| Paramètre | In | Requis | Description |
|---|---|---|---|
| token | path | oui |
/onboarding/email_verifications
/onboarding/email_verifications/verify
Webhooks Sortants (X-Mellio-Signature)
card.installed
Carte ajoutée dans Apple Wallet ou Google Wallet
card.uninstalled
Carte supprimée d'Apple Wallet
loyalty.transaction_created
Transaction fidélité enregistrée (caisse ou API)
reward.unlocked
Palier de récompense débloqué par le client
reward.redeemed
Récompense consommée en caisse ou via API
campaign.pending_approval
Nouvelle campagne préparée par API en attente de validation humaine
campaign.approved
Campagne validée par un responsable
campaign.rejected
Campagne rejetée
campaign.sent
Campagne envoyée avec métriques finales
campaign.failed
Échec d'envoi d'une campagne approuvée
customer.created
Nouveau porteur de carte inscrit
customer.unsubscribed
Client désabonné d'un canal marketing (SMS, Email, WhatsApp)
customer.anonymized
Client anonymisé RGPD (payload strictement sans PII)
webhook.ping
Événement de test déclenché manuellement depuis le portail ou l'API Webhooks
Schémas de données
ErrorResponse
{
"type": "object",
"required": [
"error"
],
"properties": {
"error": {
"type": "object",
"required": [
"code",
"message"
],
"properties": {
"code": {
"type": "string",
"example": "insufficient_scope"
},
"message": {
"type": "string",
"example": "This API key does not have the required scope."
}
}
}
}
}
Pagination
{
"type": "object",
"properties": {
"page": {
"type": "integer",
"example": 1
},
"per_page": {
"type": "integer",
"example": 50
},
"total_count": {
"type": "integer",
"example": 128
},
"total_pages": {
"type": "integer",
"example": 3
}
}
}
MerchantSummary
{
"type": "object",
"properties": {
"uuid": {
"type": "string",
"format": "uuid"
},
"name": {
"type": "string"
},
"active": {
"type": "boolean"
},
"sandbox": {
"type": "boolean"
},
"currency": {
"type": "string",
"example": "EUR"
},
"country_code": {
"type": "string",
"example": "FR"
},
"locale": {
"type": "string",
"example": "fr"
},
"loyalty_mode": {
"type": "string",
"enum": [
"points",
"tampons"
]
},
"active_card_types": {
"type": "array",
"items": {
"type": "string"
}
},
"stats": {
"type": "object",
"properties": {
"customers_count": {
"type": "integer"
},
"active_cards_count": {
"type": "integer"
},
"wallet_installed_count": {
"type": "integer"
},
"transactions_total_count": {
"type": "integer"
},
"visits_last_30_days_count": {
"type": "integer"
}
}
},
"credits": {
"type": "object",
"properties": {
"sms_balance_micros": {
"type": "integer",
"format": "int64",
"description": "1 EUR = 1_000_000 micros"
},
"sms_balance_eur": {
"type": "number"
},
"sms_unlimited": {
"type": "boolean"
},
"email_credits": {
"type": "integer"
},
"email_unlimited": {
"type": "boolean"
},
"currency": {
"type": "string"
}
}
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
CustomerPayload
{
"type": "object",
"properties": {
"uuid": {
"type": "string",
"format": "uuid"
},
"name": {
"type": [
"string",
"null"
]
},
"first_name": {
"type": [
"string",
"null"
]
},
"last_name": {
"type": [
"string",
"null"
]
},
"phone": {
"type": [
"string",
"null"
]
},
"email": {
"type": [
"string",
"null"
]
},
"birthdate": {
"type": [
"string",
"null"
],
"format": "date"
},
"rgpd_marketing_opt_in": {
"type": "boolean"
},
"gdpr": {
"type": "object",
"properties": {
"consent": {
"type": "boolean"
},
"consented_at": {
"type": [
"string",
"null"
],
"format": "date-time"
},
"marketing_opt_in": {
"type": "boolean"
},
"sms_opt_in": {
"type": "boolean"
},
"email_opt_in": {
"type": "boolean"
},
"whatsapp_opt_in": {
"type": "boolean"
},
"geoloc_opt_in": {
"type": "boolean"
},
"anonymized": {
"type": "boolean"
}
}
},
"pass": {
"type": "object",
"properties": {
"serial_number": {
"type": "string"
},
"status": {
"type": "string",
"enum": [
"actif",
"recompense_prete"
]
},
"reward_ready": {
"type": "boolean"
},
"loyalty_mode": {
"type": "string",
"enum": [
"points",
"tampons"
]
},
"points_balance": {
"type": "integer"
},
"stamps_balance": {
"type": "integer"
},
"gift_card_balance_cents": {
"type": "integer"
},
"prepaid_balance_cents": {
"type": "integer"
},
"currency": {
"type": "string"
}
}
},
"last_activity_at": {
"type": [
"string",
"null"
],
"format": "date-time"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
CampaignPayload
{
"type": "object",
"properties": {
"uuid": {
"type": "string",
"format": "uuid"
},
"id": {
"type": "integer"
},
"merchant_uuid": {
"type": "string",
"format": "uuid"
},
"status": {
"type": "string",
"enum": [
"pending_approval",
"rejected",
"expired",
"queued",
"processing",
"completed",
"failed",
"skipped"
]
},
"source": {
"type": "string"
},
"kind": {
"type": "string",
"enum": [
"message",
"offer"
]
},
"title": {
"type": [
"string",
"null"
]
},
"content": {
"type": "string"
},
"channels": {
"type": "array",
"items": {
"type": "string",
"enum": [
"push",
"sms",
"email",
"whatsapp"
]
}
},
"audience": {
"type": "object",
"properties": {
"total_matched": {
"type": "integer"
},
"eligible_by_channel": {
"type": "object",
"properties": {
"push": {
"type": "integer"
},
"sms": {
"type": "integer"
},
"email": {
"type": "integer"
},
"whatsapp": {
"type": "integer"
}
}
},
"push_capped": {
"type": "integer"
}
}
},
"cost_estimate": {
"type": "object",
"properties": {
"sms_estimated_micros": {
"type": "integer",
"format": "int64"
},
"sms_estimated_eur": {
"type": "number"
},
"sms_segments_per_recipient": {
"type": "integer"
},
"email_credits_required": {
"type": "integer"
},
"sufficient_credits": {
"type": "boolean"
},
"currency": {
"type": "string"
}
}
},
"approval": {
"type": "object",
"properties": {
"required": {
"type": "boolean"
},
"review_url": {
"type": [
"string",
"null"
],
"format": "uri"
},
"approval_expires_at": {
"type": [
"string",
"null"
],
"format": "date-time"
},
"approved_by_type": {
"type": [
"string",
"null"
]
},
"approved_by_label": {
"type": [
"string",
"null"
]
},
"approved_at": {
"type": [
"string",
"null"
],
"format": "date-time"
},
"rejected_at": {
"type": [
"string",
"null"
],
"format": "date-time"
},
"rejection_reason": {
"type": [
"string",
"null"
]
}
}
},
"warnings": {
"type": "array",
"items": {
"type": "string"
}
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
WebhookEndpointPayload
{
"type": "object",
"properties": {
"uuid": {
"type": "string",
"format": "uuid"
},
"name": {
"type": [
"string",
"null"
]
},
"url": {
"type": "string",
"format": "uri"
},
"active": {
"type": "boolean"
},
"subscribed_events": {
"type": "array",
"items": {
"type": "string"
}
},
"consecutive_failures_count": {
"type": "integer"
},
"disabled_at": {
"type": [
"string",
"null"
],
"format": "date-time"
},
"disabled_reason": {
"type": [
"string",
"null"
]
},
"last_success_at": {
"type": [
"string",
"null"
],
"format": "date-time"
},
"last_failure_at": {
"type": [
"string",
"null"
],
"format": "date-time"
}
}
}