Game Sessions

Casino game sessions related endpoints

Get the latest game sessions of a user

get
/api/casino/game_sessions/latest

Returns the latest played game sessions for the given user

The results are sorted by the started date of the session descending. This means that the most recent game session will be at the top of the response.

If the user does not exist or has no sessions played then an empty list is returned.

Example

In this example we get the latest 5 sessions of the user with id 123.

$ curl --request GET \
  --url 'https://api.vaix.ai/api/casino/game_sessions/latest?user=123&count=5'
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
userstringRequired

The user to get game sessions for.

Default: 0
countinteger · min: 1 · max: 100Optional

Number of game sessions to return.

Default: 10
distinction_levelstring · enumOptional

Select whether the game sessions returned should be distinct based on game id. The allowed methods are: daily: If a game has more than one sessions per day, then for each specific day, only one session of this game is returned. none: Returns all game sessions for all games as they are. unique: Returns only one session per game.

Default: dailyPossible values:
minimum_durationintegerOptional

Include game sessions that lasted more than the given value (in seconds). If not set no such filtering will be applied

Default: 60
before_datestring · date-timeOptional

Sessions up to this timestamp will be taken into account

Default: now
after_datestring · date-timeOptional

Sessions after this timestamp will be taken into account

filtersstring · enumOptional

Optional filtering of the games to retrieve. It expects a string adhering to the filtering format, as described in the filtering section, e.g. enabled:eq:1.

Example: enabled:eq:1Possible values:
fieldsstring · enumOptional

Optional selection of the object fields to retrieve. It expects a comma separated list of strings, as described in the field selection section, e.g. game_id,game_name.

Default: game_idPossible values:
operatorstringOptional

The operator to use for querying data. Notice that this is applied only if your account has access to multiple operators. In a different case the assigned operator to your account is used and the value of this field is ignored.

bookmaker_idintegerOptional

The bookmaker id to use for querying data. Notice that this is applied only if your account has access to multiple operators. In a different case the assigned operator to your account is used and the value of this field is ignored. Note that this parameter is used together with the sub_bookmaker_id parameter.

sub_bookmaker_idintegerOptional

The sub-bookmaker id to use for querying data. Notice that this is applied only if your account has access to multiple operators. In a different case the assigned operator to your account is used and the value of this field is ignored. Note that this parameter is used together with the bookmaker_id parameter.

Header parameters
x-vaix-client-idstringRequired

Custom client header, the value should be the name of the group the user belongs to

x-vaix-authentication-methodstringOptional

Authentication method to be used, supported values [vaix, iam]. Defaults to vaix

Responses
200

OK

application/json
get
/api/casino/game_sessions/latest
GET /api/casino/game_sessions/latest?user=0 HTTP/1.1
Host: api.vaix.ai
Authorization: Bearer YOUR_SECRET_TOKEN
x-vaix-client-id: text
Accept: */*
{
  "data": [
    {
      "game_id": "gates_of_olympus_ogs"
    },
    {
      "game_id": "fruit_party_2_ogs"
    }
  ],
  "status": "success"
}

Was this helpful?