Bets API¶
Bet placement¶
Request parameters¶
| Stage | https://apg-s2s.online |
|---|---|
| Prod | https://apg-s2s.com |
| Path | /v1/sport/v1/bet |
| Method | POST |
| Headers | Authorization S2S API auth Content-Type: application/jsonX-Operator-Id (will be provided by GR8 Tech)X-Brand (will be provided by GR8 Tech)X-Player-Id X-Player-Currency = "USD" X-Channel = "WEB" |
| Response Codes | 200, 400, 429 |
Request¶
| Params | Data Types | Required? | Description of property | Example | Description of example |
|---|---|---|---|---|---|
| items | Array of Object | Yes | Selected outcomes for bet | ||
| items[i].eventId | GUID | Yes | Sporting event identifier | 89595c35-8798-40e4-b532-8723a45a6307 | A unique 128-bit number that can be used as an identifier |
| items[i].odds | Double | Yes | Outcomes group odd, usually it equals to the multiplication of sourceOutcomes.odds, but for BetBuilder bets it's differs | 1.97 | Decimal Odd. (Only dot separator) Price should be >= 1.01. Price should be rounded to two decimal places. |
| items[i].sourceOutcomes | Array of Object | Yes | Outcomes that are included to BetBuilder group. If it's no a BetBuilder - then there must be only 1 outcome | ||
| items[i].sourceOutcomes[j].selection | String | Yes | Outcome selection key | "[118,[2],[0],66,11,[]]" | uniqe outcome identifier |
| items[i].sourceOutcomes[j].odds | Double | Yes | Outcome odd | 1.55 | outcome odd |
| items[i].sourceOutcomes[j].dataVersion | Integer | No | Outcome version, is not required, but uses for defining if odds on FE are delaying | 1 | outcome version used for validation |
| items[i].sourceOutcomes[j].sourceFeature | String | No | Feature/page from which outcome was added to betslip. Uses for analytics purposes | used for analytical purposes | |
| amount | Double | Yes | Amount of bet | 10.5 | |
| betType | String | Yes | Possible values:["Ordinar", "Express", "System"] | "Ordinar" | Ordinar - a wager on a specific outcome of a single event. The winnings are calculated by multiplying the bet amount by the odds of the outcome. Express - a wager on multiple independent events. An express bet wins only when all of its component outcomes are successful; if even one outcome is unsuccessful, the express bet is lost. The winnings are calculated by multiplying the bet amount by the odds for all the outcomes included in the express bet." System - a collection of accumulators that represents the complete (all possible combinations) set of accumulator options of the same size from a fixed set of outcomes. A system is denoted as 'System K out of N,' where N is the total number of events (elements) included in the bet, and K is the number of events (elements) included in a single accumulator. |
| oddsChangePolicy | String | Yes | Possible values: ["Rise", "Any", "None"]. If Any - then the bet will be accepted even if odd was changed after delay. If Rise - then the bet will be accepted only if odd was not changed, or raised after delay . If None then the bet will be accepted only if odd was not changed | "Any" | Rise by default(Rise) - The player did not confirm their agreement to the reduction in odds. 2.11 -> 2.15 = Ok 2.11 -> 2.02 = Failed Any - The player confirmed their agreement to the change in odds. 2.11 -> 2.15 = Ok 2.11 -> 2.02 = Ok |
| marketChangePolicy | String | Yes | Possible values: ["None", "Update"]. Field that uses for fast changing Totals and Handicaps. For example: if player tried to place a bet on Handicap +1.5 and it his outcome was suspended after delay - we can propose to make a bet for Handicap +2.5 | "None" | market change policy (None, Update). Market can be changed during bet placement. |
| systemSize | Integer | Only if betType == "System" | Applicable only if BetType = System. | 0 | For bet type Ordinar or Express - applicable only 0. For bet type System - allowable range [2, 11]. |
| isOverask | Boolean | No | That's mean that bet was done by some VIP player and it's amount is higher than allowed limit. Processing of overask bets is rather different from usual bets processing. | ||
| transactionId | GUID | Only if useExternalBetId == true | Optional transaction identifier used in two scenarios: 1. Duplicate prevention – if transactionId is provided, the system validates that the same bet placement request has not been submitted before. A duplicate request will be rejected. 2. Custom bet identifier – if useExternalBetId = true is also specified, the provided transactionId will be assigned as betId instead of generating it automatically. This allows external systems to manage their own bet IDs. | "3fa12f74-5716-4562-b3fc-2c163f66afa1" | A unique 128-bit number that can be used as an identifier |
| useExternalBetId | Boolean | No | if this field = true - you need to pass txId | ||
| amountLimitRelative | Double | No | value of relative limit |
This parameter will be used as the betId and must be unique for each betting request.|
Example - ordinar¶
{
"items": [
{
"eventId": "SportsbookAutotesteb648b2b-ba50-475e-9af6-bf6abb4140ab",
"odds": 2.0,
"sourceOutcomes": [
{
"selection": "[2,[],[0],1,3,[]]",
"odds": 2.0,
"dataVersion": 0,
"sourceFeature": null
}
]
}],
"amount": 100.0,
"betType": "Ordinar",
"oddsChangePolicy": "Any",
"marketChangePolicy": "None",
"systemSize": 0,
"isOverask": false,
"transactionId": "432e627b-f8d1-45ef-9ae9-03632956548b"
}
Response¶
200 OK
{
"betId": "string", //bet id
"betOdd": 0, //bet odd
"betDate": "2024-04-11T11:47:37.778Z",
"offerType": "string", //if offer present in bet, BonusAmount = 0, BetCondition = 1, BetInsurance = 2, BetCollection = 3, FreeBet = 4
"possiblePayout": 0, //possible payout in case of win (amount * odd)
"items": [
{
"acceptedOdd": 0, //accepted bet odd
"sourceOutcomeSelectionKeys": [
"string" //accepted bet outcome selection key
]
}
],
"specialBetTypes": [
"string" //contains Overask if bet = overask
]
}
Example¶
{
"betId": "f894f99e-3d67-4c6b-a84c-a9e9a3c4a884",
"betOdd": 2.0,
"betDate": "2024-04-11T12:41:10.7043741Z",
"possiblePayout": 200.0,
"items": [
{
"acceptedOdd": 2.0,
"sourceOutcomeSelectionKeys": ["[2,[],[0],1,3,[]]"]
}
],
"specialBetTypes": []
}
400 - Bad Request
Example of response with common error.
{
"errors": {
"common": {
"maxBetSum": 414.51, // max amount thet allowed to place bet
"currency": "UAH", // currency Id
"overaskBetAmount": 4145.08, // the available amount for overask bet. By default 100 USD
"code": 37 // code of error
}
},
"message": "Failed to place a bet"
}
Example of response with specific error.
Section specific is obsolete. You should use specificV2 instead.
{
"errors":{
"specific":{ // This error section is deprecated, please use specificV2
"0":{
"code":42,
"marketParameter":4.5
}
},
"specificV2":[
{
"itemIndex":0, // bet item index
"code":42, // error code (see Errors section)
"sourceOutcomeIndex":0, // bet source outcome index
"marketParameter":4.5 // bet market perameter
}
]
},
"message":"Failed to place a bet"
}
General errors - possible error codes
| Code | Description |
|---|---|
| "1-Unknown" | A technical error |
| "3-CoefficientChanged" | An error occurs when changing the odds when the player did not agree with the policy of changing the odds (setting in personal account) |
| "6-MaximumAmountExceeded" | An error occurs if the number of allowed bets is exceeded |
| "10-ExpressOutcomesLowerLimit" | The error occurs when the user places an Express bet, in which the number of outcomes is less than the minimum allowed for the line in which the outcome is located. (ParlaySize). |
| "11-OrdinarBetsOnly" | The error occurs when a user places an Express/System bet on an outcome for which only Single bets are allowed. |
| "15-BetPlacementStopped" | The error occurs if it is not possible to accept bets due to: betting on this event is suspended; not an actual sport line (technical problems); an attempt to put on the calculated market; emergency stop of betting |
| "21-MinimalBetSum" | The error occurs when bet amount is less than the minimum bet amount |
| "27-TooManyBetsForEvent" | The error occurs when the user has reached the limit: by the number of bets per event. number of bets for the maximum amount. |
| "29-BetItemsDependent" | The error occurs when a bet has interdependent outcomes |
| "33-TechnicalTimeOut" | The error occurs if within 2 minutes (total time including 30 seconds) after placing a bet. Such a bet can be either accepted or rejected. |
| "34-ExpressItemsUpperBound" | The error occurs when placing an Express bet with 100 elements. |
| "42-MarketParameterChanged" | An error occurs when a market parameter has changed, but the user did not agree to changes to the market parameter. |
| "80-BetPlacementStoppedByAntiFraud" | The error occurs when a bet is rejected by the antifraud operator. |
| "93-BetAlreadyProcessed" | The error occurs when a bet is rejected because bet with the same id was processed already |
May be included in the response when the GR8 Tech wallet is used - possible error codes
| Code | Description |
|---|---|
| "63-UnverifiedPlayerBlock" | May be included in the response when the GR8 Tech wallet is used. Blocking sports bets and casino bets if the account is not verified. |
| "23-NotVerifiedUser" | User not verified by Gr8.tech player account management |
| "2-NotEnoughMoney" | May be included in the response when the GR8 Tech wallet is used. Bet is rejected due to balance is less than bet amount. |
| "25-WrongLoginPassword" | Bet is rejected due to wrong authorization credentials |
| "100-ResponsibleLimitExceeded" | May be included in the response when the GR8 Tech wallet is used. This error occurs when the Responsible Gambling – Loss Limit has been exceeded. |
May be included in the response when the OpenBet feature is turned onn - possible error codes
| Code | Description |
|---|---|
| "40-BetWasAlreadySettled" | May be included in the response when the OpenBet feature is turned on. This error occurs when the user edits a bet (Openbet) that has already been calculated. |
| "61-LimitIsExceededDuringTheAddingItems" | May be included in the response when the OpenBet feature is turned on. This error occurs when the user adds outcomes to a bet that do not comply with the bet limits. |
May be included in the response when the Overask feature is turned on - possible error codes
| Code | Description |
|---|---|
| "36-BetSumOverOverask" | May be included in the response when the Overask feature is turned on. This error occurs when the user places a bet for an amount that is greater than the maximum allowed and greater than the minimum Overask amount ($100). |
| "37-BetSumLessOverask" | May be included in the response when the Overask feature is turned on. This error occurs when the user places a bet for an amount that is less than the minimum Overask amount ($100), but more than the maximum allowed. |
| "38-DiffBetweenMaxBetBetSumLessOveraskSum" | May be included in the response when the Overask feature is turned on. This error occurs when the user places a bet for an amount that is greater than the maximum allowed and at the same time the difference between BetSum and maxBetAmount is less than the minimum amount for Overask ($100) |
| "39-OveraskDisallowed" | May be included in the response when the Overask feature is turned on. This error occurs when the Player issues an Overask in the following cases: on the outcome of a Prematch event whose start time (StartTime) is 5 minutes or less; no rights to submit Overask bids; on event for which Overask bets are prohibited. |
May be included in the response when the FreeBet bonus is turned on - possible error codes
| Code | Description |
|---|---|
| "51-InvalidFreeBet" | May be included in the response when the FreeBet bonus is turned on. Bet doesn't match some the Freebet conditions. Try to change the bet. Freebet conditions: not match minimal bet odd; no match event stage; no match bet type; no match sport type |
| "52-FreeBetExpired" | May be included in the response when the FreeBet bonus is turned on. Time is over. Freebet has expired. Try to use another one |
| "53-FreeBetAlreadyUsed" | May be included in the response when the FreeBet bonus is turned on. You can't have two bites of the apple. This Freebet is already used. Try to use another one |
| "54-FreeBetNotFound" | May be included in the response when the FreeBet bonus is turned on. We searched, but failed. There is no such Freebet. Try to use another one |
| "95-TooManyFreeBetsPerEvent" | May be included in the response when the FreeBet bonus is turned on. This error occurs when the maximum number of freebet bets on this event has been exceeded |
| "90-InvalidFreeBetEventStage" | May be included in the response when the FreeBet bonus is turned on. The error occurs when the user places a bet on a stage (Live or Prematch) that is prohibited by the free bet conditions |
| "91-InvalidFreeBetBetType" | May be included in the response when the FreeBet bonus is turned on. An error occurs when a user places a bet, but the bet type does not meet the free bet conditions. |
| "92-InvalidFreeBetSportType" | May be included in the response when the FreeBet bonus is turned on. An error occurs when a user places a bet on a sport that does not meet the terms of the free bet. |
Could be part of response if Bonus is turn on for brand - possible error codes
| Code | Description |
|---|---|
| "94-NotEnoughMoneyBonus" | Error occurs when all bonus funds cannot be used for this bet according to the bonus rate. Amount available for use main + locked +bonus*bonus Rate |
| "96-NotEnoughMoneyWithoutBonus" | Error occurs when bonus funds cannot be used for this bet. Only funds from main + locked balances can be used |
Could be part of response if BetBuilder feature is turned on for brand - possible error codes
| Code | Description |
|---|---|
| "97-BetBuilderCoefficientChanged" | An error occurs if the coefficient of the combined element has changed at the time of accepting the bet |
| "98-BetBuilderSelectionExpired" | An error occurs if one of the markets included in the combined element is not available at the time the bet is accepted |
| "99-BetBuilderNotAvailable" | The error occurs when the Bet builder is unavailable to accept a bet |
Specific codes - possible error codes
| Code |
|---|
| CoefficientChanged = 3 |
| StakeSuspended = 5 |
| OrdinarBetsOnly = 11 |
| EventStarted = 12 |
| BetParameterChanged = 14 |
| BetPlacementStopped = 15 |
| TooManyBetsForEvent = 27 |
| BetItemsDependent = 29 |
| MarketParameterChanged = 42 |
| TooManyFreeBetsPerEvent = 95 |
| UnknownEventId = 1000 |
| UnsupportedSport = 1001 |
| UnsupportedOutcomeKey = 1002 |
429 Too Many Requests Such a response can be obtained when non-functional requirements are violated.
Bet placement (without line delay)¶
Request parameters¶
| Stage | https://apg-s2s.online |
|---|---|
| Prod | https://apg-s2s.com |
| Path | /v1/sport/mts/v1/bet |
| Method | POST |
| Headers | Authorization S2S API auth Content-Type: application/jsonX-Operator-Id (will be provided by GR8 Tech)X-Brand (will be provided by GR8 Tech)X-Player-Id X-Player-Currency = "USD" X-Channel = "WEB" |
| Response Codes | 200, 400, 429 |
Request¶
| Params | Data Types | Required? | Description of property | Example | Description of example |
|---|---|---|---|---|---|
| items | Array of Object | Yes | Selected outcomes for bet | ||
| items[i].eventId | GUID | Yes | Sporting event identifier | 89595c35-8798-40e4-b532-8723a45a6307 | A unique 128-bit number that can be used as an identifier |
| items[i].odds | Double | Yes | Outcomes group odd, usually it equals to the multiplication of sourceOutcomes.odds, but for BetBuilder bets it's differs | 1.97 | Decimal Odd. (Only dot separator) Price should be >= 1.01. Price should be rounded to two decimal places. |
| items[i].sourceOutcomes | Array of Object | Yes | Outcomes that are included to BetBuilder group. If it's no a BetBuilder - then there must be only 1 outcome | ||
| items[i].sourceOutcomes[j].selection | String | Yes | Outcome selection key | "[118,[2],[0],66,11,[]]" | uniqe outcome identifier |
| items[i].sourceOutcomes[j].odds | Double | Yes | Outcome odd | 1.55 | outcome odd |
| items[i].sourceOutcomes[j].dataVersion | Integer | No | Outcome version, is not required, but uses for defining if odds on FE are delaying | 1 | outcome version used for validation |
| items[i].sourceOutcomes[j].sourceFeature | String | No | Feature/page from which outcome was added to betslip. Uses for analytics purposes | used for analytical purposes | |
| amount | Double | Yes | Amount of bet | 10.5 | |
| betType | String | Yes | Possible values:["Ordinar", "Express", "System"] | "Ordinar" | Ordinar - a wager on a specific outcome of a single event. The winnings are calculated by multiplying the bet amount by the odds of the outcome. Express - a wager on multiple independent events. An express bet wins only when all of its component outcomes are successful; if even one outcome is unsuccessful, the express bet is lost. The winnings are calculated by multiplying the bet amount by the odds for all the outcomes included in the express bet." System - a collection of accumulators that represents the complete (all possible combinations) set of accumulator options of the same size from a fixed set of outcomes. A system is denoted as 'System K out of N,' where N is the total number of events (elements) included in the bet, and K is the number of events (elements) included in a single accumulator. |
| oddsChangePolicy | String | Yes | Possible values: ["Rise", "Any", "None"]. If Any - then the bet will be accepted even if odd was changed after delay. If Rise - then the bet will be accepted only if odd was not changed, or raised after delay . If None then the bet will be accepted only if odd was not changed | "Any" | Rise by default(Rise) - The player did not confirm their agreement to the reduction in odds. 2.11 -> 2.15 = Ok 2.11 -> 2.02 = Failed Any - The player confirmed their agreement to the change in odds. 2.11 -> 2.15 = Ok 2.11 -> 2.02 = Ok |
| marketChangePolicy | String | Yes | Possible values: ["None", "Update"]. Field that uses for fast changing Totals and Handicaps. For example: if player tried to place a bet on Handicap +1.5 and it his outcome was suspended after delay - we can propose to make a bet for Handicap +2.5 | "None" | market change policy (None, Update). Market can be changed during bet placement. |
| systemSize | Integer | Only if betType == "System" | Applicable only if BetType = System. | 0 | For bet type Ordinar or Express - applicable only 0. For bet type System - allowable range [2, 11]. |
| isOverask | Boolean | No | That's mean that bet was done by some VIP player and it's amount is higher than allowed limit. Processing of overask bets is rather different from usual bets processing. | ||
| transactionId | GUID | Only if useExternalBetId == true | Transaction id, optional field, need to pass txId from UI side (need useExternalBetId true) | "3fa12f74-5716-4562-b3fc-2c163f66afa1" | A unique 128-bit number that can be used as an identifier |
| useExternalBetId | Boolean | No | if this field = true - you need to pass txId | ||
| amountLimitRelative | Double | No | value of relative limit |
This parameter will be used as the betId and must be unique for each betting request.|
Example - ordinar¶
{
"items": [
{
"eventId": "SportsbookAutotesteb648b2b-ba50-475e-9af6-bf6abb4140ab",
"odds": 2.0,
"sourceOutcomes": [
{
"selection": "[2,[],[0],1,3,[]]",
"odds": 2.0,
"dataVersion": 0,
"sourceFeature": null
}
]
}],
"amount": 100.0,
"betType": "Ordinar",
"oddsChangePolicy": "Any",
"marketChangePolicy": "None",
"systemSize": 0,
"isOverask": false,
"transactionId": "432e627b-f8d1-45ef-9ae9-03632956548b"
}
Response¶
200 OK
{
"betId": "string", //bet id
"betOdd": 0, //bet odd
"betDate": "2024-04-11T11:47:37.778Z",
"offerType": "string", //if offer present in bet, BonusAmount = 0, BetCondition = 1, BetInsurance = 2, BetCollection = 3, FreeBet = 4
"possiblePayout": 0, //possible payout in case of win (amount * odd)
"items": [
{
"acceptedOdd": 0, //accepted bet odd
"sourceOutcomeSelectionKeys": [
"string" //accepted bet outcome selection key
]
}
],
"specialBetTypes": [
"string" //contains Overask if bet = overask
]
}
Example¶
{
"betId": "f894f99e-3d67-4c6b-a84c-a9e9a3c4a884",
"betOdd": 2.0,
"betDate": "2024-04-11T12:41:10.7043741Z",
"possiblePayout": 200.0,
"items": [
{
"acceptedOdd": 2.0,
"sourceOutcomeSelectionKeys": ["[2,[],[0],1,3,[]]"]
}
],
"specialBetTypes": []
}
400 - Bad Request
Example of response with common error.
{
"errors": {
"common": {
"maxBetSum": 414.51, // max amount thet allowed to place bet
"currency": "UAH", // currency Id
"overaskBetAmount": 4145.08, // the available amount for overask bet. By default 100 USD
"code": 37 // code of error
}
},
"message": "Failed to place a bet"
}
Example of response with specific error.
Section specific is obsolete. You should use specificV2 instead.
{
"errors":{
"specific":{ // This error section is deprecated, please use specificV2
"0":{
"code":42,
"marketParameter":4.5
}
},
"specificV2":[
{
"itemIndex":0, // bet item index
"code":42, // error code (see Errors section)
"sourceOutcomeIndex":0, // bet source outcome index
"marketParameter":4.5 // bet market perameter
}
]
},
"message":"Failed to place a bet"
}
General errors - possible error codes
| Code | Description |
|---|---|
| "1-Unknown" | A technical error |
| "3-CoefficientChanged" | An error occurs when changing the odds when the player did not agree with the policy of changing the odds (setting in personal account) |
| "6-MaximumAmountExceeded" | An error occurs if the number of allowed bets is exceeded |
| "10-ExpressOutcomesLowerLimit" | The error occurs when the user places an Express bet, in which the number of outcomes is less than the minimum allowed for the line in which the outcome is located. (ParlaySize). |
| "11-OrdinarBetsOnly" | The error occurs when a user places an Express/System bet on an outcome for which only Single bets are allowed. |
| "15-BetPlacementStopped" | The error occurs if it is not possible to accept bets due to: betting on this event is suspended; not an actual sport line (technical problems); an attempt to put on the calculated market; emergency stop of betting |
| "21-MinimalBetSum" | The error occurs when bet amount is less than the minimum bet amount |
| "27-TooManyBetsForEvent" | The error occurs when the user has reached the limit: by the number of bets per event. number of bets for the maximum amount. |
| "29-BetItemsDependent" | The error occurs when a bet has interdependent outcomes |
| "33-TechnicalTimeOut" | The error occurs if within 2 minutes (total time including 30 seconds) after placing a bet. Such a bet can be either accepted or rejected. |
| "34-ExpressItemsUpperBound" | The error occurs when placing an Express bet with 100 elements. |
| "42-MarketParameterChanged" | An error occurs when a market parameter has changed, but the user did not agree to changes to the market parameter. |
| "80-BetPlacementStoppedByAntiFraud" | The error occurs when a bet is rejected by the antifraud operator. |
| "93-BetAlreadyProcessed" | The error occurs when a bet is rejected because bet with the same id was processed already |
May be included in the response when the GR8 Tech wallet is used - possible error codes
| Code | Description |
|---|---|
| "63-UnverifiedPlayerBlock" | May be included in the response when the GR8 Tech wallet is used. Blocking sports bets and casino bets if the account is not verified. |
| "23-NotVerifiedUser" | User not verified by Gr8.tech player account management |
| "2-NotEnoughMoney" | May be included in the response when the GR8 Tech wallet is used. Bet is rejected due to balance is less than bet amount. |
| "25-WrongLoginPassword" | Bet is rejected due to wrong authorization credentials |
| "100-ResponsibleLimitExceeded" | May be included in the response when the GR8 Tech wallet is used. This error occurs when the Responsible Gambling – Loss Limit has been exceeded. |
May be included in the response when the OpenBet feature is turned onn - possible error codes
| Code | Description |
|---|---|
| "40-BetWasAlreadySettled" | May be included in the response when the OpenBet feature is turned on. This error occurs when the user edits a bet (Openbet) that has already been calculated. |
| "61-LimitIsExceededDuringTheAddingItems" | May be included in the response when the OpenBet feature is turned on. This error occurs when the user adds outcomes to a bet that do not comply with the bet limits. |
May be included in the response when the Overask feature is turned on - possible error codes
| Code | Description |
|---|---|
| "36-BetSumOverOverask" | May be included in the response when the Overask feature is turned on. This error occurs when the user places a bet for an amount that is greater than the maximum allowed and greater than the minimum Overask amount ($100). |
| "37-BetSumLessOverask" | May be included in the response when the Overask feature is turned on. This error occurs when the user places a bet for an amount that is less than the minimum Overask amount ($100), but more than the maximum allowed. |
| "38-DiffBetweenMaxBetBetSumLessOveraskSum" | May be included in the response when the Overask feature is turned on. This error occurs when the user places a bet for an amount that is greater than the maximum allowed and at the same time the difference between BetSum and maxBetAmount is less than the minimum amount for Overask ($100) |
| "39-OveraskDisallowed" | May be included in the response when the Overask feature is turned on. This error occurs when the Player issues an Overask in the following cases: on the outcome of a Prematch event whose start time (StartTime) is 5 minutes or less; no rights to submit Overask bids; on event for which Overask bets are prohibited. |
May be included in the response when the FreeBet bonus is turned on - possible error codes
| Code | Description |
|---|---|
| "51-InvalidFreeBet" | May be included in the response when the FreeBet bonus is turned on. Bet doesn't match some the Freebet conditions. Try to change the bet. Freebet conditions: not match minimal bet odd; no match event stage; no match bet type; no match sport type |
| "52-FreeBetExpired" | May be included in the response when the FreeBet bonus is turned on. Time is over. Freebet has expired. Try to use another one |
| "53-FreeBetAlreadyUsed" | May be included in the response when the FreeBet bonus is turned on. You can't have two bites of the apple. This Freebet is already used. Try to use another one |
| "54-FreeBetNotFound" | May be included in the response when the FreeBet bonus is turned on. We searched, but failed. There is no such Freebet. Try to use another one |
| "95-TooManyFreeBetsPerEvent" | May be included in the response when the FreeBet bonus is turned on. This error occurs when the maximum number of freebet bets on this event has been exceeded |
| "90-InvalidFreeBetEventStage" | May be included in the response when the FreeBet bonus is turned on. The error occurs when the user places a bet on a stage (Live or Prematch) that is prohibited by the free bet conditions |
| "91-InvalidFreeBetBetType" | May be included in the response when the FreeBet bonus is turned on. An error occurs when a user places a bet, but the bet type does not meet the free bet conditions. |
| "92-InvalidFreeBetSportType" | May be included in the response when the FreeBet bonus is turned on. An error occurs when a user places a bet on a sport that does not meet the terms of the free bet. |
Could be part of response if Bonus is turn on for brand - possible error codes
| Code | Description |
|---|---|
| "94-NotEnoughMoneyBonus" | Error occurs when all bonus funds cannot be used for this bet according to the bonus rate. Amount available for use main + locked +bonus*bonus Rate |
| "96-NotEnoughMoneyWithoutBonus" | Error occurs when bonus funds cannot be used for this bet. Only funds from main + locked balances can be used |
Could be part of response if BetBuilder feature is turned on for brand - possible error codes
| Code | Description |
|---|---|
| "97-BetBuilderCoefficientChanged" | An error occurs if the coefficient of the combined element has changed at the time of accepting the bet |
| "98-BetBuilderSelectionExpired" | An error occurs if one of the markets included in the combined element is not available at the time the bet is accepted |
| "99-BetBuilderNotAvailable" | The error occurs when the Bet builder is unavailable to accept a bet |
Specific codes - possible error codes
| Code |
|---|
| CoefficientChanged = 3 |
| StakeSuspended = 5 |
| OrdinarBetsOnly = 11 |
| EventStarted = 12 |
| BetParameterChanged = 14 |
| BetPlacementStopped = 15 |
| TooManyBetsForEvent = 27 |
| BetItemsDependent = 29 |
| MarketParameterChanged = 42 |
| TooManyFreeBetsPerEvent = 95 |
| UnknownEventId = 1000 |
| UnsupportedSport = 1001 |
| UnsupportedOutcomeKey = 1002 |
429 Too Many Requests Such a response can be obtained when non-functional requirements are violated.
Getting max amount of bet¶
To calculate the maximum bet amount based on current limits and boundaries, perform the following request
Request parameters¶
| Stage | https://apg-s2s.online |
|---|---|
| Prod | https://apg-s2s.com |
| Path | /v1/sport/v1/bet/max-amount |
| Method | POST |
| Headers | Authorization S2S API auth Content-Type: application/jsonX-Operator-Id (will be provided by GR8 Tech)X-Brand (will be provided by GR8 Tech)X-Player-IdX-Player-CurrencyX-Channel: MOBILE_WEB |
| Response Codes | 200, 400, 422, 429 |
Request body¶
| Params | Data Types | Description of property | Example | Description of example |
|---|---|---|---|---|
| items | Array | Selected outcomes for bet | ||
| items[i].eventId | GUID | Sporting event identifier | 89595c35-8798-40e4-b532-8723a45a6307 | A unique 128-bit number that can be used as an identifier |
| items[i].odds | Double | Bet odd | 1.97 | Decimal Odd. (Only dot separator) Price should be >= 1.01. Price should be rounded to two decimal places. |
| items[i].sourceOutcomes | Array of Object | |||
| items[i].sourceOutcomes[j].selection | String | outcome selection key | "[118,[2],[0],66,11,[]]" | uniqe outcome identifier |
| items[i].sourceOutcomes[j].odds | Double | outcome odd | 1.55 | outcome odd |
| items[i].sourceOutcomes[j].dataVersion | Integer | outcome version | 1 | outcome version used for validation |
| items[i].sourceOutcomes[j].sourceFeature | String | optional field, left null | used for analytical purposes | |
| amount | Double | Amount of bet | 10.5 | |
| betType | String | Possible values:["Ordinar", "Express", "System"] | "Ordinar" | Ordinar - a wager on a specific outcome of a single event. The winnings are calculated by multiplying the bet amount by the odds of the outcome. Express - a wager on multiple independent events. An express bet wins only when all of its component outcomes are successful; if even one outcome is unsuccessful, the express bet is lost. The winnings are calculated by multiplying the bet amount by the odds for all the outcomes included in the express bet." System - a collection of accumulators that represents the complete (all possible combinations) set of accumulator options of the same size from a fixed set of outcomes. A system is denoted as 'System K out of N,' where N is the total number of events (elements) included in the bet, and K is the number of events (elements) included in a single accumulator. |
| oddsChangePolicy | String | Possible values: ["Rise", "Any"] | "Any" | None - by default(Rise). Rise - The player did not confirm their agreement to the reduction in odds. 2.11 -> 2.15 = Ok 2.11 -> 2.02 = Failed Any - The player confirmed their agreement to the change in odds. 2.11 -> 2.15 = Ok 2.11 -> 2.02 = Ok |
| marketChangePolicy | String | "None" | market change policy (None, Update). Market can be changed during bet placement. | |
| systemSize | Integer | Applicable only if BetType = System. | 0 | For bet type Ordinar or Express - applicable only 0. For bet type System - allowable range [2, 11]. |
| isOverask | Boolean | if bet = overask - set this field to true | ||
| transactionid | GUID | Transaction id, optional field, need to pass txId from UI side (need useExternalBetId true) | "3fa12f74-5716-4562-b3fc-2c163f66afa1" | A unique 128-bit number that can be used as an identifier |
| useExternalBet | Boolean | if this field = true - you need to pass txId |
This parameter will be used as the betId and must be unique for each betting request.|
200 - Successful response
| Params | Data Types | Description of property | Example | Description of example |
|---|---|---|---|---|
| maxBet | Double | The maximum amount for the selected bet. | 50 | |
| isVipEnabled | Boolean | Show if VIP mode enabled | false | |
| reason | String | Reason description |
400 - Bad Request
| Params | Data Types | Description of property | Example | Description of example | ||
|---|---|---|---|---|---|---|
| errors | Map | Information about validation error | ||||
| Key of map | String | Name of invalid parameter | "Currency" | |||
| Value of map | Array of String | Array descriptions of validation problem. | [ "The Currency field is required." ] |
422 - Unprocessable Entity
| Params | Data Types | Description of property | Example | Description of example |
|---|---|---|---|---|
| errors | Object | Information about error | ||
| errors.common | Object or null/undefined | |||
| errors.common.code | Integer | Information about the reason for rejection. | 1 | 1-Unknown |
| errors.specific | Array or null/undefined | Information about the reason for rejection for specific outcomes. | ||
| errors.specific.code | Integer | 1 | ||
| errors.specific.itemIndex | Integer | The index of the problematic outcome from the "items" array. | 0 | Allowable range: [0, 100) |
| Possible specific errors |
|---|
| UnknownEventId = 1000 |
| UnsupportedSport = 1001 |
| UnsupportedOutcomeKey = 1002 |
429 - Too Many Requests Such a response can be obtained when non-functional requirements are violated.
Return bet¶
Request parameters¶
| Stage | https://apg-s2s.online |
|---|---|
| Prod | https://apg-s2s.com |
| Path | /v1/sport/v1/bet/return/{betId} |
| Method | PUT |
| Headers | Authorization S2S API auth Content-Type: application/jsonX-Operator-Id (will be provided by GR8 Tech)X-Brand (will be provided by GR8 Tech)Comment |
| Response Codes | 200, 400, 429 |
| URL Params | Data Type | Description of property | Example | Description of example |
|---|---|---|---|---|
| betId | GUID | Place bet identifier | 2fa85f74-5717-4562-b3fc-2c963f66afa1 | A unique 128-bit number that can be used as an identifier |
400 Bad Request
| Params | Data Types | Description of property | Example | Description of example | ||
|---|---|---|---|---|---|---|
| errors | Map | Information about validation error | ||||
| Key of map | String | Name of invalid parameter | "betId" | |||
| Value of map | Array of String | Array descriptions of validation problem. | [ "The betId field is UUID." ] |
429 Too Many Requests Such a response can be obtained when non-functional requirements are violated.
Set Player Limit multiplier¶
Request parameters¶
| Stage | https://apg-s2s.online |
|---|---|
| Prod | https://apg-s2s.com |
| Path | /v1/sport/v1/players/{playerId}/limits |
| Method | PUT |
| Headers | Authorization S2S API auth Content-Type: application/jsonX-Operator-Id (will be provided by GR8 Tech)X-Brand (will be provided by GR8 Tech)Comment |
| Response Codes | 200, 400, 429 |
| URL Params | Data Type | Description of property | Example | Description of example |
|---|---|---|---|---|
| prematchAmountLimitRelative | double | Player limit relativ (multiplier) for prematch | 2.1 | limit multiplier value for prematch |
| liveAmountLimitRelative | double | Player limit relativ (multiplier) for live | 1.8 | limit multiplier value for prematch |
Add Player¶
Request parameters¶
| Stage | https://apg-s2s.online |
|---|---|
| Prod | https://apg-s2s.com |
| Path | /v1/pam/v1/registration/iframe |
| Method | POST |
| Headers | Authorization S2S API auth Content-Type: application/jsonX-Operator-Id (will be provided by GR8 Tech)X-Brand (will be provided by GR8 Tech)Comment |
| Response Codes | 200, 400, 429 |
| Body Params | Data Type | Description of property | Example |
|---|---|---|---|
| externalUserId | playerId | player identificator GUID | "33dd1450-e250-4fb4-896c-0d987d4fde9f" |
| operatorUserId | string | player identificator (string, minumum 3 symbols) | "56435344" |
| operatorUserName | string | player name (string) | "TestUser778" |
| formName (should be "IFRAMEFORM") | form name for player validation | IFRAME - form with minimal validation | "IFRAMEFORM" |
| defaultCurrency (should be "USD") | string | currency - should be "USD" | "USD" |