When to Use Batch
Use batch endpoints when:- Settling multiple bets after a game concludes (e.g., 100 bets on a football match)
- Importing historical data from a legacy system
- Catch-up ingestion after downtime or network issues
- High-frequency scenarios where individual calls would exceed rate limits
Batch endpoints accept up to 500 events per request. For more than 500 events,
split them into multiple batch calls.
Batch Endpoints
Each domain has a batch variant:Batch Request Format
All batch endpoints use the same envelope:Example — Batch Sport Updates
Sending one open and two results (win and lose):Batch Response
Full Success — 202 Accepted
All events were accepted and published to Kafka:
Partial Failure — 207 Multi-Status
Some events failed (e.g., Kafka publish error for specific events):
Validation Failure — 422 Unprocessable Entity
The entire batch is rejected if any event fails struct validation:
Error Handling Pattern
Performance Tips
Deduplication
Atlas deduplicates events using thebet_id / round_id / transaction_id fields within each domain. Sending the same event twice will result in only one being processed.
Deduplication is eventual (within a few seconds). In high-throughput scenarios,
avoid sending the same event in rapid succession as the dedup window may not have closed.