Skip to content

Calls provided by API V2

Introduction

API V2 supports simple operations like gamestart / win / end but offers more complex endpoints for wagering wins and keeping track of game spin events like winning free spins in a game round and ensuring that it is not possible that more spins then awarded are consumed.

In addition an interface to access the hizi.io certified RNG is available.

Calls are available for usage by game front ends to start the communication to the hizi.io and for usage by game engine / 3rd party RGS.

Details of the calls are summarised in the subsequent tables, while more details and structure of the calls can be found below.

Frontend Calls (GET)

EndpointMethodRequiredDescription
/statusGETOptionalCheck API status
/connectGETMandatoryEstablish connection, get long-live token
/reconnectGETOptionalRe-establish connection using long-live token
/disconnectGETOptionalSignal game close/leave to operator

Game Engine / RGS Calls (POST)

EndpointMethodRequiredDescription
/testPingPOSTOptionalTest communication and payload signature
/startGameRoundPOSTMandatoryStart round, debit bet, optionally credit win + close
/endGameRoundPOSTMandatoryClose a gameround
/getGameRoundInfoPOSTOptionalGet info about an open gameround
/getGameRoundHistoryInfoPOSTOptionalGet historical info about a closed gameround
/voidGameRoundPOSTOptionalVoid a debit for an open gameround
/collectWinPOSTOptionalCollect part/all open winnings
/addWinPOSTMandatoryAdd win to gameround
/wagerWinPOSTOptionalWager part/all of open winnings
/getUncollectedAmountPOSTOptionalGet amount of uncollected winnings
/addSpinCounterGameStatePOSTOptionalTrack spin events (e.g. free spins)
/getAvailableSpinCounterPOSTOptionalGet available spin counter
/getTokenForGameRoundPOSTOptionalGet token for a gameround
/getTokenDataPOSTOptionalGet token data
/getLastGameRoundsPOSTOptionalGet last game rounds
/getRandomResultPOSTMandatoryGet certified RNG result
/getOperatorSettingsGETOptionalGet operator-specific settings
/getBalancePOSTOptionalGet player balance

Game frontend calls

All calls are sent via GET and need a valid token to be passed (except status calls). The token can be either a short live token received as an URL parameter “token” when the 3rd party game launcher is called or a long live token received by the connect call.

GET V2_API_ENDPOINT**/status (optional)**

Can be used to check the status of the V2 API (can be used either from game frontend or from game backend / 3rd party RGS)

parameters: none

response:         a JSON structure containing a message

GET V2_API_ENDPOINT**/connect (mandatory to use)**

When calling the game launcher a connect URL and a short live token is passed. This information has to be used by game frontend to establish communication with hizi.io and getting a long live token to authenticate further calls. Note that the short live token is only valid for 5 minutes.

E.g. the game launcher is called via this URL

https://location-of-gamelauncher/index.html?token=206fa387-9565-4fc7-b6e6-b555ae064cfc&login=https%3A%2F%2Fapi.sample.hizi.io%2Fgameapi%2v2%2Fconnect

So the game frontend has to call

https://api.sample.hizi.io/v2/connect?token=206fa387-9565-4fc7-b6e6-b555ae064cfc

parameters: token

response: V2_ConnectReply

GET V2_API_ENDPOINT**/reconnect (optional)**

Similar to connect but uses a long live token which was returned by a previous connect command. Can be used to reestablish connection in case of error messages.

parameters: token

response: V2_ConnectReply

GET V2_API_ENDPOINT**/disconnect (optional)**

Can be used to signal closing / leaving of a game frontend to the operator. Some operators might request this functionality so it is recommended to implement. As parameter “token” the long live token received by a previous connect call has to be used. The return of this call is undetermined and also the frontend is not needed to wait for that call to come back.

parameters: token

response: none


Game engine / RGS calls

This group of calls are used by game engines to communicate with the RGS. Note that these are not calls used by operators and sent to operators, these calls are only used by game engines to communicate with the RGS!

Signing RGS requests

All calls are sent via POST and JSON as payload. All requests have to be signed by using a shared secret to hash the payload. The payload is always a JSON structure.

