4.3. GetMatches

This method retrieves the list of matches available on the system.

 

Request

Method

URL

Method

URL

GET

/AsianOddsService/GetMatches?sportsType={SportsType}&marketTypeId={MarketTypeId}&bookies={ALL|List of BookieID}&leagues={ALL|list of leagueId}&since={since}

Type

Params

Values

Type

Params

Values

HEADER

AOToken

string

HEADER

Accept

application/json

QUERY STRING

bookies

string

QUERY STRING

sportsType

int

QUERY STRING

leagues

String

QUERY STRING

marketTypeId

Int

QUERY STRING

since

long

 

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 orexecuting the API Method. This has to be sent for all of the request except during execution of the Login method

accept

application/json

bookies (optional)

List of BookieID separated by comma(,). If you want all bookies, then please use ALL keyword. Note that this is an optional field and without any value means that you have chosen ALL bookies.

sportsType (optional)

Type of sports of which leagues to display. If none specified, all will be shown. SportsType can be retrieved by calling GetSports.

Leagues (optional)

List of leagueID separated by comma(,). If you want all leagues, then either leave this empty or use ALL keyword.

marketTypeId (required)

MarketTypeId refers to the type of market. Valid Values are {0,1,2}
0 : Live Market
1 : Today Market
2 : Early Market
If MarketTypeId is not specified, then 0 is the default value.

since (optional)

Since is a delta switch. The value expected is a milliseconds since last epoch. When specified,the data returned are only the data that was generated since the value of this. This is normally used to return subset of data that have been updated.
When this parameter is not specified then all of the data will be returned.

 

Response Values

Value

What is this for

Value

What is this for

Code

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

Away

Away Name

Home

Home Name

Since

Last Update of a specific event in milliseconds since last epoch

MarketType

Market Type in text. Values is “Live”, “Today” or “Early”

MarketTypeId

The ID of the market. This is 0 for Live, 1 for Today and 2 for early.

MatchId

Identification of the Match

StartTime

StartTime or Kickoff Time in Milliseconds since last Epoch.

StartsOn

A converted date/time string of the StartTime

SportsType

SportsType ID

Bookies

List of bookies with this match

IsLive

1 if the match is live, 0 if otherwise

 

Sample JSON Response

Response Type

Response

Response Type

Response

Success

{
"Code": 0,
"Result": {
"EventSportsTypes": [
{
"Events": [
{
"Away": "Club Ciclista Olimpico",
"Bookies": [
"ISN",
"SBO",
"IBC",
"PIN",
"SIN"
],
"Home": "Asociacion Atletica Quimsa",
"IsLive": 1,
"LeagueId": 1578895411,
"LeagueName": "ARGENTINA NATIONAL BASKETBALL LEAGUE",
"MarketType": "Live",
"MarketTypeId": 0,
"MatchId": -62010984,
"Since": 1475718011401,
"StartTime": 1475712000000,
"StartsOn": "10/06/2016 12:00:00.000 AM"
},
{
"Away": "San Lorenzo de Almagro",
"Bookies": [
"ISN",
"SBO",
"IBC",
"PIN",
"SIN"
],
"Home": "Gimnasia y Esgrima",
"IsLive": 1,
"LeagueId": 1578895411,
"LeagueName": "ARGENTINA NATIONAL BASKETBALL LEAGUE",
"MarketType": "Live",
"MarketTypeId": 0,
"MatchId": -922869538,
"Since": 1475718011406,
"StartTime": 1475712000000,
"StartsOn": "10/06/2016 12:00:00.000 AM"
}
],
"SportsType": 2
}
]
}
}

Fail

{
"Code": -1,
"Result": null
}