Results API
Overview

Results API


Version: 2.0

The William Hill Results API is a Private API and therefore not automatically available to developers. To use this API, contact your business manager who will guide you through the separate Terms and Conditions of use before you can have the API assigned to your application.
Summary
Method Name Description Resource
getCompetition This method is used to get a competition by competitionId. (Non-Racing) https://sandbox.whapi.com/v2/results/competitions/{competitionId}
getCompetitionEvents This method is used to get a list of events for a competition by competitionId. (Non-Racing) https://sandbox.whapi.com/v2/results/competitions/{competitionId}/events
getEvent This method is used to get a non-racing event by eventId. (Non-Racing) https://sandbox.whapi.com/v2/results/events/{eventId}
getEventMarket This method is used to get a market by marketId. (Non-Racing) https://sandbox.whapi.com/v2/results/markets/{marketId}
getEventMarketCollections This method is used to get market-collections for an event. (Non-Racing) https://sandbox.whapi.com/v2/results/events/{eventId}/markets/collections
getEventMarketSelections This method is used to get selections for a market by marketId. (Non-Racing) https://sandbox.whapi.com/v2/results/markets/{marketId}/selections
getEventMarkets This method is used to get non-racing markets for an event by eventId. (Non-Racing) https://sandbox.whapi.com/v2/results/events/{eventId}/markets
getMeetingEvents This method is used to get meeting-events for a meeting by meetingId. A meeting event is a race and racecard if isRaceCard = true otherwise it is a tournament object. All these objects share the same ID as meeting-event-id - i.e. tournament.id = race.id = meetingEvent.id and race and racecard are 1-to-1 racecard contains more detailed data for a race) (RACING ONLY) https://sandbox.whapi.com/v2/results/meetings/{meetingId}/meetingEvents
getRace This method is used to get a race by raceId. (RACING ONLY) https://sandbox.whapi.com/v2/results/races/{raceId}
getRacecard This method is used to get a racecard for a race by raceId. (RACING ONLY) https://sandbox.whapi.com/v2/results/races/{raceId}/racecard
getSport This method is used to get the corresponding sport object by sportId. https://sandbox.whapi.com/v2/results/sports/{sportId}
getSportCompetitions This method is used to get a list of non-racing competitions for a sport by sportId. (NON-RACING) https://sandbox.whapi.com/v2/results/sports/{sportId}/competitions
getSportMeeting This method is used to get a meeting by meetingId. (RACING ONLY) https://sandbox.whapi.com/v2/results/meetings/{meetingId}
getSportMeetings This method is used to get race meetings for a sport by sportId. e.g. horse racing or dog racing. (RACING ONLY) https://sandbox.whapi.com/v2/results/sports/{sportId}/meetings
getSports This method is used to return a list of sports. https://sandbox.whapi.com/v2/results/sports
getTournament This method is used to get a tournament by tournamentId. (RACING ONLY) https://sandbox.whapi.com/v2/results/tournaments/{tournamentId}
getTournamentMarket This method is used to get a tournament-markets tournamentMarketId. (RACING ONLY) https://sandbox.whapi.com/v2/results/tournamentMarkets/{tournamentMarketId}
getTournamentMarketCollections This method is used to get market-collections for a tournament by tournamentId. (RACING ONLY) https://sandbox.whapi.com/v2/results/tournaments/{tournamentId}/markets/collections
getTournamentMarketSelections This method is used to get selections for a tournament by tournamentId. (RACING ONLY) https://sandbox.whapi.com/v2/results/tournamentMarkets/{tournamentMarketId}/selections
getTournamentMarkets This method is used to get tournament-markets for a tournement by tournamentId. (RACING ONLY) https://sandbox.whapi.com/v2/results/tournaments/{tournamentId}/tournamentMarkets
Resources Expand All Collapse All
getCompetition()
This method is used to get a competition by competitionId. (Non-Racing)
Request Example
get https://sandbox.whapi.com/v2/results/competitions/{competitionId}?languageCode=EN&fields=id,name,status&include=&exclude= HTTP/1.1
Host: sandbox.whapi.com
Accept: application/json
apiKey: 

