2.2. GetBetByReference

This method will retrieve a single bet ticket placed by the user using a betreference issued by PlaceBetmethod.

There are instances that bet tickets may have same Bet Reference, example if a bet was placed on a match twice which has same home and away name, match name , bookie and odds. This method will show both bets. The differentiating factor is the bet ticket creation date. The latest bet placed will be placed on top of the list.

 

Request

Method

URL

Method

URL

GET

/AsianOddsService/GetBetByReference?betReference=<BetReference>

Type

Params

Values

Type

Params

Values

HEADER

AOToken

string

HEADER

Accept

application/json

QUERY STRING

betReference

BetReference issued by the PlaceBet

 

Request Values

Value

What is this for

Value

What is this for

AOToken

Token generated also by the Login method. This token identifies which user is requesting or executing the API Method. This has to be sent for all of the request except during execution of the Login method

accept

application/json

betReference

Bet Reference parameter issued by the PlaceBet method after the bet has been placed.

 

Response Values

Value

What is this for

Value

What is this for

AwayName

Away Name of the team

AwayScore

Score of the Away Team

BetPlacementMessage

Message provided by the bookie upon placing the bets.

BetPlacementReference

Reference of the BetPlacement. This is the same BetPlacementReference provided when placing the bet. Developers can use this to determine what is the status of the bet. BetReference always starts with WA- followed by the reference number (or your own reference ID, if you have added PlaceBetId when you placed the bet.)

BetType

What type of bet this is. Example, this could be for Handicap Away.

Currency

Shows the currency used to place the bet.

FullTimeAwayScore

Full time away score.

FullTimeHomeScore

Full time home score.

GameType

Type of game the bet was placed.

HalfTimeAwayScore

Half time away score

HalfTimeHomeScore

Half time home score.

HdpOrGoal

Handicap or Goal Number

HomeName

Home name of the team

HomeScore

Score of the Home Team

KickoffTime

Kick off time. Milliseconds since last epoch

LeagueName

Name of League where the bet was placed.

Odds

Odds of the game when the bet was placed

OddsType

Type of the odds.

ReferenceNumber

Reference number when bet has been placed. This will have a value when it has been successfully placed on the bookie.

Bookie

Bookie the bet was placed

SportsType

Type of sports. 1 for football, 2 for basketball

Status

Status of the bet, if its in Running state, etc.

Term

Halftime or FullTime Details

TicketDate

The date when this has been created

Code

Holds the status of the response. If its 0, then it is successful. Negative values indicate failure

Stake

Shows how much stake was placed

 

Sample JSON Response

Response Type

Response

Response Type

Response

Success

{
"Code": 0,
"Result": {
"AwayName": "Arsenal",
"AwayScore": "-1",
"BetPlacementMessage": null,
"BetPlacementReference": "WA-112988918",
"BetType": "HDP Home",
"Bookie": "SIN",
"Currency": "EUR",
"FullTimeAwayScore": "0",
"FullTimeHomeScore": "0",
"GameType": "Handicap",
"HalfTimeAwayScore": "0",
"HalfTimeHomeScore": "0",
"HdpOrGoal": "0",
"HomeName": "Manchester United",
"HomeScore": "-1",
"KickoffTime": 1479558600000,
"LeagueName": "*ENGLISH PREMIER LEAGUE",
"Odds": 0.8,
"OddsType": "MY",
"ReferenceNumber": "15634975525",
"SportsType": 1,
"Stake": 2,
"Status": "Running",
"Term": "FT",
"TicketDate": 1479395384000
}
}

Fail

{
"Code": -1,
"Data": []
}