Skip to content

Data types and definitions

Basic types

Basic types are scalar types which are used in objects.

typedescriptionformatsample value
stringrepresenting a string valueUTF-8 encoded stringtest
numberrepresenting a numberany valid number notation with or without decimals180.1
amounta value representing a “money” value, always given in 1/100 units of base currency without fractionsany positive (greater or equal 0) integer value, no fractions1200
currencyISO 4217 3 letter currency code see https://en.wikipedia.org/wiki/ISO_42173 letter string (uppercase)EUR
languageidentifies a language, see http://www.lingoes.net/en/translator/langcode.htm2 or 5 letter stringen en-US
countrya ISO-3166-2 2 letter country code, see https://en.wikipedia.org/wiki/ISO_3166-22 letter string (uppercase)GB
hashUUID identifying transactions or other unique values Hashes are used to identify gamerounds, transactions and other unique objects128 Bit UUID represented as a 36 character string see https://en.wikipedia.org/wiki/Universally_unique_identifier123e4567-e89b-12d3-a456-426655440000
timestampISO_8601 timestamp see https://en.wikipedia.org/wiki/ISO_8601 as an example you can use the following to generate an ISO string in javascript: console.log(new Date().toISOString());represented as string it is recommended to always use UTC time2020-01-21T14:48:04Z
arrayan array of any basic or object typesjson array notation[1,2]
booleanindicating a binary valuetrue false "true" "false"true
jsondataa valid json objectjson object notation{ "test": "ok" }

Object types

The following objects complex data type which are used in request and/or response payloads. Attributes have a basic type.

playerBalance

This type describes the balance of a player.

attributetypeallowed valuesmandatorynotes
typestring“real” “bonus” “demo”YES
amountamountany positive (greater or equal 0) integer value, no fractionsYESbalance in 1/100 units of base currency without fractions
currencycurrencyany 3 character currency codeYESISO 4217 3 letter currency code
SamplesDescription
{ "type": "real", "amount": 1200, "currency": "EUR" }sample of a real money balance (12 EUR)
{ "type": "bonus", "amount": 0, "currency": "EUR" }sample of a bonus money balance

gameTransaction

This object describes a transaction linked to a gameround. The hash identifying the gameround will always be included in either the request or response body.

attributetypeallowed valuesmandatorynotes
typestring“end” “debit” “credit” “void”YESdetermines type of transaction
isFirstDebitbooleantrue or falseYES if type = "debit", if sent with other types should be ignored. If YES is received this indicates the start of a new gameroundin case of a debit transaction this indicates the first bet that is needed to start the game
amountamountany positive (greater or equal 0) integer value, no fractions Amount can be 0 if a granted freeplay is used.only for debit and credit transactionsthe value of the transaction in 1/100 of the base currency
discountAmountamountOptional discount to be applied to amountOnly for debit transactionsThe value of the discount in 1/100 of the base currency
discountCampaignIdstringOptional campaignId to be used for a discountOnly for debit transactionscampaignId received in discount information
currencycurrencyany 3 character currency codeonly for debit and credit transactionsthe currency the transaction is be performed in
hashhashany valid valueonly for debit credit and void transactionsidentifies a transaction, all calls have to be idempotent on this value
timestamptimestampany valid valueNOtimestamp of the transaction, only transmitted in reporting transactions back to operator
reasonstringany valid valueNOoptional reason of this transaction
T**he following attributes are used when a freeplay is consumed instead of an amount to be debited. In that case the amount attribute is set to 0. See Appendix D**for details of freeplay processing
freePlayStakeamountIf a freeplay is used (amount = 0) this value indicates the stake used for that gameroundNO
freePlayUsedbooleanIf a freeplay is used this value is set to “true”NO
serialstringSerial of the freeplay package usedNOSerial used in assignPlayerFreerounds call

Notes

A transaction always has a type which can be any of the following. Multiple transactions can be linked using the gameround hash.


The following transaction types are allowed

