Backend integration
Bonus API introduction
Provider - side which provides games (Aviatrix).
Partner - side which integrates games.
Brand - partner's casino website where users play games and place bets.
This document describes the methods implemented by the provider. These methods are used to retrieve a list of bonus configurations, to manage bonuses and bonus assignments, to retrieve bonus assignment status per player.
API-generated bonuses follow the same rules as manual bonuses. Any bets made with these bonuses are deducted 100% from the overall turnover.
Bonus API methods
All POST requests contain the X-Auth-Signature HTTP header required to authenticate the host. This removes the need for IP whitelisting during the integration process. Otherwise, it deprives the provider of the ability to scale quickly (horizontally) without notifying the platform.
Ask your integration manager for the base URL.
/CreateBonusConfig
Method is called to create new bonus configuration.
When creating a bonus configuration for multiple games in a single request, only games within the same category can be specified: crash games or slot games.
Game combination examples:
- nft-aviatrix
- second-chance
- nft-aviatrix, second-chance
- aviatrix-fruits
Example of the request
Request headers specified in example are required: Accept, Content-Type, X-Auth-Signature.
POST /bonus/v1/CreateBonusConfig HTTP/1.1
Content-Type: application/json
Accept: application/json
X-Auth-Signature: <signature>
{
"cid": "some-brand-id",
"config": {
"type": "free_bets",
"validFrom": "2020-12-03T12:15:30.000Z",
"validTo": "2020-12-03T12:15:30.000Z",
"gameSettings": [
{
"gameId": "some-game-id",
"minOddsWagering": 50.0,
"maxOddsWagering": 150.0
}
],
"isPlayable": false,
"wagering": {
"multiplier": 10,
"useBonusMoney": true
}
}
}
| Parameter | Description | Type | Requirements | Explanation |
|---|---|---|---|---|
| cid | brand identifier | string | required | unique identifier |
| config.type | bonus configuration type | string | required | available values: free_bets |
| config.validFrom | the begin of valid bonus configuration period | timestamp | required | format: yyyy-MM-dd’T’HH:mm:ss.SSSZ / RFC3339 |
| config.validTo | the end of valid bonus configuration period | timestamp | required | format: yyyy-MM-dd’T’HH:mm:ss.SSSZ / RFC3339 |
| config.gameSettings | list of game specific settings | array | required | settings for a specific game type; at the same time, only games within the same category can be specified: crash games or slot games |
| gameId | game identifier | string | required | current identifiers: nft-aviatrix, second-chance, aviatrix-fruits |
| minOddsWagering | wagering minimum odds | double | optional | odds in minor currency unit format (1.95 -> 195); valid range [0-10000]; not supported by aviatrix-fruits |
| maxOddsWagering | wagering maximum odds | double | optional | odds in minor currency unit format (1.95 -> 195); valid range [0-10000]; not supported by aviatrix-fruits |
| config.isPlayable | possibility to play with bonus balance | bool | required | if true then it is possible to play with bonus balance |
| wagering.multiplier | wagering multiplier | integer | required | integer multiplier for a wagering, for example 30 |
| wagering.useBonusMoney | dependency between bonus balance and wagering | bool | required | if true then playing with bonus balance will affect wagering |
Example of the response from the server
HTTP/1.1 200 OK
{
"bonusConfigId": "6f41bd2a-4621-42e5-883c-647b8995684d",
"cid": "some-brand-id",
"config": {
"type": "free_bets",
"validFrom": "2020-12-03T12:15:30.000Z",
"validTo": "2020-12-03T12:15:30.000Z",
"gameSettings": [
{
"gameId": "some-game-id",
"minOddsWagering": 50.0,
"maxOddsWagering": 150.0
}
],
"isPlayable": false,
"wagering": {
"multiplier": 10,
"useBonusMoney": true
}
}
}
| Parameter | Description | Type | Explanation |
|---|---|---|---|
| bonusConfigId | bonus configuration identifier | string | unique identifier, format: uuid |
| cid | brand identifier | string | unique identifier |
| config.type | bonus configuration type | string | available values: free_bets |
| config.validFrom | the begin of valid bonus configuration period | timestamp | format: yyyy-MM-dd’T’HH:mm:ss.SSSZ / RFC3339 |
| config.validTo | the end of valid bonus configuration period | timestamp | format: yyyy-MM-dd’T’HH:mm:ss.SSSZ / RFC3339 |
| config.gameSettings | list of game specific settings | array | settings for a specific game type; at the same time, only games within the same category can be specified: crash games or slot games |
| gameId | game identifier | string | current identifiers: nft-aviatrix, second-chance, aviatrix-fruits |
| minOddsWagering | wagering minimum odds | double | odds in minor currency unit format (1.95 -> 195); valid range [0-10000]; not supported by aviatrix-fruits |
| maxOddsWagering | wagering maximum odds | double | odds in minor currency unit format (1.95 -> 195); valid range [0-10000]; not supported by aviatrix-fruits |
| config.isPlayable | possibility to play with bonus balance | bool | if true then it is possible to play with bonus balance |
| wagering.multiplier | wagering multiplier | integer | integer multiplier for a wagering, for example 30 |
| wagering.useBonusMoney | dependency between bonus balance and wagering | bool | if true then playing with bonus balance will affect wagering |
/GetBonusConfigs
Method is called to retrieve list of existing bonus configurations for specified brand.
Example of the request
Request headers specified in example are required: Accept, Content-Type, X-Auth-Signature.
POST /bonus/v1/GetBonusConfigs HTTP/1.1
Content-Type: application/json
Accept: application/json
X-Auth-Signature: <signature>
{
"cid": "some-brand-id",
"showActiveOnly": false
}
| Parameter | Description | Type | Requirements | Explanation |
|---|---|---|---|---|
| cid | brand identifier | string | required | unique identifier |
| showActiveOnly | filter flag | bool | optional | allows to display only active bonus configurations |
Example of the response from the server
HTTP/1.1 200 OK
{
"values": [
{
"bonusConfigId": "6f41bd2a-4621-42e5-883c-647b8995684d",
"cid": "some-brand-id",
"config": {
"type": "free_bets",
"validFrom": "2020-12-03T12:15:30.000Z",
"validTo": "2020-12-03T12:15:30.000Z",
"gameSettings": [
{
"gameId": "some-game-id",
"minOddsWagering": 50.0,
"maxOddsWagering": 150.0
}
],
"isPlayable": false,
"wagering": {
"multiplier": 10,
"useBonusMoney": true
}
}
}
]
}
| Parameter | Description | Type | Explanation |
|---|---|---|---|
| values | list of bonus configurations | array | can present expired, active and inactive configurations |
| bonusConfigId | bonus configuration identifier | string | unique identifier, format: uuid |
| cid | brand identifier | string | unique identifier |
| config.type | bonus configuration type | string | available values: free_bets |
| config.validFrom | the begin of valid bonus configuration period | timestamp | format: yyyy-MM-dd’T’HH:mm:ss.SSSZ / RFC3339 |
| config.validTo | the end of valid bonus configuration period | timestamp | format: yyyy-MM-dd’T’HH:mm:ss.SSSZ / RFC3339 |
| config.gameSettings | list of game specific settings | array | settings for a specific game type; at the same time, only games within the same category can be specified: crash games or slot games |
| gameId | game identifier | string | current identifiers: nft-aviatrix, second-chance, aviatrix-fruits |
| minOddsWagering | wagering minimum odds | double | odds in minor currency unit format (1.95 -> 195); valid range [0-10000]; not supported by aviatrix-fruits |
| maxOddsWagering | wagering maximum odds | double | odds in minor currency unit format (1.95 -> 195); valid range [0-10000]; not supported by aviatrix-fruits |
| config.isPlayable | possibility to play with bonus balance | bool | if true then it is possible to play with bonus balance |
| wagering.multiplier | wagering multiplier | integer | integer multiplier for a wagering, for example 30 |
| wagering.useBonusMoney | dependency between bonus balance and wagering | bool | if true then playing with bonus balance will affect wagering |
/CreateFreeBet
Method is called to create new bonus campaign within existing bonus configuration.
Example of the request
Request headers specified in example are required: Accept, Content-Type, X-Auth-Signature.
POST /bonus/v1/CreateFreeBet HTTP/1.1
Content-Type: application/json
Accept: application/json
X-Auth-Signature: <signature>
{
"cid": "some-brand-id",
"bonusConfigId": "6f41bd2a-4621-42e5-883c-647b8995684d",
"name": "Some Campaign Name",
"bonus": {
"betCount": 5,
"currencySettings": {
"EUR": {
"amount": 5,
"maxPromoWinAmount": 10000,
"maxBetWageringAmount": 200
},
"USD": {
"amount": 6,
"maxPromoWinAmount": 12000,
"maxBetWageringAmount": 400
}
},
"validTo": "2020-12-03T12:15:30.000Z"
}
}
| Parameter | Description | Type | Requirements | Explanation |
|---|---|---|---|---|
| cid | brand identifier | string | required | unique identifier |
| bonusConfigId | bonus configuration identifier | string | required | unique identifier, format: uuid |
| name | bonus campaign name | string | required | naming of a bonus campaign |
| bonus.betCount | amount of bonus bets | integer | required | bonus bets that will be granted to a player |
| bonus.currencySettings | map of currency specific settings | map | required | bonus bet currency, format ISO-4217-3 |
| amount | amount of bonus bet | integer | required | format minor currency unit, example: 1.95$ -> 195; can't be lesser than minimal and greater than maximal bet amount for specified brand |
| maxPromoWinAmount | maximum bonus win amount | integer | required | format minor currency unit, example: 1.95$ -> 195; can't be greater than maximal win amount for specified brand |
| maxBetWageringAmount | maximum amount for wagering | integer | optional | format minor currency unit, example: 1.95$ -> 195 |
| bonus.validTo | expiration period of bonus campaign | timestamp | required | format: yyyy-MM-dd’T’HH:mm:ss.SSSZ / RFC3339 |
Example of the response from the server
HTTP/1.1 200 OK
{
"bonusId": "00ed751a-a2ec-4077-beb0-db2cb795894e",
"cid": "some-brand-id",
"bonusConfigId": "6f41bd2a-4621-42e5-883c-647b8995684d",
"name": "Some Campaign Name",
"bonus": {
"betCount": 5,
"currencySettings": {
"EUR": {
"amount": 5,
"maxPromoWinAmount": 10000,
"maxBetWageringAmount": 200
},
"USD": {
"amount": 6,
"maxPromoWinAmount": 12000,
"maxBetWageringAmount": 400
}
},
"validTo": "2020-12-03T12:15:30.000Z"
}
}
| Parameter | Description | Type | Explanation |
|---|---|---|---|
| bonusId | bonus campaign identifier | string | bonus campaign unique identifier, format: uuid |
| cid | brand identifier | string | unique identifier |
| bonusConfigId | bonus configuration identifier | string | unique identifier, format: uuid |
| name | bonus campaign name | string | naming of a bonus campaign |
| bonus.betCount | amount of bonus bets | integer | bonus bets that will be granted to a player |
| bonus.currencySettings | map of currency specific settings | map | bonus bet currency, format: ISO-4217-3 |
| amount | amount of bonus bet | integer | format minor currency unit, example: 1.95$ -> 195; can't be lesser than minimal and greater than maximal bet amount for specified brand |
| maxPromoWinAmount | maximum bonus win amount | integer | format minor currency unit, example: 1.95$ -> 195; can't be greater than maximal win amount for specified brand |
| maxBetWageringAmount | maximum amount for wagering | integer | format minor currency unit, example: 1.95$ -> 195 |
| bonus.validTo | expiration period of bonus campaign | timestamp | format: yyyy-MM-dd’T’HH:mm:ss.SSSZ / RFC3339 |
/DisableBonus
Method is called to disable existing bonus campaign.
Example of the request
Request headers specified in example are required: Accept, Content-Type, X-Auth-Signature.
POST /bonus/v1/DisableBonus HTTP/1.1
Content-Type: application/json
Accept: application/json
X-Auth-Signature: <signature>
{
"bonusId": "00ed751a-a2ec-4077-beb0-db2cb795894e",
"cid": "some-brand-id"
}
| Parameter | Description | Type | Requirements | Explanation |
|---|---|---|---|---|
| bonusId | bonus campaign identifier | string | required | bonus campaign unique identifier, format: uuid |
| cid | brand identifier | string | required | unique identifier |