Огляд контракту
Translator note: machine-translated baseline. Needs human review by a native UK speaker. EN source is canonical.
Три категорії flow
1. Event ingestion (ви → casinocrm.io)
Кожна дія гравця стає подією. Використайте SDK або викличте /v1/events напряму:
POST https://ingest.casinocrm.io/v1/events
Authorization: Bearer ucrm_pk_prod_TJxd_<secret>
Content-Type: application/json
{
"event": "deposit_confirmed",
"external_id": "casino_player_001",
"anonymous_id": "anon_xyz",
"timestamp": "2026-05-08T10:00:00Z",
"properties": {
"amount": 5000,
"currency": "EUR",
"transaction_id": "tx_abc",
"payment_method": "card"
}
}
Повертає 202 з ingestion_id. Подія потрапляє до ClickHouse + гравець upsert-иться у Postgres протягом секунд.
Для batch ingestion (рекомендовано для high-volume операторів):
POST https://ingest.casinocrm.io/v1/events/batch
Content-Type: application/json
{
"events": [ ... до 100 подій ... ]
}