Bet Placement API
This endpoint allows clients to submit requests for placing bets. Clients must include all relevant information related to the bet, such as the type of bet, stake amount, and selection details.
Endpoint: v1/bet/placement
Method: POST
Headers:
| Name | Description |
|---|---|
| x-client-id | A static client id will be assigned to you upon request. |
| x-api-key | We will provide you with an api key to be able to call the API. |
The payload request should contain JSON data structured according to the API specifications. Here’s an example of a payload request:
{
"betId": "3CB3CFB9-20AC-4AB5-BD15-67E5D78DD960",
"userId": "123456",
"stake": 5.0,
"oddsType": 0,
"oddsChangeType": 1,
"currencyCode": "USD",
"channel": 0,
"betDate": "2024-03-11T05:41:31.451Z",
"ipAddress": "192.168.1.1",
"ipAddressV6": "::ffff:c0a8:101",
"selections": [
{
"fixtureSpecifier": "sr:match:48588059",
"marketSpecifier": "total=88.5",
"marketTemplateId": "238",
"selectionTemplateId": "12",
"odds": 2.0
}
]
}
Properties:
| Name | Type | Description |
|---|---|---|
| betId | string | Unique id of the bet |
| userId | string | Unique id of the user |
| stake | decimal | Amount the player placed on a bet |
| oddsType | int | See Odds Type for more details. |
| oddsChangeType | int | See Odds Change Type for more details. |
| currencyCode | string | Currency the player is using |
| channel | int | Channel on where the bet was placed. |
| betDate | datetime | Date on when the bet was placed. |
| ipAddress | string | IP Address of the player |
| ipAddressV6 | string | IP Address V6 of the player |
| selections | List<Selection> | See Selection Model for more details |
| Name | Type | Description |
|---|---|---|
| fixtureSpecifier | string | Unique id of the fixture |
| marketSpecifier | string | Unique market specifier |
| marketTemplateId | string | Template id of the market |
| selectionTemplateId | string | Template id of the selection |
| odds | decimal | Odds on when the bet was placed |
The request would go through a pre-validation process wherein it will check if the request is valid and correct. If valid, the API will return a successful payload response containing a betStatusId value of 1000 (Waiting).
The payload response will contain status of the bet including the odds and stakes in every selections:
{
"statusCode": 100,
"message": "Success",
"result": {
"generatedBetId": "BDEAE2E7-442E-4276-BCC6-08DCC741FD5E",
"userId": "TSO-15678",
"betId": "E9C8636F-0A0B-4D5C-95B6-16084C91A30C",
"betStatusId": 1000,
"betStatusName": "Waiting",
"stake": 50.00,
"totalOdds": 2.57,
"betSelections": [
{
"statusCode": 100,
"message": "Success",
"fixtureSpecifier": "sr:match:52784995",
"marketSpecifier": "",
"marketTemplateId": "1",
"selectionTemplateId": "1",
"odds": 2.57
}
]
}
}
Properties
| Name | Type | Description |
|---|---|---|
| statusCode | int | Status code of the payload request |
| message | string | Reason why the request was rejected. |
| result | List<Bet> | See Bet Model for more details |
| Name | Type | Description |
|---|---|---|
| userId | string | Unique id of the user |
| generatedBetId | string | System generated unique id on our side. (will be used in searching in reports) |
| betId | string | Unique id of the bet |
| betStatusId | int | See Bet Status for more details. |
| betStatusName | string | See Bet Status for more details. |
| stake | decimal | Amount the player placed on a bet |
| betSelections | List<BetSelection> | See Selection Model for more details |
| Name | Type | Description |
|---|---|---|
| statusCode | int | Determines if the selection is valid or not |
| message | string | Show the reason the message is invalid or shows a successful message. |
| fixtureSpecifier | string | Unique id of the fixture |
| marketSpecifier | string | Unique market specifier |
| marketTemplateId | string | Template id of the market |
| selectionTemplateId | string | Template id of the selection |
| odds | decimal | Odds on when the bet was placed |
Once the bet placement request has been internally processed and is valid, the API sends a response to a callback URL provided by the client. This callback response contains information about the status of the request.
- Running status: if the request is accepted and processed successfully, the callback response will include a status of “Running”. This indicates that the bet placement or cashout request has been successfully executed.
- Rejected status: if the request is rejected due to validation errors or other issues, the callback response will include a status of “Rejected”. This indicates that the bet placement or cashout request could not be processed as requested.
To allow us to deliver data, you need to setup your own API endpoint that exposes the following route:
Endpoint: /bet/status/placement
Method: POST
The payload request should contain JSON data structured according to the API specifications. Here’s an example of a payload request:
{
"generatedBetId": "2C922B2D-7F97-4DB5-6203-08DCC7478FE2",
"betId": "7B337436-1A5F-42D7-0DBC-08DCC62915EA",
"betStatusId": 2000,
"betStatusName": "Running",
"reason": "1024 - Ticket accepted (MTS)",
"action": "PLACEBET",
"timestamp": "2024-08-28T09:55:37.2566921Z",
"betSelections": [
{
"marketTemplateId": "223",
"selectionTemplateId": "1714",
"odds": 1.78,
"fixtureSpecifier": "sr:match:52861055",
"marketSpecifier": "hcp=4.5"
}
]
}
Properties:
| Name | Type | Description |
|---|---|---|
| betId | string | Unique id of the bet |
| generatedBetId | string | System generated unique id on our side. (will be used in searching in reports) |
| betStatusId | int | See Bet Status for more details. |
| betStatusName | string | See Bet Status for more details. |
| reason | string | Reason why the bet was accepted or rejected. |
| action | string | for the Bet Placement validation, the value would always be “PLACEBET”. |
| timestamp | datetime | Timestamp on when the bet was accepted or rejected. |
| betSelections | List<BetSelectionRequest> | See SelectionRequest Model for more details |
| Name | Type | Description |
|---|---|---|
| MarketTemplateId | string | Template id of the market |
| SelectionTemplateId | string | Template id of the selection |
| Odds | decimal | Odds on when the bet was accepted |
| FixtureSpecifier | string | Unique id of the fixture |
| MarketSpecifier | string | Unique id of the market |
| SelectionSpecifier | string | Unique id of the selection |
Once we receive a response from your endpoint, the payload response should contain a JSON data structure as shown in below:
Code: 200 (OK)
{
"statusId": 1000,
"message": "Success"
}
Properties:
| Name | Type | Description |
|---|---|---|
| statusId | int | Indicates the status of the request |
| message | string (optional) | status message |
Code: Bad Request (400)
{
"statusId": 1003,
"message": "Error encountered when placing a bet"
}
Properties
| Name | Type | Description |
|---|---|---|
| statusId | int | Indicates the status of the request |
| message | string | status message (you can place here what is the error encountered) |