HTTP
Operator needs to notify the protocol about users betting activity in order to allocate appropriate cashback.
The following chapter describes sending messages via HTTP protocol.
Events are received in batches, the size of the single batch should not be larger than 1000 events.
Structure below should be used when sending events:
{
"eventId":"769f0af6-adae-41c1-b512-9dfbe3a7c27c",
"resourceId":"MyTheBestGame",
"userId":"977cea0f-c42d-4029-97c3-652496998014",
"amountUsd":751.99,
"multiplier": 1.5,
"extra": "some data"
}Key
Description
Type
Required
eventId
Unique event id. Duplicating events are skipped.
String
Yes
resourceId
Unique name of the gaming resource where the user performed an action.
String
Yes
userId
Anonymised user identification
String
Yes
amountUsd
Sum in USD that the customer had spent
Number
Yes
multiplier
Number
No
extra
Additional information concerning the resourceId
String
No
Complete example:
curl -X POST -H 'content-type:application/json' \
-H 'X-Rewind-Api: AaaAaaAaaAaaAaa' \
-H 'X-Rewind-Signature: f541b6c07f8779616b078ee3272ff5a80f23792404c6d6ea21ab377500012571df7de4d95918ef20d6e6b4397f1f7637899a89dfe63a3994c280e8c267a50214' \
-d '[{"eventId":"769f0af6-adae-41c1-b512-9dfbe3a7c271","resourceId":"MyTheBestGame","userId":"977cea0f-c42d-4029-97c3-652496998011","amountUsd":"751.99"},{"eventId":"769f0af6-adae-41c1-b512-9dfbe3a7c272","resourceId":"MyTheBestGame","userId":"977cea0f-c42d-4029-97c3-652496998014","amountUsd":"1.2"},{"eventId":"769f0af6-adae-41c1-b512-9dfbe3a7c273","resourceId":"MyTheBestGame","userId":"977cea0f-c42d-4029-97c3-652496998015","amountUsd":"200.5"}]' \
https://app.demo.rewindprotocol.com/api/v1/events/add-events-batchLast updated