You will need a secret with which to sign requests. This secret can be queried by logging in with your credential to the hizi.io backoffice. The signature is a base 64 encoded sha256 HMAC digest of a defined set of parameters of the request. This allows sharing the secret, without including it in the request. Also a timestamp has to be provided as a request header field which has to be included in the signature. Fields should be concatenated with a hash character (#) before calculating the sha256 HMAC.

The signature is always sent with every request using the request header field X-H-AUTH-SIG. For an example implementation of creating signatures login to the hizi.io back office and look at the sample codes provided.

See sample source located at the Appendix of this document!


Mandatory request headers

When submitting a call the following request headers have to be passed

X-Request-IdUnique ID to identify the call in logs
X-H-AUTH-IDGame provider Id assigned by hinterzimmer
X-H-AUTH-SIGsignature of the payload
X-H-TIMESTAMPTimestamp (included in signature data)

Response headers

Upon reception of the call result the following headers are set in the response

X-Response-StatusFor a successful call this header will be present and will contain “ok”. Any other responses / lack of this header indicates an error
X-H-ERROR-IDWill contain an error code if something went wrong
X-H-ERROR-MSGOptional some error message
X-Response-IdUnique ID of the response used to identify the call in logs

POST V2_API_ENDPOINT**/testPing (optional)**

Sends a test payload to the API and gets it back. Can be used to check basic communication and payload signature

request: V2_TestPingRequestBody

response:         proxies body back in testDataReceived

Example:

{
  url: '/gameapi/v2/testPing',
  method: 'POST',
  body: '{"testData":{"testInt":1,"testString":"something","testBoolean":true}}',
  headers: {
    'x-h-auth-id': '000063d0ef40000000000000001b',
    'x-h-timestamp': '2023-01-26T11:28:21.429Z',
    'x-request-id': '8c00b93dd861405cbeb7c14fded1e72a',
    'x-h-auth-sig': 'fea0tckY+PfMPQA1mfhRsyUWdcJ9BXGseFOgOVE9MvE='
  },
  response: '{"testDataReceived":{"testInt":1,"testString":"something","testBoolean":true}}',
  responseHeaders: {
    'x-request-id': 'c28bb1aa40714c54ad36fe2bc6154939',
    'x-response-id': '1a3b4d1d499c4f43a78cc7a138bebdd5',
    'x-response-status': 'ok'
  }
}

POST V2_API_ENDPOINT**/startGameRound (mandatory)**

Starts a new gameround, debits bet, optional can credit winnings and close gameround immediately. Optional can close any existing gameround and collect open winnings.

request: V2_StartGameRoundRequestBody

response: V2_GameAPIReply

Example (no win)

{
  url: '/gameapi/v2/startGameRound',
  method: 'POST',
  body: '{"token":"83020869-abc0-4123-a95e-ee4f5e8e8343","rngResult":{"rngCallId":"5cd23259ea4c49e7b955e79321da4365","result":"test","winAmount":0},"debitInformation":{"debitAmount":100,"currency":"EUR"},"endGame":true}',
  headers: {
    'x-h-auth-id': '000063d0ef40000000000000001b',
    'x-h-timestamp': '2023-01-26T11:28:21.509Z',
    'x-request-id': '20e6bd07275c42fdb161f86a65a19a61',
    'x-h-auth-sig': 'Wq1xa11DsazyMNYoi26lBbes1P5SmVFc2VujHvgYea4='
  },
  response: '{"tokenData":{"operatorId":"000063d0ef40000000000000001b","playerId":"c9c5385f9ee449459fcd6ff39ac53911","gameId":"efbdc5b0ef8c434cbf11daab2fda0d5d","mode":"REAL","currency":"EUR","currentToken":"83020869-abc0-4123-a95e-ee4f5e8e8343","language":"DE","currencyMultiplier":1,"gameRound":"9f3e51d518024a98977be80c30106cc3"},"balance":{"totalBalance":6916,"mode":"REAL","currency":"EUR","balances":[{"type":"real","amount":6916,"currency":"EUR"}]},"amountToCollect":0,"amountCredited":0,"gameRoundInfo":{"hash":"9f3e51d518024a98977be80c30106cc3","status":"closed","stake":100,"mode":"REAL","currency":"EUR","game":"efbdc5b0ef8c434cbf11daab2fda0d5d"},"gameState":[{"hash":"9f3e51d518024a98977be80c30106cc3","type":"debit","result":{"winAmount":0},"processedOn":"2023-01-26T11:28:22.126Z"}]}',
  responseHeaders: {
    'x-response-id': '873ae012-ea6b-4b6e-b4d0-3946afb48b06',
    'x-h-error-id': '0',
    'x-h-repeatcount': '0',
    'x-response-status': 'ok',
    'x-request-id': 'c1822729c33f4ba69493ead9154291c9'
  }
}

Example (with win)

{
  url: '/gameapi/v2/startGameRound',
  method: 'POST',
  body: '{"token":"83020869-abc0-4123-a95e-ee4f5e8e8343","rngResult":{"rngCallId":"7c1d45ad589046f3b52fe779ffd96632","result":"test","winAmount":77},"debitInformation":{"debitAmount":100,"currency":"EUR"},"endGame":false}',
  headers: {
    'x-h-auth-id': '000063d0ef40000000000000001b',
    'x-h-timestamp': '2023-01-26T11:28:21.509Z',
    'x-request-id': 'ace5640f237a4959b9a20e83b82dece7',
    'x-h-auth-sig': '3hG9jfqJtRAIdUppRQc6EJEELhUUtT95xbEAJHFed9A='
  },
  response: '{"tokenData":{"operatorId":"000063d0ef40000000000000001b","playerId":"c9c5385f9ee449459fcd6ff39ac53911","gameId":"efbdc5b0ef8c434cbf11daab2fda0d5d","mode":"REAL","currency":"EUR","currentToken":"83020869-abc0-4123-a95e-ee4f5e8e8343","language":"DE","currencyMultiplier":1},"balance":{"totalBalance":6816,"mode":"REAL","currency":"EUR","balances":[{"type":"real","amount":6816,"currency":"EUR"}]},"amountToCollect":77,"amountCredited":0,"gameRoundInfo":{"hash":"ff85e29cb4414c89a89829c8411dacc2","status":"open","stake":100,"mode":"REAL","currency":"EUR","game":"efbdc5b0ef8c434cbf11daab2fda0d5d"},"gameState":[{"hash":"ff85e29cb4414c89a89829c8411dacc2","type":"debit","result":{"winAmount":77},"processedOn":"2023-01-26T11:28:22.810Z"}]}',
  responseHeaders: {
    'x-response-id': 'e628b84c-6df4-45d1-9561-d7653e144a3a',
    'x-h-error-id': '0',
    'x-h-repeatcount': '0',
    'x-response-status': 'ok',
    'x-request-id': 'ec8a82e6ce0e4aa79095fe4119756a54'
  }
}

POST V2_API_ENDPOINT**/endGameRound (mandatory)**

Ends an open gameround and collects and open winnings

request:         V2_EndGameRoundRequestBody

response: V2_GameAPIReply

Example

{
  url: '/gameapi/v2/endGameRound',
  method: 'POST',
  body: '{"token":"d182d578-dcce-4850-b091-205c482c0f58","gameRound":"3c2d66db3e5142d1986e210c809f88e4"}',
  headers: {
    'x-h-auth-id': '000063d0ef40000000000000001b',
    'x-h-timestamp': '2023-01-26T11:28:21.509Z',
    'x-request-id': 'ba8cf3f65d1e4f25aefd42cdc6b1caa6',
    'x-h-auth-sig': 'YuIsLOFtIfSDhKfvoY2DLnc7UxlcRMc8z7XXm9UkGSc='
  },
  response: '{"tokenData":{"operatorId":"000063d0ef40000000000000001b","playerId":"c9c5385f9ee449459fcd6ff39ac53911","gameId":"efbdc5b0ef8c434cbf11daab2fda0d5d","mode":"REAL","currency":"EUR","currentToken":"d182d578-dcce-4850-b091-205c482c0f58","language":"DE","currencyMultiplier":1,"gameRound":"3c2d66db3e5142d1986e210c809f88e4"},"balance":{"totalBalance":6954,"mode":"REAL","currency":"EUR","balances":[{"type":"real","amount":6954,"currency":"EUR"}]},"amountToCollect":0,"amountCredited":0,"gameRoundInfo":{"hash":"3c2d66db3e5142d1986e210c809f88e4","status":"closed","stake":13,"mode":"REAL","currency":"EUR","game":"efbdc5b0ef8c434cbf11daab2fda0d5d"},"gameState":[{"hash":"3c2d66db3e5142d1986e210c809f88e4","type":"debit","result":{"winAmount":0},"processedOn":"2023-01-26T11:28:26.591Z"}]}',
  responseHeaders: {
    'x-response-id': '7ba96252-1aad-41a0-af34-abc9ff939299',
    'x-h-error-id': '0',
    'x-h-repeatcount': '0',
    'x-response-status': 'ok',
    'x-request-id': '7dd55c93439b474b8523be610c0e05d5'
  }
}

POST V2_API_ENDPOINT**/getGameRoundInfo (optional)**

Returns information about a gameround

request:         V2_GetGameRoundDetailsRequestBody

response: V2_GameAPIReply

Example

{
  url: '/gameapi/v2/getGameRoundInfo',
  method: 'POST',
  body: '{"token":"83020869-abc0-4123-a95e-ee4f5e8e8343","gameRound":"ff85e29cb4414c89a89829c8411dacc2"}',
  headers: {
    'x-h-auth-id': '000063d0ef40000000000000001b',
    'x-h-timestamp': '2023-01-26T11:28:21.509Z',
    'x-request-id': '4dcef13fa1094f29b720df41e16376fc',
    'x-h-auth-sig': 'zwlF64lg7h71r1qgHPXuILziZsaZxHtH7AZJfrtQvPY='
  },
  response: '{"tokenData":{"operatorId":"000063d0ef40000000000000001b","playerId":"c9c5385f9ee449459fcd6ff39ac53911","gameId":"efbdc5b0ef8c434cbf11daab2fda0d5d","mode":"REAL","currency":"EUR","currentToken":"83020869-abc0-4123-a95e-ee4f5e8e8343","language":"DE","currencyMultiplier":1,"gameRound":"ff85e29cb4414c89a89829c8411dacc2"},"amountToCollect":77,"gameRoundInfo":{"hash":"ff85e29cb4414c89a89829c8411dacc2","status":"open","stake":100,"mode":"REAL","currency":"EUR","game":"efbdc5b0ef8c434cbf11daab2fda0d5d"},"gameState":[{"hash":"ff85e29cb4414c89a89829c8411dacc2","type":"debit","result":{"winAmount":77},"processedOn":"2023-01-26T11:28:22.810Z"}]}',
  responseHeaders: {
    'x-request-id': '57ad03d0c9f54cd6ab5b81d7895a154d',
    'x-response-id': '400f691553b3490080681432e3fd65c0',
    'x-response-status': 'ok'
  }
}

POST V2_API_ENDPOINT**/getGameRoundHistoryInfo (optional)**

Returns historical information about a gameround

request:         V2_GetGameRoundDetailsRequestBody

response: V2_GameAPIReply, in addition any protectedInfo will be returned

Notes: this call won’t be available for open gamerounds, use getGameRoundInfo call instead

POST V2_API_ENDPOINT**/voidGameRound (optional)**

Voids a debit for a gameround. The operator will receive a doTransactions call with a void operation for the initial debit. Note this call won’t work if the gameround is not open or any credit was already processed successfully and return an error.

request:         V2_VoidGameRoundRequestBody

response: V2_GameAPIReply,

Example

{
  url: '/gameapi/v2/voidGameRound',
  method: 'POST',
  body: '{"token":"83020869-abc0-4123-a95e-ee4f5e8e8343","gameRound":"ff85e29cb4414c89a89829c8411dacc2"}',
  headers: {
    'x-h-auth-id': '000063d0ef40000000000000001b',
    'x-h-timestamp': '2023-01-26T11:28:21.509Z',
    'x-request-id': 'b5f00dc745f84da3adcd474da161f759',
    'x-h-auth-sig': '4c4gjIruvm+qHmZO+Jc2eFbdH35sr45xVXNW6pDKUAw='
  },
  response: '{"balance":6902941,"gameRoundInfo":{"hash":"8f105c8a01fc46d7bb45c317c619445a","status":"cancel","stake":13,"mode":"REAL","currency":"EUR","game":"093a992277e14d6bbb1e5ead156f6734","baseStake":13,"currencyMultiplier":1}}',
  responseHeaders: {
    'x-response-id': '23778189-4957-45fe-91f2-704541b11010',
    'x-h-error-id': '0',
    'x-h-repeatcount': '0',
    'x-response-status': 'ok',
    'x-request-id': '90f91efe393f4ca5af621728e11f7227'
  }
}

POST V2_API_ENDPOINT**/collectWin (optional)**

Collects part or all open winnings and optionally close gameround when all open winnings are collected

request:         V2_CollectWinRoundRequestBody

response: V2_GameAPIReply

Example

{
  url: '/gameapi/v2/collectWin',
  method: 'POST',
  body: '{"token":"83020869-abc0-4123-a95e-ee4f5e8e8343","gameRound":"ff85e29cb4414c89a89829c8411dacc2","collectInformation":{"currency":"EUR","creditAmount":37}}',
  headers: {
    'x-h-auth-id': '000063d0ef40000000000000001b',
    'x-h-timestamp': '2023-01-26T11:28:21.509Z',
    'x-request-id': 'b5f00dc745f84da3adcd474da161f759',
    'x-h-auth-sig': '4c4gjIruvm+qHmZO+Jc2eFbdH35sr45xVXNW6pDKUAw='
  },
  response: '{"tokenData":{"operatorId":"000063d0ef40000000000000001b","playerId":"c9c5385f9ee449459fcd6ff39ac53911","gameId":"efbdc5b0ef8c434cbf11daab2fda0d5d","mode":"REAL","currency":"EUR","currentToken":"83020869-abc0-4123-a95e-ee4f5e8e8343","language":"DE","currencyMultiplier":1,"gameRound":"ff85e29cb4414c89a89829c8411dacc2"},"balance":{"totalBalance":6853,"mode":"REAL","currency":"EUR","balances":[{"type":"real","amount":6853,"currency":"EUR"}]},"amountToCollect":40,"amountCredited":37,"gameRoundInfo":{"hash":"ff85e29cb4414c89a89829c8411dacc2","status":"open","stake":100,"mode":"REAL","currency":"EUR","game":"efbdc5b0ef8c434cbf11daab2fda0d5d"},"gameState":[{"hash":"ff85e29cb4414c89a89829c8411dacc2","type":"debit","result":{"winAmount":77},"processedOn":"2023-01-26T11:28:22.810Z"},{"hash":"9e959481e6c8411f88a0fcdb43e9e55f","type":"credit","result":{},"collected":37,"reason":"collect 0.37 EUR","processedOn":"2023-01-26T11:28:23.260Z"}]}',
  responseHeaders: {
    'x-response-id': '23778189-4957-45fe-91f2-704541b11010',
    'x-h-error-id': '0',
    'x-h-repeatcount': '0',
    'x-response-status': 'ok',
    'x-request-id': '90f91efe393f4ca5af621728e11f7227'
  }
}

POST V2_API_ENDPOINT**/addWin (mandatory)**

Adds an uncollected (open win) to a open gameround, optionally can collect the win amount immediately and close the gameround

request: V2_AddWinRequestBody

response: V2_GameAPIReply

Example

{
  url: '/gameapi/v2/addWin',
  method: 'POST',
  body: '{"token":"d182d578-dcce-4850-b091-205c482c0f58","gameRound":"ff85e29cb4414c89a89829c8411dacc2","rngResult":{"rngCallId":"69cf2876471845ba8e97f3adbdf1d163","result":"test-uncollected","winAmount":10}}',
  headers: {
    'x-h-auth-id': '000063d0ef40000000000000001b',
    'x-h-timestamp': '2023-01-26T11:28:21.509Z',
    'x-request-id': '9c6c2a59e2e9468d82214839ecf9c45d',
    'x-h-auth-sig': 'tMWdNcBZf+6SwrB9qm74B/uKhbE5qDotugxrwdssqqM='
  },
  response: '{"tokenData":{"operatorId":"000063d0ef40000000000000001b","playerId":"c9c5385f9ee449459fcd6ff39ac53911","gameId":"efbdc5b0ef8c434cbf11daab2fda0d5d","mode":"REAL","currency":"EUR","currentToken":"d182d578-dcce-4850-b091-205c482c0f58","language":"DE","currencyMultiplier":1,"gameRound":"ff85e29cb4414c89a89829c8411dacc2"},"amountToCollect":89,"gameState":[{"hash":"ff85e29cb4414c89a89829c8411dacc2","type":"debit","result":{"winAmount":77},"processedOn":"2023-01-26T11:28:22.810Z"},{"hash":"9e959481e6c8411f88a0fcdb43e9e55f","type":"credit","result":{},"collected":37,"reason":"collect 0.37 EUR","processedOn":"2023-01-26T11:28:23.260Z"},{"hash":"7ac21c2772124befbcd5c70500f421a8","type":"wager","result":{"winAmount":60},"amountWagered":21,"processedOn":"2023-01-26T11:28:24.037Z"},{"hash":"cfbbf8f2a6554d1c9738ecd14aabbb8a","type":"genericwin","result":{"winAmount":10},"processedOn":"2023-01-26T11:28:24.647Z"}]}',
  responseHeaders: {
    'x-request-id': '5c022f0582f04763b9751ce0aca1e8d9',
    'x-response-status': 'ok'
  }
}

POST V2_API_ENDPOINT**/wagerWin (optional)**

wagers part or all of open winnings and adds result as new open win amount

request:         V2_WagerWinRoundRequestBody

response: V2_GameAPIReply

Example

{
  url: '/gameapi/v2/wagerWin',
  method: 'POST',
  body: '{"token":"d182d578-dcce-4850-b091-205c482c0f58","gameRound":"ff85e29cb4414c89a89829c8411dacc2","rngResult":{"rngCallId":"c976d024c19e4a76940b7302beb87939","result":"test","winAmount":60},"wagerInformation":{"currency":"EUR","wagerAmount":21}}',
  headers: {
    'x-h-auth-id': '000063d0ef40000000000000001b',
    'x-h-timestamp': '2023-01-26T11:28:21.509Z',
    'x-request-id': 'b034474af1e242fa8377f6bfa275081e',
    'x-h-auth-sig': 'NTJrcVX3yfgFZdFp9lO7FdSti7UhGbIIsdSJjE3OF/0='
  },
  response: '{"tokenData":{"operatorId":"000063d0ef40000000000000001b","playerId":"c9c5385f9ee449459fcd6ff39ac53911","gameId":"efbdc5b0ef8c434cbf11daab2fda0d5d","mode":"REAL","currency":"EUR","currentToken":"d182d578-dcce-4850-b091-205c482c0f58","language":"DE","currencyMultiplier":1,"gameRound":"ff85e29cb4414c89a89829c8411dacc2"},"amountCredited":0,"amountToCollect":79,"gameState":[{"hash":"ff85e29cb4414c89a89829c8411dacc2","type":"debit","result":{"winAmount":77},"processedOn":"2023-01-26T11:28:22.810Z"},{"hash":"9e959481e6c8411f88a0fcdb43e9e55f","type":"credit","result":{},"collected":37,"reason":"collect 0.37 EUR","processedOn":"2023-01-26T11:28:23.260Z"},{"hash":"7ac21c2772124befbcd5c70500f421a8","type":"wager","result":{"winAmount":60},"amountWagered":21,"processedOn":"2023-01-26T11:28:24.037Z"}]}',
  responseHeaders: {
    'x-request-id': 'abe54ec392bd47ad8fc142b6e9349380',
    'x-response-status': 'ok'
  }
}

POST V2_API_ENDPOINT**/getUncollectedAmount (optional)**

Returns the amount of uncollected (open) winnings

request:         V2_GetUncollectedAmountRequestBody
response:         V2_GameAPIGetUncollectedAmountReply

Example

{
  url: '/gameapi/v2/getUncollectedAmount',
  method: 'POST',
  body: '{"token":"d182d578-dcce-4850-b091-205c482c0f58","gameRound":"ff85e29cb4414c89a89829c8411dacc2"}',
  headers: {
    'x-h-auth-id': '000063d0ef40000000000000001b',
    'x-h-timestamp': '2023-01-26T11:28:21.509Z',
    'x-request-id': '9ac31f8269514695b0cf287f3f721843',
    'x-h-auth-sig': '+iT88iL/NZ/QSrN5ovH6Ljr5OwQtFMBtYKGtxvNsklM='
  },
  response: '{"tokenData":{"operatorId":"000063d0ef40000000000000001b","playerId":"c9c5385f9ee449459fcd6ff39ac53911","gameId":"efbdc5b0ef8c434cbf11daab2fda0d5d","mode":"REAL","currency":"EUR","currentToken":"d182d578-dcce-4850-b091-205c482c0f58","language":"DE","currencyMultiplier":1,"gameRound":"ff85e29cb4414c89a89829c8411dacc2"},"amountToCollect":79}',
  responseHeaders: {
    'x-request-id': '54c06093d0ec405fab2142e0cb770f08',
    'x-response-status': 'ok'
  }
}

POST V2_API_ENDPOINT**/addSpinCounterGameState (optional**, not needed for RGS-to-RGS**)**

Adds a game request with a counter (e.g. free spins won) or consumes a counter (e.g. a free spin played). Checks if game state is available when consumed (e.g. to make sure that no more free spins are done as won before)

request:         V2_AddSpinCounterGameStateRequestBody
response:         V2_GameAPIAddSpinCounterGameStateReply

Example

{
  url: '/gameapi/v2/addSpinCounterGameState',
  method: 'POST',
  body: '{"token":"d182d578-dcce-4850-b091-205c482c0f58","gameRound":"ff85e29cb4414c89a89829c8411dacc2","counterType":"customspin","rngResult":{"rngCallId":"937bfc0d50c4493fa47ce7221d9afc12","result":{"awarded":10},"winAmount":0}}',
  headers: {
    'x-h-auth-id': '000063d0ef40000000000000001b',
    'x-h-timestamp': '2023-01-26T11:28:21.509Z',
    'x-request-id': '869a2d200905426f8e09d1fc15d91418',
    'x-h-auth-sig': 'HnjWEUTdQ56mAph4BFgiGfx6mwq+Lwebz2834nk9T0E='
  },
  response: '{"tokenData":{"operatorId":"000063d0ef40000000000000001b","playerId":"c9c5385f9ee449459fcd6ff39ac53911","gameId":"efbdc5b0ef8c434cbf11daab2fda0d5d","mode":"REAL","currency":"EUR","currentToken":"d182d578-dcce-4850-b091-205c482c0f58","language":"DE","currencyMultiplier":1,"gameRound":"ff85e29cb4414c89a89829c8411dacc2"},"amountToCollect":89,"spinsAvailable":10,"gameState":[{"hash":"ff85e29cb4414c89a89829c8411dacc2","type":"debit","result":{"winAmount":77},"processedOn":"2023-01-26T11:28:22.810Z"},{"hash":"9e959481e6c8411f88a0fcdb43e9e55f","type":"credit","result":{},"collected":37,"reason":"collect 0.37 EUR","processedOn":"2023-01-26T11:28:23.260Z"},{"hash":"7ac21c2772124befbcd5c70500f421a8","type":"wager","result":{"winAmount":60},"amountWagered":21,"processedOn":"2023-01-26T11:28:24.037Z"},{"hash":"cfbbf8f2a6554d1c9738ecd14aabbb8a","type":"genericwin","result":{"winAmount":10},"processedOn":"2023-01-26T11:28:24.647Z"},{"hash":"8531967219184c98a06cba7a009640b8","type":"genericwin","result":{"winAmount":10},"processedOn":"2023-01-26T11:28:24.806Z"},{"hash":"15171253390246f18d889d9d1c18e893","type":"credit","result":{},"collected":10,"reason":"collect 0.10 EUR","processedOn":"2023-01-26T11:28:24.826Z"},{"hash":"9ac37a5ceb754f78a51645fd8a9a316f","type":"customspin","result":{"winAmount":0},"processedOn":"2023-01-26T11:28:25.227Z"}]}',
  responseHeaders: {
    'x-request-id': 'b3a6057f422942918672b6c627921d17',
    'x-response-status': 'ok'
  }
}

POST**/getAvailableSpinCounter (optional**, not needed for RGS-to-RGS**)**

Gets the value of a spin counter (e.g. return number of available free spins after addSpinCountGameState command)

request:         V2_GetAvailableSpinCounterRequestBody
response:         V2_GameAPIGetAvailableSpinCounterReply

Example

{
  url: '/gameapi/v2/getAvailableSpinCounter',
  method: 'POST',
  body: '{"token":"d182d578-dcce-4850-b091-205c482c0f58","gameRound":"ff85e29cb4414c89a89829c8411dacc2","counterType":"customspin"}',
  headers: {
    'x-h-auth-id': '000063d0ef40000000000000001b',
    'x-h-timestamp': '2023-01-26T11:28:21.509Z',
    'x-request-id': '8e162d3e2081490dbca7db48d84188a2',
    'x-h-auth-sig': 'LZX7T0pRn0ldVtwBfCJ+aBkhL9UfXj6h5S2abngBO2Q='
  },
  response: '{"tokenData":{"operatorId":"000063d0ef40000000000000001b","playerId":"c9c5385f9ee449459fcd6ff39ac53911","gameId":"efbdc5b0ef8c434cbf11daab2fda0d5d","mode":"REAL","currency":"EUR","currentToken":"d182d578-dcce-4850-b091-205c482c0f58","language":"DE","currencyMultiplier":1,"gameRound":"ff85e29cb4414c89a89829c8411dacc2"},"amountToCollect":104,"spinsAvailable":9}',
  responseHeaders: {
    'x-request-id': '96471d3f90824c4484a288169734bf5e',
    'x-response-status': 'ok'
  }
}

POST V2_API_ENDPOINT**/getTokenForGameRound (optional)**

Gets a new token for an open gameround (for use by janitor / autoclose functions).

Note: this call will revoke any existing tokens for the given player / operator / game given. This call should only be used in janitor calls.

request:         V2_GetTokenForGameRoundRequestBody
response:         V2_GetTokenForGameRoundReply

Example

{
  url: '/gameapi/v2/getTokenForGameRound',
  method: 'POST',
  body: '{"gameRound":"ff85e29cb4414c89a89829c8411dacc2"}',
  headers: {
    'x-h-auth-id': '000063d0ef40000000000000001b',
    'x-h-timestamp': '2023-01-26T11:28:21.509Z',
    'x-request-id': 'd5dd1017005d4c3ea9b31301bd7de6c0',
    'x-h-auth-sig': 'JbFPHyWd+EOgn+sCf1/QLK+SeRJuksnoqIze7mz2M4Y='
  },
  response: '{"tokenData":{"operatorId":"000063d0ef40000000000000001b","playerId":"c9c5385f9ee449459fcd6ff39ac53911","gameId":"efbdc5b0ef8c434cbf11daab2fda0d5d","mode":"REAL","currency":"EUR","currentToken":"d182d578-dcce-4850-b091-205c482c0f58","language":"DE","currencyMultiplier":1,"gameRound":"ff85e29cb4414c89a89829c8411dacc2"}}',
  responseHeaders: {
    'x-request-id': '2c19baca98a4424ab67ffa76bc1d74dc',
    'x-response-status': 'ok'
  }
}

POST V2_API_ENDPOINT**/getTokenData(optional)**

Gets token data from a given token ID

request:         V2_GetTokenDataRequestBody

response: V2_GetTokenDataReply

Example

{
  url: '/gameapi/v2/getTokenData',
  method: 'POST',
  body: '{"token":"cfa822f6-4f53-4ecb-a6f9-647788a6fcd5"}',
  headers: {
    'x-h-auth-id': '000063ea2b200000000000000029',
    'x-h-timestamp': '2023-02-13T14:30:41.130Z',
    'x-request-id': '96317c437f264b3ba2fcd4bf68e8172f',
    'x-h-auth-sig': 'Pb0TjKXo9aAgongzqvAV+C3mz7L2qPspvjhz7y8riCI='
  },
  response: '{"tokenData":{"operatorId":"000063ea2b200000000000000029","playerId":"cd4def34682447ab9b5684340bf25cfe","gameId":"b42a6a2e13554d9cb5c1da72fcb22b8b","mode":"REAL","currency":"EUR","currentToken":"cfa822f6-4f53-4ecb-a6f9-647788a6fcd5","language":"DE","currencyMultiplier":1,"gameRound":"eb6320faf7ac4cdc85ce6f0043573f2f"}}',
  responseHeaders: {
    'x-request-id': 'b6f46c69b7a1454ab2075b67fa220265',
    'x-response-status': 'ok'
  }
}

POST V2_API_ENDPOINT**/getLastGameRounds (optional)**

Gets a list of recently closed games

request: V2_GetLastGamesRequestBody

response: V2_GetLastGamesReply

Example

{
  url: '/gameapi/v2/getLastGameRounds',
  method: 'POST',
  body: '{"token":"d182d578-dcce-4850-b091-205c482c0f58"}',
  headers: {
    'x-h-auth-id': '000063d0ef40000000000000001b',
    'x-h-timestamp': '2023-01-26T11:28:21.509Z',
    'x-request-id': 'cf64d9f4cb964a14a6c464b74512cf73',
    'x-h-auth-sig': 'b8QF77vhsf7rCp7hNZnHxUV4gBeQ0Nz/rYAdq2SwXYA='
  },
  response: '{"gameRoundList":[{"id":"a016d46dd75b4725baf06d0ef0fdbe7f","status":"closed","timestamp":"2023-01-26T11:28:28.953Z","bet":13,"won":10,"currency":"EUR","gameSpecificDetails":{"result":{"result":"test","rngCallId":"830e8c88405a48b2af5b33f89745084e","winAmount":10}}},{"id":"ed404d20c18b4821880e465b0e41c570","status":"closed","timestamp":"2023-01-26T11:28:28.769Z","bet":13,"won":10,"currency":"EUR","gameSpecificDetails":{"result":{"result":"test","rngCallId":"28732aa1acd3472fa743ef8e6acc36ef","winAmount":10}}}]}',
  responseHeaders: {
    'x-response-id': '25b52b253ab543239d8490d32b6a63cd',
    'x-response-status': 'ok'
  }
}

POST V2_API_ENDPOINT**/getRandomResult (mandatory)**

Get random integers or doubles within a given range from hizi.io certified RNG

request:         V2_GetRandomResultRequestBody

response: V2_GameAPIRngReply

Example

{
  url: '/gameapi/v2/getRandomResult',
  method: 'POST',
  body: '{"token":"123162d0-315d-474b-930c-7e43625c2ae3","rngEndPoint":"getDoubles","rngPayload":{"min":1,"max":10,"count":2}}',
  headers: {
    'x-h-auth-id': '000063d0ef400000000000000029',
    'x-h-timestamp': '2023-01-26T11:43:58.115Z',
    'x-request-id': '7f0fab897ea745d1a82b79934ee93b6d',
    'x-h-auth-sig': 'kLiIcxtblFF2+c9g5zUmKrNoOZFpqeO7ODXZGUklVSg='
  },
  response: '{"values":[3.068702629156329,9.509780327419449],"tokenData":{"operatorId":"000063d0ef400000000000000029","playerId":"9f1cfa5dfcbd4946817675ecbccc26c5","gameId":"f1252f6014084e1cbf5bb1982f911e0c","mode":"REAL","currency":"EUR","currentToken":"123162d0-315d-474b-930c-7e43625c2ae3","language":"DE","currencyMultiplier":1}}',
  responseHeaders: {
    'x-response-id': '0c83abf945a14e78ab8babaa4b96005b',
    'x-response-status': 'ok',
    'x-request-id': 'c95a958b11614905b932aa7dce9d695d'
  }
}

GET V2_API_ENDPOINT**/getOperatorSettings (optional)**

Get operator specific settings

request:         V2_GetOperatorSettingsQuery

response: V2_GameSettings

Example

 {
  url: '/gameapi/v2/getOperatorSettings?game=f1252f6014084e1cbf5bb1982f911e0c-unk&operator=000063d0ef400000000000000029-unk&currency=EUR',
  method: 'GET',
  body: undefined,
  headers: {
    'x-h-auth-id': '000063d0ef400000000000000029',
    'x-h-timestamp': '2023-01-26T11:43:58.115Z',
    'x-request-id': 'e67161f5bc354717871b021144945154',
    'x-h-auth-sig': 'D3p/3TU6q3DYGZ56TtFXVDog5UU4uVRw38FrMVd1ru4='
  },
  response: '{"autoplayEnabled":true,"autoplayLossLimitRequired":false,"displayCoins":true,"displayJackpotOdds":false,"displayRTP":false,"displayXRTP":false,"forceOrientation":0,"gambleEnabled":true,"historyURL":"","homeURL":"","loadMsg":"","maxExposure":25000000,"multipleInstancesAllowed":false,"rcDisplayWinLoss":false,"rcEnabled":false,"stopEnabled":true,"topupURL":"","turboEnabled":true,"homeEnabled":true,"dynamicMinSpinTime":false,"redirectTarget":"top","packageBuyEnabled":true}',
  responseHeaders: {
    'x-response-id': '475c54c307174c2a98d86b190feebb09',
    'x-response-status': 'ok'
  }
}

POST V2_API_ENDPOINT**/getBalance (optional)**

Get player’s balance

request: V2_GetTokenDataRequestBody

response: GameAPIBalanceReply

Example

{
  url: '/gameapi/v2/getBalance',
  method: 'POST',
  body: '{"token":"cfa822f6-4f53-4ecb-a6f9-647788a6fcd5"}',
  headers: {
    'x-h-auth-id': '000063ea2b200000000000000029',
    'x-h-timestamp': '2023-02-13T14:30:41.130Z',
    'x-request-id': '96317c437f264b3ba2fcd4bf68e8172f',
    'x-h-auth-sig': 'Pb0TjKXo9aAgongzqvAV+C3mz7L2qPspvjhz7y8riCI='
  },
  response: '{"totalBalance":6816,"mode":"REAL","currency":"EUR","balances":[{"type":"real","amount":6816,"currency":"EUR"}]}',
  responseHeaders: {
    'x-request-id': 'b6f46c69b7a1454ab2075b67fa220265',
    'x-response-status': 'ok'
  }