Skip to main content

Game API

Overview

  • Requests and responses contain the header Content-Type: application/json
  • Requests are made via the HTTP POST method
  • All requests passed from/to the Operator's system have a signature header.
  • Request Direction: Operator => Veligames

Methods

Start game

Using this method Operator can receive a valid launch URL to a requested game.

POST /start-game
PropertyTypeDescriptionRequired
sessionIdstringOne-time identifier (UUID) generated by OPERATOR for the specific sessionYes
providerIdstringIdentifier of the game providerYes
gameIdstringIdentifier of the gameYes
languagestringPreferred language for the game. Examples: en, frYes
playerIdstringIdentifier of the player. (/^[a-zA-Z0-9-]+$/)Yes
currencystringPlayer's ISO 4217 currency code. Examples: EUR, USDYes
deviceTypestringType of the device used. DESKTOP or MOBILEYes
countrystringCountry of the player. 2-letter country code (ISO 3166 alpha-2) Examples: UK, DE, GEYes
ipstringPlayer IPYes
brandIdstringCasino Brand IdentifierYes
userAgentstringUser AgentNo
lobbyUrlstringCasino Lobby UrlNo
cashierUrlstringCasino Cashier UrlNo
lobbyIdstringLobby IdNo
playerNamestringPlayer NameNo

JSON Response body:

PropertyDescriptionRequired
startGameUrlLink to the game to be open on the VeliGames side. This link will contain parameters that should remain as is.Yes

Start demo game

Using this method Operator can receive a valid DEMO launch URL to a requested game

POST /start-demo-game
PropertyTypeDescriptionRequired
providerIdstringIdentifier of the game providerYes
gameIdstringIdentifier of the gameYes
languagestringPreferred language for the game. Examples: en, frYes
deviceTypestringType of the device used. Examples: DESKTOP, MOBILEYes
ipstringPlayer IPYes
brandIdstringCasino Brand IdentifierYes
playerIdstringIdentifier of the player (/^[a-zA-Z0-9-]+$/)No
countrystringCountry of the player. 2-letter country code (ISO 3166 alpha-2) Examples: UK, DE, GENo
userAgentstringUser AgentNo
lobbyUrlstringCasino Lobby UrlNo
cashierUrlstringCasino Cashier UrlNo
lobbyIdstringLobby IdNo
playerNamestringPlayer NameNo

JSON Response body:

PropertyDescriptionRequired
startGameUrlLink to the game to be open on the VeliGames side. This link will contain parameters that should remain as is.Yes

Error Protocol

ErrorStatus CodeResponse from VeliGames to platform
UNKNOWN_ERROR500General error, internal server error
BAD_REQUEST400Missing/invalid parameters in start game
UNAUTHORIZED401Invalid signature
GAME_NOT_FOUND404GameId does not exist
SESSION_EXISTS400Session already exists

Request example

curl -X 'POST' \
'https://stage-api.velitech.games/unified-api/public/start-game' \
-H 'signature: someOperatorId:G6pRpaYWMMpoIepMuarLiO4NId0kI6b3ShoJxXbczydcaqy2OwO3TLtYRTHGDYPbEJwIDaVH4eYvuUNXpyi2PA==' \
-H 'Content-Type: application/json' \
-d '{
"providerId": "acceptance-tests",
"gameId": "e2e",
"language": "en",
"playerId": "PLAYER-112312fa1243",
"currency": "XAF",
"deviceType": "MOBILE",
"country": "GE",
"brandId": "brandId",
"sessionId": "6c210f45-0cae-4dc9-a9ab-8fe48f4406ba",
"ip": "188.160.1.239"
}'

Success

{
"startGameUrl": "string"
}

Error

{
"error": "GAME_NOT_FOUND"
}