Request Parameters
path parameters
Name Description
competitionId*
header parameters
Name Description
apiKey*
query parameters
Name Description
languageCode
fields
include
exclude
Responses Expand All Collapse All
getCompetitionEvents()
This method is used to get a list of events for a competition by competitionId. (Non-Racing)
Request Example
get https://sandbox.whapi.com/v2/results/competitions/{competitionId}/events?languageCode=EN&limit=20&offset=10&fields=id,name,status&include=&exclude=&dateFrom=2015-10-10T13:13:01&dateTo=2015-10-10T13:13:01&includeMainMarket=true HTTP/1.1
Host: sandbox.whapi.com
Accept: application/json
apiKey: 

Request Parameters
path parameters
Name Description
competitionId*
header parameters
Name Description
apiKey*
query parameters
Name Description
languageCode
limit
offset
fields
include
exclude
dateFrom*
dateTo*
includeMainMarket
Responses Expand All Collapse All
getEvent()
This method is used to get a non-racing event by eventId. (Non-Racing)
Request Example
get https://sandbox.whapi.com/v2/results/events/{eventId}?languageCode=EN&fields=id,name,status&include=&exclude=&includeMainMarket=true HTTP/1.1
Host: sandbox.whapi.com
Accept: application/json
apiKey: 

Request Parameters
path parameters
Name Description
eventId*
header parameters
Name Description
apiKey*
query parameters
Name Description
languageCode
fields
include
exclude
includeMainMarket
Responses Expand All Collapse All
getEventMarket()
This method is used to get a market by marketId. (Non-Racing)
Request Example
get https://sandbox.whapi.com/v2/results/markets/{marketId}?languageCode=EN&fields=id,name,status&include=&exclude= HTTP/1.1
Host: sandbox.whapi.com
Accept: application/json
apiKey: 

Request Parameters
path parameters
Name Description
marketId*
header parameters
Name Description
apiKey*
query parameters
Name Description
languageCode
fields
include
exclude
Responses Expand All Collapse All
getEventMarketCollections()
This method is used to get market-collections for an event. (Non-Racing)
Request Example
get https://sandbox.whapi.com/v2/results/events/{eventId}/markets/collections?languageCode=EN&limit=20&offset=10&fields=id,name,status&include=&exclude=&emptyResults=true HTTP/1.1
Host: sandbox.whapi.com
Accept: application/json
apiKey: 

Request Parameters
path parameters
Name Description
eventId*
header parameters
Name Description
apiKey*
query parameters
Name Description
languageCode
limit
offset
fields
include
exclude
emptyResults
Responses Expand All Collapse All
getEventMarketSelections()
This method is used to get selections for a market by marketId. (Non-Racing)
Request Example
get https://sandbox.whapi.com/v2/results/markets/{marketId}/selections?languageCode=EN&limit=20&offset=10&fields=id,name,status&include=&exclude=&emptyResults=true HTTP/1.1
Host: sandbox.whapi.com
Accept: application/json
apiKey: 

Request Parameters
path parameters
Name Description
marketId*
header parameters
Name Description
apiKey*
query parameters
Name Description
languageCode
limit
offset
fields
include
exclude
emptyResults
Responses Expand All Collapse All
getEventMarkets()
This method is used to get non-racing markets for an event by eventId. (Non-Racing)
Request Example
get https://sandbox.whapi.com/v2/results/events/{eventId}/markets?languageCode=EN&limit=20&offset=10&fields=id,name,status&include=&exclude=&dateFrom=2015-10-10T13:13:01&dateTo=2015-10-10T13:13:01&includeSelections=true&emptyResults=true HTTP/1.1
Host: sandbox.whapi.com
Accept: application/json
apiKey: 

Request Parameters
path parameters
Name Description
eventId*
header parameters
Name Description
apiKey*
query parameters
Name Description
languageCode
limit
offset
fields
include
exclude
dateFrom
dateTo
includeSelections
emptyResults
Responses Expand All Collapse All
getMeetingEvents()
This method is used to get meeting-events for a meeting by meetingId. A meeting event is a race and racecard if isRaceCard = true otherwise it is a tournament object. All these objects share the same ID as meeting-event-id - i.e. tournament.id = race.id = meetingEvent.id and race and racecard are 1-to-1 racecard contains more detailed data for a race) (RACING ONLY)
Request Example
get https://sandbox.whapi.com/v2/results/meetings/{meetingId}/meetingEvents?languageCode=EN&limit=20&offset=10&fields=id,name,status&include=&exclude=&dateFrom=2015-10-10T13:13:01&dateTo=2015-10-10T13:13:01 HTTP/1.1
Host: sandbox.whapi.com
Accept: application/json
apiKey: 

