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
Property | Type | Description | Required |
---|---|---|---|
sessionId | string | One-time identifier (UUID) generated by OPERATOR for the specific session | Yes |
providerId | string | Identifier of the game provider | Yes |
gameId | string | Identifier of the game | Yes |
language | string | Preferred language for the game. Examples: en, fr | Yes |
playerId | string | Identifier of the player. (/^[a-zA-Z0-9-]+$/) | Yes |
currency | string | Player's ISO 4217 currency code. Examples: EUR, USD | Yes |
deviceType | string | Type of the device used. DESKTOP or MOBILE | Yes |
country | string | Country of the player. 2-letter country code (ISO 3166 alpha-2) Examples: UK, DE, GE | Yes |
ip | string | Player IP | Yes |
brandId | string | Casino Brand Identifier | Yes |
userAgent | string | User Agent | No |
lobbyUrl | string | Casino Lobby Url | No |
cashierUrl | string | Casino Cashier Url | No |
lobbyId | string | Lobby Id | No |
playerName | string | Player Name | No |
JSON Response body:
Property | Description | Required |
---|---|---|
startGameUrl | Link 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
Property | Type | Description | Required |
---|---|---|---|
providerId | string | Identifier of the game provider | Yes |
gameId | string | Identifier of the game | Yes |
language | string | Preferred language for the game. Examples: en, fr | Yes |
deviceType | string | Type of the device used. Examples: DESKTOP, MOBILE | Yes |
ip | string | Player IP | Yes |
brandId | string | Casino Brand Identifier | Yes |
playerId | string | Identifier of the player (/^[a-zA-Z0-9-]+$/) | No |
country | string | Country of the player. 2-letter country code (ISO 3166 alpha-2) Examples: UK, DE, GE | No |
userAgent | string | User Agent | No |
lobbyUrl | string | Casino Lobby Url | No |
cashierUrl | string | Casino Cashier Url | No |
lobbyId | string | Lobby Id | No |
playerName | string | Player Name | No |
JSON Response body:
Property | Description | Required |
---|---|---|
startGameUrl | Link to the game to be open on the VeliGames side. This link will contain parameters that should remain as is. | Yes |
Error Protocol
Error | Status Code | Response from VeliGames to platform |
---|---|---|
UNKNOWN_ERROR | 500 | General error, internal server error |
BAD_REQUEST | 400 | Missing/invalid parameters in start game |
UNAUTHORIZED | 401 | Invalid signature |
GAME_NOT_FOUND | 404 | GameId does not exist |
SESSION_EXISTS | 400 | Session 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"
}