Push Feed to customer endpoint
https://[Partner-Name].racebookhq.com/api/host/betslip/record
The record function is the final bet that the customer placed. These details can be used for liability and profiling purposes.
the format and submission of the api is similar to the bet limit api with regards to the fields.
the BetslipSubmission uses the record function API and its definition is listed below
Field | Type | Description | Comment |
---|---|---|---|
id | String | Partner betslip id | |
customerId | String | Partner customer id. | This must also be present on the bet level since RBHQ also handles bets without betslips by configuration. |
submissionTime | String | ISO fomat | Must also be the same time in each bet. |
bets | List[BetSubmission] |
The following definition is for the list of bets in BetslipSubmission
BetSubmission
Field | Type | Description | Comment |
---|---|---|---|
id | String | Partner transaction id | |
customerId | String | Partner customer id | |
customerMeta | Map[String, String] | Optional map of customer related data | Optional field to provide more |
type | String | The type of bet [RUNNING_DOUBLE, TREBLE, DAILY_DOUBLE, SINGLE, MULTI, QUADRELLA] | |
stake | String | The amount specified for the bet. Formatted decimal | |
stakeType | String | The stake type [CREDIT, BONUS, OTHER] | |
currency | String | The currency the transactions are in. | We do not do currency conversions, this must be consistent across all bets. |
submissionTime | String | The ISO format time of submission. | OPTIONAL for Bet Limit, REQUIRED for Betslip Decision and Betslip record |
legs | List[LegSubmission] |
Within the List for legs in BetslipSubmission - submit the legsSubmission for each leg
LegSubmission
Definition
Field | Type | Description | Comment |
---|---|---|---|
id | String | Partner transient id. | |
type | String | The type of the leg [WIN, PLACE] | More types can come later. E.g EACH_WAY, TRIFECTA,… |
eventId | String | The unique Racebook event id. | Provided by RBHQ in event creation |
selectionSlots | List[SelectionSlot] | The object specifying the selection | Racing bets only require SELECTION slots. WIN and PLACE only have 1 selection slot. |
prices | Map[String, String] | Map of bet tag to price. | Win and place will only have * mapped to a price since there is 1 universal price. Fixed odds exotics will be a distribution. |
productType | String | The product type of the bet [FIXED_ODDS, PARIMUTUEL] | Use FIXED_ODDS |
productDerivative | String | Derivative product code [SP, BT3SP] |
Within the List for SelectionSlot in LegSubmission - submit as per below definition
SelectionSlot
Definition
Field | Type | Description | Comment |
---|---|---|---|
selections | List[String] | The runner numbers for the leg. | WIN and PLACE will only have 1 selection. |
type | String | The type of selection slot. [SELECTION, MARKET,…] | Racing only uses SELECTION types. |
RESPONSE
Responses can be ignored as its a submission to RBHQ for the bet. There may be responses provided in longformat but ingestion of this data is not required.
{
"id": "slip1",
"customerId": "test1",
"submissionTime": "2021-04-15T05:12:23.664392+00:00",
"bets": [
{
"id": "b1",
"customerId": "test1",
"customerMeta": {
"residence": "AU"
},
"type": "SINGLE",
"stake": "500.00",
"stakeType": "CREDIT",
"currency": "USD",
"submissionTime": "2021-04-15T05:12:23.664392+00:00",
"legs": [
{
"id": "l1",
"type": "WIN",
"eventId": "test:race1",
"selectionSlots": [
{
"selections": [
"1"
],
"type": "SELECTION"
}
],
"prices": {
"*": "5.00"
},
"productType": "FIXED_ODDS"
}
]
},
{
"id": "b2",
"customerId": "test1",
"type": "SINGLE",
"stake": "5.50",
"stakeType": "CREDIT",
"currency": "USD",
"submissionTime": "2021-04-15T05:12:23.664392+00:00",
"legs": [
{
"id": "l2",
"type": "PLACE",
"eventId": "test:race1",
"selectionSlots": [
{
"selections": [
"1"
],
"type": "SELECTION"
}
],
"prices": {
"*": "1.75"
},
"productType": "FIXED_ODDS"
}
]
}
]
}