Request Parameters
path parameters
Name Description
meetingId*
header parameters
Name Description
apiKey*
query parameters
Name Description
languageCode
limit
offset
fields
include
exclude
dateFrom*
dateTo*
Responses Expand All Collapse All
getRace()
This method is used to get a race by raceId. (RACING ONLY)
Request Example
get https://sandbox.whapi.com/v2/results/races/{raceId}?languageCode=EN&fields=id,name,status&include=&exclude= HTTP/1.1
Host: sandbox.whapi.com
Accept: application/json
apiKey: 

Request Parameters
path parameters
Name Description
raceId*
header parameters
Name Description
apiKey*
query parameters
Name Description
languageCode
fields
include
exclude
Responses Expand All Collapse All
getRacecard()
This method is used to get a racecard for a race by raceId. (RACING ONLY)
Request Example
get https://sandbox.whapi.com/v2/results/races/{raceId}/racecard?languageCode=EN&fields=id,name,status&include=&exclude= HTTP/1.1
Host: sandbox.whapi.com
Accept: application/json
apiKey: 

Request Parameters
path parameters
Name Description
raceId*
header parameters
Name Description
apiKey*
query parameters
Name Description
languageCode
fields
include
exclude
Responses Expand All Collapse All
getSport()
This method is used to get the corresponding sport object by sportId.
Request Example
get https://sandbox.whapi.com/v2/results/sports/{sportId}?languageCode=EN&fields=id,name,status&include=&exclude= HTTP/1.1
Host: sandbox.whapi.com
Accept: application/json
apiKey: 

Request Parameters
path parameters
Name Description
sportId*
header parameters
Name Description
apiKey*
query parameters
Name Description
languageCode
fields
include
exclude
Responses Expand All Collapse All
getSportCompetitions()
This method is used to get a list of non-racing competitions for a sport by sportId. (NON-RACING)
Request Example
get https://sandbox.whapi.com/v2/results/sports/{sportId}/competitions?languageCode=EN&limit=20&offset=10&fields=id,name,status&include=&exclude=&dateFrom=2015-10-10T13:13:01&dateTo=2015-10-10T13:13:01 HTTP/1.1
Host: sandbox.whapi.com
Accept: application/json
apiKey: 

Request Parameters
path parameters
Name Description
sportId*
header parameters
Name Description
apiKey*
query parameters
Name Description
languageCode
limit
offset
fields
include
exclude
dateFrom
dateTo
Responses Expand All Collapse All
getSportMeeting()
This method is used to get a meeting by meetingId. (RACING ONLY)
Request Example
get https://sandbox.whapi.com/v2/results/meetings/{meetingId}?languageCode=EN&fields=id,name,status&include=&exclude= HTTP/1.1
Host: sandbox.whapi.com
Accept: application/json
apiKey: 

Request Parameters
path parameters
Name Description
meetingId*
header parameters
Name Description
apiKey*
query parameters
Name Description
languageCode
fields
include
exclude
Responses Expand All Collapse All
getSportMeetings()
This method is used to get race meetings for a sport by sportId. e.g. horse racing or dog racing. (RACING ONLY)
Request Example
get https://sandbox.whapi.com/v2/results/sports/{sportId}/meetings?languageCode=EN&limit=20&offset=10&fields=id,name,status&include=&exclude=&dateFrom=2015-10-10T13:13:01&dateTo=2015-10-10T13:13:01 HTTP/1.1
Host: sandbox.whapi.com
Accept: application/json
apiKey: 

Request Parameters
path parameters
Name Description
sportId*
header parameters
Name Description
apiKey*
query parameters
Name Description
languageCode
limit
offset
fields
include
exclude
dateFrom
dateTo
Responses Expand All Collapse All
getSports()
This method is used to return a list of sports.
Request Example
get https://sandbox.whapi.com/v2/results/sports?languageCode=EN&limit=20&offset=10&fields=id,name,status&include=&exclude=&device=DEFAULT HTTP/1.1
Host: sandbox.whapi.com
Accept: application/json
apiKey: 

