Aggregator Game Backup API (1.0.0)

Download OpenAPI specification:

Partner integration reference for the Aggregator Game Backup service.

Resolve an unavailable game to a curated replacement with GET /games/resolve, push your players' activity to POST /player-events, and manage per-player flags such as VIP. All requests and responses are JSON over HTTPS.

Base URL

Environment Base URL
Production https://backup.gambleaggregator.dev

Authentication

Authenticate with a JWT bearer token on every request:

Authorization: Bearer <your-jwt>

The token is ownership-scoped: it only grants access to the partner_id and players the token holder owns. Acting on behalf of a partner_id you do not own returns 403.

Route Owner checked against
GET /games/resolve partner_id query parameter
POST /player-events partner_id in the JSON body
PUT /users/{id}/player/{player_id}/vip id path parameter

Identity model

Every player is addressed by a pair:

  • partner_id (a.k.a. id on the VIP route) — the user ID from aggregator-api, also used as user_id on similarity administration routes.
  • player_login (a.k.a. player_id on the VIP route) — the player within that partner.

Use the same pair consistently. Your JWT must own the partner_id you send.

Game resolve

Resolve using only the enabled similarities configured for your aggregator user. Defaults always choose the highest-scoring available mapping, with 100% session exposure and zero history, margin and jitter contributions. VIP, bonus/tournament and cooldown restrictions are off by default. No enabled mappings returns 200 with the original game; when candidates exist but none is available for your currency, the response is 404.

Resolve a game to its best available replacement

Returns the game to show instead of the requested one. The replacement is taken only from the curated similar-games list for partner_id, which is the user ID from aggregator-api. Defaults choose the highest similarity score on every session; ties use creation time then ID. Availability in the requested currency is checked in score order, up to five candidates. No enabled mappings echoes game_id; exhausted availability checks return 404. Operators may explicitly enable mixing restrictions or nonzero ranking weights; restrictions may echo the original.

Your JWT must own partner_id. This parameter keeps its existing name.

Authorizations:
BearerAuth
query Parameters
game_id
required
string
Example: game_id=book_of_dead

The unavailable game you want a replacement for.

partner_id
required
string
Example: partner_id=casino_alpha

User ID from aggregator-api. Must be owned by your token.

player_login
required
string
Example: player_login=player42

Player login within the partner.

currency
required
string
Example: currency=EUR

Player wallet currency, used to verify the replacement is available.

session_id
string
Example: session_id=sess_abc

Player session. Optional — when omitted, the service derives a deterministic id (prefixed gen_) from the request identity, so retries of the same request get the same decision. Pass your real session id whenever you have one: it ties the resolve to session counters and bonus / tournament state.

Responses

Response samples

Content type
application/json
Example
{
  • "resolved_game_id": "legacy_of_dead"
}

Player events

Push player activity. One endpoint, many event_type values.

Event catalog

partner_id, player_login and event_type are always required. Other fields are required only for specific types:

event_type Extra required fields
game_open game_id
game_close game_id
bet amount (≥ 0)
win amount (≥ 0)
deposit amount (≥ 0)
bonus_started session_id
bonus_finished session_id
tournament_started session_id
tournament_finished session_id
big_win —
complaint —
session_start session_id
session_end session_id

A missing required field returns 400. The same event is safe to resend.

Ingest a player event

Records a player event. The event_type selects how the service reacts — see the Event catalog on the Player events tag for the required fields per type.

Your JWT must own the partner_id in the body.

Authorizations:
BearerAuth
Request Body schema: application/json
required
partner_id
required
string

Partner / casino identity. Required. Must be owned by your token.

player_login
required
string

Player within the partner. Required.

event_type
required
string (EventType)
Enum: "game_open" "game_close" "bet" "win" "deposit" "bonus_started" "bonus_finished" "tournament_started" "tournament_finished" "big_win" "complaint" "session_start" "session_end"

Selects how the service reacts. See the Event catalog.

session_id
string

Player session. Required for bonus_*, tournament_*, session_start, session_end.

game_id
string

Required for game_open and game_close.

amount
number <double> >= 0

Required (≥ 0) for bet, win, deposit.

currency
string

Optional ISO currency code.

object

Optional free-form JSON.

Responses

Request samples

Content type
application/json
Example
{
  • "partner_id": "casino_alpha",
  • "player_login": "player42",
  • "session_id": "sess_abc",
  • "event_type": "bet",
  • "amount": 5,
  • "currency": "EUR"
}

Response samples

Content type
application/json
{
  • "status": "ok"
}

Player flags

Per-player flags a client may set on its own players.

Set VIP status for a player

Flag (or un-flag) one of your players as VIP.

Your JWT must own id.

Authorizations:
BearerAuth
path Parameters
id
required
string
Example: casino_alpha

User ID from aggregator-api. Must be owned by your token.

player_id
required
string
Example: player42

Player login within the partner.

Request Body schema: application/json
required
is_vip
required
boolean

Responses

Request samples

Content type
application/json
{
  • "is_vip": true
}

Response samples

Content type
application/json
{
  • "status": "ok"
}