Send each referred player’s figures for one hour. Most platforms run a job a few minutes after each hour ends and send everything for the hour that just closed.
POST/api/v1/activity
Request
| Field | Type | Description |
|---|---|---|
fromrequired | string (date-time) | Start of the window, ISO 8601 with offset, such as 2026-11-29T10:00:00Z. The rows are stored for the UTC hour containing from. |
torequired | string (date-time) | End of the window, such as 2026-11-29T11:00:00Z. |
itemsrequired | array | One row per player with activity in the hour. Up to 50,000 rows per call; split larger hours into several calls with the same window. |
Each item
| Field | Type | Description |
|---|---|---|
affrequired | string | The player’s aff code, as sent to /players. |
user_idrequired | integer | string | The same player ID as in /players. |
currencyrequired | string | Three-letter code of the amounts, such as EUR. Affinix converts to plan currencies with daily rates. |
casino_bets_sum | number | Casino stakes in the hour. |
casino_wins_sum | number | Casino winnings paid in the hour. |
sport_bets_sum | number | Sports stakes in the hour. |
sport_wins_sum | number | Sports winnings paid in the hour. |
deposits_sum | number | Total deposited. Can be negative to record a chargeback or reversal. |
deposits_count | integer | Number of deposits. |
ftds_count | integer | 1 in the hour of the player’s first deposit, otherwise 0. Triggers the affiliate’s FTD postback. |
ftds_sum | number | Amount of the first deposit. |
withdrawals_sum | number | Total withdrawn. |
withdrawals_count | integer | Number of withdrawals. |
bonuses_sum | number | Bonus cost awarded to the player. Deducted when calculating NGR. |
- Amounts are in major units (12.50, not 1250). Numbers can also be sent as numeric strings.
- Stakes, wins, withdrawals and bonuses are read as positive amounts whatever their sign.
- Missing figures count as 0. Extra fields are accepted and ignored.
Example
curl -X POST https://go.yourbrand.com/api/v1/activity \
-H "affinix-api-key: $AFFINIX_KEY" \
-H "content-type: application/json" \
-d '{
"from": "2026-11-29T10:00:00Z",
"to": "2026-11-29T11:00:00Z",
"items": [
{
"aff": "SEdBN0x2...%3D", "user_id": 88412, "currency": "EUR",
"casino_bets_sum": 1250.00, "casino_wins_sum": 1010.00,
"deposits_sum": 300.00, "deposits_count": 2,
"ftds_count": 1, "ftds_sum": 100.00,
"bonuses_sum": 20.00
}
]
}'Responses
| Field | Type | Description |
|---|---|---|
202 | {"status":"ok","accepted":1,"skipped":0} | Rows stored. skipped counts rows whose aff code could not be read or whose affiliate no longer exists. |
202 | {"status":"ok","duplicate":true} | An identical payload was already received. Nothing changed. |
400 | {"error":"Invalid payload","issues":[...]} | The window or a row is malformed. Nothing was stored. |
401 | {"error":"Unauthorized"} | Missing or wrong API key. |
Corrections and late data
Each player and hour is stored once. Sending the same hour again replaces the earlier figures, so to correct an hour, resend it with the right totals. Corrections for periods already paid are added to the next commission run as adjustments.
If activity arrives for a player you have not sent to /players yet, Affinix still attributes it using the aff code. Sending /players first is better, because it records the real registration time and country.