Request Parameters
header parameters
Name Description
apiKey*
query parameters
Name Description
languageCode
limit
offset
fields
include
exclude
device
Responses Expand All Collapse All
getTournament()
This method is used to get a tournament by tournamentId. (RACING ONLY)
Request Example
get https://sandbox.whapi.com/v2/results/tournaments/{tournamentId}?languageCode=EN&fields=id,name,status&include=&exclude= HTTP/1.1
Host: sandbox.whapi.com
Accept: application/json
apiKey: 

Request Parameters
path parameters
Name Description
tournamentId*
header parameters
Name Description
apiKey*
query parameters
Name Description
languageCode
fields
include
exclude
Responses Expand All Collapse All
getTournamentMarket()
This method is used to get a tournament-markets tournamentMarketId. (RACING ONLY)
Request Example
get https://sandbox.whapi.com/v2/results/tournamentMarkets/{tournamentMarketId}?languageCode=EN&fields=id,name,status&include=&exclude= HTTP/1.1
Host: sandbox.whapi.com
Accept: application/json
apiKey: 

Request Parameters
path parameters
Name Description
tournamentMarketId*
header parameters
Name Description
apiKey*
query parameters
Name Description
languageCode
fields
include
exclude
Responses Expand All Collapse All
getTournamentMarketCollections()
This method is used to get market-collections for a tournament by tournamentId. (RACING ONLY)
Request Example
get https://sandbox.whapi.com/v2/results/tournaments/{tournamentId}/markets/collections?languageCode=EN&limit=20&offset=10&fields=id,name,status&include=&exclude=&emptyResults=true HTTP/1.1
Host: sandbox.whapi.com
Accept: application/json
apiKey: 

Request Parameters
path parameters
Name Description
tournamentId*
header parameters
Name Description
apiKey*
query parameters
Name Description
languageCode
limit
offset
fields
include
exclude
emptyResults
Responses Expand All Collapse All
getTournamentMarketSelections()
This method is used to get selections for a tournament by tournamentId. (RACING ONLY)
Request Example
get https://sandbox.whapi.com/v2/results/tournamentMarkets/{tournamentMarketId}/selections?languageCode=EN&limit=20&offset=10&fields=id,name,status&include=&exclude=&emptyResults=true HTTP/1.1
Host: sandbox.whapi.com
Accept: application/json
apiKey: 

Request Parameters
path parameters
Name Description
tournamentMarketId*
header parameters
Name Description
apiKey*
query parameters
Name Description
languageCode
limit
offset
fields
include
exclude
emptyResults
Responses Expand All Collapse All
getTournamentMarkets()
This method is used to get tournament-markets for a tournement by tournamentId. (RACING ONLY)
Request Example
get https://sandbox.whapi.com/v2/results/tournaments/{tournamentId}/tournamentMarkets?languageCode=EN&limit=20&offset=10&fields=id,name,status&include=&exclude=&dateFrom=2015-10-10T13:13:01&dateTo=2015-10-10T13:13:01&emptyResults=true&includeSelections=true HTTP/1.1
Host: sandbox.whapi.com
Accept: application/json
apiKey: 

Request Parameters
path parameters
Name Description
tournamentId*
header parameters
Name Description
apiKey*
query parameters
Name Description
languageCode
limit
offset
fields
include
exclude
dateFrom
dateTo
emptyResults
includeSelections
Responses Expand All Collapse All
HEAD and OPTIONS
You can call the following idempotent REST methods on all version 2 APIs:

HEAD

Asks for the response identical to the one that would correspond to a GET request, but without the response body. This is useful for retrieving meta-information written in response headers, without having to transport the entire content. The metainformation contained in the HTTP headers in response to a HEAD request is identical to the information sent in response to a GET request. This method is often used for testing hypertext links for validity, accessibility, and recent modification. The response to a HEAD request may be cacheable in the sense that the information contained in the response can be used to update a previously cached entity from that resource. If the new field values indicate that the cached entity differs from the current entity (as would be indicated by a change in Content-Length, Content-MD5, ETag or Last-Modified), then the cache treats the cache entry as stale.

OPTIONS

The OPTIONS method represents a request for information about the communication options available on the request/response chain identified by the Request-URI. This method allows you to determine the options and/or requirements associated with a resource without implying a resource action or initiating a resource retrieval. Responses to this method are not cacheable. The response includes any header fields that indicate optional features. The response body also includes information about the communication options.



Copyright (c) WHG (International) Limited 2016
Generated Date: 2020-10-29T04:09:08.251Z
Use of this document is subject to the William Hill Partner Developer Portal Terms and Conditions.