POST /events

Event ingestion

Send a batch of 1 to 100 customer events. Each event_id is an idempotency key — duplicates are ignored without error.

POSThttps://zedchurn.fr/api/v1/eventsEssential

Send a batch of 1 to 100 customer events. Each event_id is an idempotency key — duplicates are ignored without error.

Auth — X-API-Key
Category — Events

Request body

NomTypeRequisDescription
eventsarray✓Liste des événements (min 1, max 100)
event_idstring✓ID unique côté client (idempotence)
customer_idstring✓Identifiant client dans votre système
event_typestring✓Type d'événement (voir Types d'événements)
occurred_atdatetime✓Date ISO8601 UTC de l'événement
valuenumber—Montant monétaire (≥ 0)
dataobject—Métadonnées libres (max 64 Ko)

Headers

NomTypeRequisDescription
X-API-Keystring✓Clé API du tenant
Content-Typestring✓application/json

Examples

Request body

1{
2 "events": [{
3 "event_id": "evt_20260515_abc123",
4 "customer_id": "cust_789",
5 "event_type": "order_completed",
6 "occurred_at": "2026-05-15T10:30:00Z",
7 "value": 149.99,
8 "data": { "order_id": "ORD-001", "items_count": 3 }
9 }]
10}
curl -X POST 'https://zedchurn.fr/api/v1/events' \
  -H 'X-API-Key: api_zedcheckout_votre_cle_api' \
  -H 'Content-Type: application/json' \
  -d '{  "events": [{    "event_id": "evt_20260515_abc123",    "customer_id": "cust_789",    "event_type": "order_completed",    "occurred_at": "2026-05-15T10:30:00Z",    "value": 149.99,    "data": { "order_id": "ORD-001", "items_count": 3 }  }]}'

Responses

202Accepted

Tous les événements ont été acceptés.

{
  "accepted": 1,
  "rejected": 0,
  "duplicates": 0,
  "results": [{ "event_id": "evt_20260515_abc123", "status": "accepted" }]
}
207Multi-Status

Résultat mixte dans le batch.

{
  "accepted": 1,
  "rejected": 1,
  "duplicates": 0,
  "results": [
    { "event_id": "evt_ok", "status": "accepted" },
    { "event_id": "evt_bad", "status": "rejected", "error": "Invalid event type" }
  ]
}

Errors

  • 400validation_errorevent_type invalide ou batch vide
  • 401unauthorizedClé API manquante ou invalide
  • 429rate_limitedQuota dépassé

See all error codes →