valuedescriptionnotes
debita player placed a wager (bet), if isFirstDebit is set to true this indicates the start of a new gameroundIt is the operator responsibility to determine if real or bonus money should be used.
credita winning should be added to the players account
voida debit transaction should be voidedplease note that the void command might be received before the actual debit transaction is received, in this case the debit should be voided (that means no deduction from the players account). The transaction to be voided is identified by the transaction hash
endthe gameround is finishedthis will always be sent when the gameround is finished (also in case of a void transaction).
SamplesDescription
{ "type": "debit", "isFirstDebit": "true", "amount": 200, "currency": "EUR", "hash": "62848922-da8b-46af-b7b3-7cf10190cd25" }a gameround is started. user placed an initial wager of 2 EUR. Call should be idempotent.
{ "type": "debit", "isFirstDebit": "false", "amount": 100, "currency": "EUR", "hash": "39ab89c2-f722-405e-a2e1-c96fedbfd586" }user placed a continuation bet of 1 EUR. Call should be idempotent.
{ "type": "credit", "amount": 1000, "currency": "EUR", "hash": "5b1ba0fc-6040-478e-9a19-58bd4786ca23" }user won 10 EUR in that gameround. Call should be idempotent.
{ "type": "void", "hash": "62848922-da8b-46af-b7b3-7cf10190cd25", "reason": "game had a malfunction" }the game had a malfunction, so the debit transaction above should be voided. Call should be idempotent.
{ "type": "end" }the gameround is finished, should be closed. Call should be idempotent.
Sample when a freeplay is usedDescription
{ "hash": "9385ec9642034ed89ef974d0fffbdff7", "type": "debit", "isFirstDebit": true, "amount": 0, "currency": "EUR", "freePlayStake": 100, "freePlayUsed": true, "serial": "f089ec54-8e3b-40b0-92c3-e614402f5358" }Instead of a debit a free ticket with a value of 1 EUR is used

errorCode

This structure is used to return an error as result to an API call.

attributetypeallowed valuesmandatorynotes
idnumberID of error that occurred (0 represents no error / successful operation)YESsee list of known errors
msgstringoptional explanationNOnot displayed in client, useful to give hints in log files.
clientmsgstringoptional message to be displayed in game clientNOthis message will be displayed without further interpretation in game client
SamplesDescription
{ "id": 1, "msg": "player id unknown" }sample of an error when a player was not found
{ "id": 0 }sample of errorCode meaning no error (successful operation).
{ "id": 11, "msg": "betlimit reached", "clientmsg": "You reached your daily betting limit!" }sample of an error when bet limit was reached with a text that should be displayed in game client.

clientMessage

This structure is used to trigger a dialog that should be rendered in the game client. This could be used to pass a message about a switch from bonus to real money usage or to control betting limits or reality checks. Additional flags allow the operator to interrupt any autoplays.

attributetypecontentmandatorynotes
titlestringtitle of the message boxYES
msgstringmessage to be displayed in a message box in game clientYES
buttonsarray of jsondataoptional list of buttons that should be displayed see notes for detailsNOIf not present a standard "OK" button which closes the dialog box without any action will be shown
stopAutoPlaybooleantrue falseNOif present and set to true any running autoplay features will be interrupted and have to be resumed by player manually

Structure of button data in a client message

The following object is used to define buttons to be displayed in a client message box.

attributetypeallowed valuesmandatorynotes
labelstringtext on buttonYES
urlstringURL to be called when button is clickedNOif not present button just closes the box
SampleDescription
{ "title": "Reality check", "msg": "You are now playing for 60 minutes, do you want to continue ?", "stopAutoPlay": true, "buttons": [ { "label": "Yes" }, { "label": "No", "url": "http://gotolobby" } ] }displays a reality check message box, stops autoplay gives player choice to continue or exit.

tickets

This structure is used to return information of tickets and/or freeplays which are assigned / available for a player. See Appendix D for details of freeplays

attributetypeallowed valuesmandatorynotes
serialstringSerial assign to this packageYESUnique for each operator
stakeamountany positive non zero, no fractionsYESStake for which the freeplay is valid
currencycurrencyany 3 character currency codeYESCurrency for which the freeplay is valid
availableTicketsnumberPositive non zero integerYESNumber of freeplays available
SamplesDescription
{ "serial": "unique-value", "currency": "EUR", "stake": 100, "availableTickets": 4 }4 tickets with a stake of 1 EUR available
{ "serial": "dbf8907c-8002-4bdc-8804-3b1ec00d21be", "currency": "EUR", "stake": 500, "availableTickets": 1 }One ticket with a stake of 5 EUR available