Competitions API

Overview
version: 1.0

The Competitions API allows 3rd party developers to directly integrate their products to obtain pricing information. It is split into two areas. The first area allows a developer to all the navigation elements to the events that customers might wish to bet upon. Once at the event level, a single request can be made to get the latest prices on all of the outcomes for that event.

Important note: Some of the methods for retrieving events might not work in our sandbox environment while you're testing your application. Not all live events are automatically replicated from Live to the sandbox environment but it can be done if requested by the developer. To do that, please log us a ticket after loggin in at developer.williamhill.com.
Competitions API Terminology
The following terms are used in our pricing model and associated methods; the relationship between terms is hierarchical, for example, a Category can have many Classes, a Class can have many Types, a Type can have many Events, etc.
Terminology Example
Term Description Football Example
Category A category is the type of sport and is at a very high level. Football (category 5)
Class A class gives a subset of the category. UK Football (class 1)
Type Type is the lowest level of detail that is used to group events together. English Premier League (type 295)
Event An event taking place on a specific date and at a specific time (events have a unique id for both sandbox environment and live environment; sandbox events are not the same as live events). Aston Villa v Liverpool
Market The market available for that event. 90 minutes
Outcome An outcome in that market that has a William Hill price associated with it. Liverpool to win @ 6/4


Summary
MethodNameDescriptionResource
getCategoriesRetrieves a complete list of all available categories. For example: Football, Cricket, Baseball, etc. The header response contains the Cache Control and Expires headers, which inform the remote client how long it should retain and redisplay the response before sending a request to the server for and updated response. The Cache control time for this request is 86,400 seconds (24 hours).http://sandbox.whapi.com/v1/competitions/categories
getCategoryRetrieves a single category. For example: Football, Cricket, Baseball, etc. The header response contains the Cache Control and Expires headers, which inform the remote client how long it should retain and redisplay the response before sending a request to the server for and updated response. The Cache control time for this request is 86,400 seconds (24 hours).http://sandbox.whapi.com/v1/competitions/categories/{categoryId}
getClassesByCategoryRetrieves a subset of classes within an individual category. For example: UK Football, International Football, etc. within the Football category. The header response contains the Cache Control and Expires headers, which inform the remote client how long it should retain and redisplay the response before sending a request to the server for and updated response. The Cache control time for this request is 43,200 seconds (12 hours).http://sandbox.whapi.com/v1/competitions/categories/{categoryId}/classes
getClassesTypesByCategoryRetrieves a subset of types within an individual category class. For example: English Premier League, English League Division One, etc. within UK Football. The header response contains the Cache Control and Expires headers, which inform the remote client how long it should retain and redisplay the response before sending a request to the server for and updated response. The Cache control time for this request is 21,600 seconds (6 hours).http://sandbox.whapi.com/v1/competitions/categories/{categoryId}/classes/types
getClassesTypesEventsByCategoryRetrieves all events in a subset of types within an individual category class. For example Man. Utd v Tottenham, Swansea v Arsenal , etc. within Football > UK Football > EPL. . The header response contains the Cache Control and Expires headers, which inform the remote client how long it should retain and redisplay the response before sending a request to the server for and updated response. The Cache control time for this request is 900 seconds. http://sandbox.whapi.com/v1/competitions/categories/{categoryId}/classes/types/events
getClassesRetrieves a complete list of classes for each available category. The header response contains the Cache Control and Expires headers, which inform the remote client how long it should retain and redisplay the response before sending a request to the server for and updated response. The Cache control time for this request is 43,200 seconds (12 hours).http://sandbox.whapi.com/v1/competitions/classes
getClassRetrieves an individual class by its ID, for example 36 – International Football. The header response contains the Cache Control and Expires headers, which inform the remote client how long it should retain and redisplay the response before sending a request to the server for and updated response. The Cache control time for this request is 43,200 seconds (12 hours).http://sandbox.whapi.com/v1/competitions/classes/{classId}
getTypesByClassRetrievesretrieve all types within an individual class ID. For example: English Premier League, English League Division One, etc. within UK Football (class ID - 1). The header response contains the Cache Control and Expires headers, which inform the remote client how long it should retain and redisplay the response before sending a request to the server for and updated response. The Cache control time for this request is 21,600 seconds (6 hours).http://sandbox.whapi.com/v1/competitions/classes/{classId}/types
getTypesEventsByClassRetrieves all events and types within an individual class ID. For example: UK Football (class ID - 1). The header response contains the Cache Control and Expires headers, which inform the remote client how long it should retain and redisplay the response before sending a request to the server for and updated response. The Cache control time for this request is 900 seconds (15 minutes).http://sandbox.whapi.com/v1/competitions/classes/{classId}/types/events
getTypesRetrieves a complete list of all available types.http://sandbox.whapi.com/v1/competitions/types
getTypeRetrieves an individual type by defining the type ID. For example: 295 is the identifier for the English Premier League. The header response contains the Cache Control and Expires headers, which inform the remote client how long it should retain and redisplay the response before sending a request to the server for and updated response. The Cache control time for this request is 21,600 seconds (6 hours).http://sandbox.whapi.com/v1/competitions/types/{typeId}
getEventsByTypeRetrieves the events within an individual type by defining the type ID. For example: 344 – UEFA Champions League. The header response contains the Cache Control and Expires headers, which inform the remote client how long it should retain and redisplay the response before sending a request to the server for and updated response. The Cache control time for this request is 900 seconds (15 minutes).http://sandbox.whapi.com/v1/competitions/types/{typeId}/events
getSuggestedOutcomesByTypeSuggests outcomes for a specific type.http://sandbox.whapi.com/v1/competitions/types/{typeId}/outcomes/suggestions
getEventRetrieves an individual event by defining the event ID. This request returns the event without odds, scores or commentaries. The header response contains the Cache Control and Expires headers, which inform the remote client how long it should retain and redisplay the response before sending a request to the server for and updated response. The Cache control time for this request is 4 seconds.http://sandbox.whapi.com/v1/competitions/events/{eventId}
getMarketsByEventRetrieves the markets for a given event by using the event ID. The header response contains the Cache Control and Expires headers, which inform the remote client how long it should retain and redisplay the response before sending a request to the server for and updated response. The Cache control time for this request is 7 seconds.http://sandbox.whapi.com/v1/competitions/events/{eventId}/markets
getMarketsOutcomesByEventRetrieves an individual event and its available markets and outcomes by using the event ID. The header response contains the Cache Control and Expires headers, which inform the remote client how long it should retain and redisplay the response before sending a request to the server for and updated response. The Cache control time for this request is 4 seconds.http://sandbox.whapi.com/v1/competitions/events/{eventId}/markets/outcomes
getMarketsOutcomesCompetitorsByEventRetrieves the horse information for the parent resource. The header response contains the Cache Control and Expires headers, which inform the remote client how long it should retain and redisplay the response before sending a request to the server for and updated response. The Cache control time for this request is 4 seconds.http://sandbox.whapi.com/v1/competitions/events/{eventId}/markets/outcomes/competitors
getEventInplayRetrieves details for a specific event that is currently running (inPlay) by defining the event ID. The response includes odds and scores (no commentaries). The header response contains the Cache Control and Expiry headers, which inform the remote client how long it should retain and redisplay the response before sending a request to the server for and updated response. The Cache control time for this request is 4 seconds.http://sandbox.whapi.com/v1/competitions/events/{eventId}/inplay
getCommentariesByEventRetrieves details for a specific event that is currently running (inPlay) by defining the event ID. This returns the event with odds, scores and commentaries. Note that, commentaries are supplied at the discretion of your business manager. To enable this service, contact your Business Manager. The header response contains the Cache Control and Expiry headers, which inform the remote client how long it should retain and redisplay the response before sending a request to the server for and updated response. The Cache control time for this request is 4 seconds.http://sandbox.whapi.com/v1/competitions/events/{eventId}/inplay/commentaries
getEventsInplayRetrieves details of all inplay events. The header response contains the Cache Control and Expiry headers, which inform the remote client how long it should retain and redisplay the response before sending a request to the server for and updated response. The Cache control time for this request is 4 seconds.http://sandbox.whapi.com/v1/competitions/events/inplay
getEventsInplayLiveRetrieves details for the events that have inplay and are currently running meaning betting has started. The header response contains the Cache Control and Expires headers, which inform the remote client how long it should retain and redisplay the response before sending a request to the server for and updated response. The Cache control time for this request is 4 seconds.http://sandbox.whapi.com/v1/competitions/events/inplay/live
getEventsInplayUpcomingRetrieves a complete list of all events that have inplay betting available and have not yet started. The header response contains the Cache Control and Expires headers, which inform the remote client how long it should retain and redisplay the response before sending a request to the server for and updated response. The Cache control time for this request is 30 seconds.http://sandbox.whapi.com/v1/competitions/events/inplay/upcoming
getMarketRetrieves a specific market by defining the marketId.http://sandbox.whapi.com/v1/competitions/markets/{marketId}
getOutcomesByMarketRetrieves the outcomes for a given market.http://sandbox.whapi.com/v1/competitions/markets/{marketId}/outcomes
getOutcomesCompetitorsByMarketRetrieves the horse information for the parent resource.http://sandbox.whapi.com/v1/competitions/markets/{marketId}/outcomes/competitors
getOutcomeRetrieves an outcome.http://sandbox.whapi.com/v1/competitions/outcomes/{outcomeId}
getCompetitorsByOutcomeRetrieves the price information and the horse information for the parent resource.http://sandbox.whapi.com/v1/competitions/outcomes/{outcomeId}/competitors
getSuggestedOutcomesSuggests outcomes from all sports.http://sandbox.whapi.com/v1/competitions/outcomes/suggestions
getSportsRetrieves a list of sports.http://sandbox.whapi.com/v1/competitions/sports
getOutcomeWeightingsAllSportsRetrieves top bets on outcomes for all sport.http://sandbox.whapi.com/v1/competitions/sports/outcomes/weightings
getSportRetrieves a single sport.http://sandbox.whapi.com/v1/competitions/sports/{sportId}
getOutcomeWeightingsSingleSportRetrieves the top bet on outcomes for a specific sport.http://sandbox.whapi.com/v1/competitions/sports/{sportId}/outcomes/weightings
getSuggestedOutcomesBySportSuggests outcomes from a single sport.http://sandbox.whapi.com/v1/competitions/sports/{sportId}/outcomes/suggestions
getSuggestedOutcomesByEventSuggests outcomes for a specific event.http://sandbox.whapi.com/v1/competitions/event/{eventId}/outcomes/suggestions
ResourcesExpand AllCollapse All
getCategories()
Retrieves a complete list of all available categories. For example: Football, Cricket, Baseball, etc. The header response contains the Cache Control and Expires headers, which inform the remote client how long it should retain and redisplay the response before sending a request to the server for and updated response. The Cache control time for this request is 86,400 seconds (24 hours).
Request Example
GET /v1/competitions/categories HTTP/1.1
Host: sandbox.whapi.com
Accept: application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
who-apiKey: l7xxa54460c573b5497c9b24b505xxxxxxxx
Request Parameters
header parameters
NameTypeDescription
who-apiKeystring
(required)
A unique identifier of your application that is generated by the API portal and presented in the header.
acceptstring
(required)
options:
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8, application/vnd.who.Sportsbook+json;v=1;charset=utf-8
The representation of the response.
Response Description
whoCompetitions
Object Name Type Constraints Optional Description
element created String YYYY-MM-DD HH:MM:SS No Date and time the response was created
element disclaimer String - No The William Hill disclaimer notice
element copyright String - No The William Hill copyright notice
node category Node Multiple nodes No The category node
category
Object Name Type Constraints Optional Description
attribute id Integer - No Unique identifier for this category
element displayOrder Integer - No The lower the order number, the more important the entry (can be a negative number)
element name String - No Human-friendly name of the category in the language requested
element code String - No The identifier code of the category
ResponsesExpand AllCollapse All
Status: 200 (Ok) - Success - Information obtained
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <created>2013-09-27 9:58:43</created>
   <disclaimer></disclaimer>
   <copyright>Copyright (c) 2013, WHG (International) Limited. All rights reserved.</copyright>
   <category id="1">
      <displayOrder>1</displayOrder>
      <name>American Football</name>
      <code>AMERICAN_FB</code>
   </category>
   <category id="2">
      <displayOrder>2</displayOrder>
      <name>Baseball</name>
      <code>BASEBALL</code>
   </category>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
"whoCompetitions":
   {
      "created": "2013-09-27 10:01:29",
      "disclaimer": "",
      "copyright": Copyright (c) 2013, WHG (International) Limited. All rights reserved.",
      "category": [
         {
            "id": "1",
            "displayOrder": "1",
            "name": "American Football",
            "code": "AMERICAN_FB"
         },
         {
            "id": "2",
            "displayOrder": "2",
            "name": "Baseball",
            "code": "BASEBALL"
         },
      ]
   }
}
getCategory()
Retrieves a single category. For example: Football, Cricket, Baseball, etc. The header response contains the Cache Control and Expires headers, which inform the remote client how long it should retain and redisplay the response before sending a request to the server for and updated response. The Cache control time for this request is 86,400 seconds (24 hours).
Request Example
GET /v1/competitions/categories/{categoryId} HTTP/1.1
Host: sandbox.whapi.com
Accept: application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
who-apiKey: l7xxa54460c573b5497c9b24b505xxxxxxxx
Request Parameters
template parameters
NameTypeDescription
categoryIdinteger
(required)
The id of the category to request information for.
header parameters
NameTypeDescription
who-apiKeystring
(required)
A unique identifier of your application that is generated by the API portal and presented in the header.
acceptstring
(required)
options:
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8, application/vnd.who.Sportsbook+json;v=1;charset=utf-8
The representation of the response.
Response Description
whoCompetitions
Object Name Type Constraints Optional Description
element created String YYYY-MM-DD HH:MM:SS No Date and time the response was created
element disclaimer String - No The William Hill disclaimer notice
element copyright String - No The William Hill copyright notice
node category Node - No The category node
category
Object Name Type Constraints Optional Description
attribute id Integer - No Unique identifier for this category
element displayOrder Integer - No The lower the order number, the more important the entry (can be a negative number)
element name String - No Human-friendly name of the category in the language requested
element code String - No The identifier code of the category
ResponsesExpand AllCollapse All
Status: 200 (Ok) - Success - Information obtained
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <created>2013-09-27 9:58:43</created>
   <disclaimer></disclaimer>
   <copyright>Copyright (c) 2013, WHG (International) Limited. All rights reserved.</copyright>
   <category id="1">
      <displayOrder>1</displayOrder>
      <name>American Football</name>
      <code>AMERICAN_FB</code>
   </category>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
"whoCompetitions":
   {
      "created": "2013-09-27 10:01:29",
      "disclaimer": "",
      "copyright": Copyright (c) 2013, WHG (International) Limited. All rights reserved.",
      "category": {
         "id": "1",
         "displayOrder": "1",
         "name": "American Football",
         "code": "AMERICAN_FB"
      }
   }
}
Status: 200 (Ok) - Fault 10070 - Missing categoryId
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10070</faultCode>
         <faultString>Missing request parameter.</faultString>
         <faultName>categoryId</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10070",
               "faultString":"Missing request parameter",
               "faultName":"categoryId"
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10071 - Invalid categoryId
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10071</faultCode>
         <faultString>Invalid request parameter.</faultString>
         <faultName>categoryId</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10071",
               "faultString":"Invalid request parameter.",
               "faultName":"categoryId"
            }
         ]
      }
   ]
}
getClassesByCategory()
Retrieves a subset of classes within an individual category. For example: UK Football, International Football, etc. within the Football category. The header response contains the Cache Control and Expires headers, which inform the remote client how long it should retain and redisplay the response before sending a request to the server for and updated response. The Cache control time for this request is 43,200 seconds (12 hours).
Request Example
GET /v1/competitions/categories/{categoryId}/classes HTTP/1.1
Host: sandbox.whapi.com
Accept: application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
who-apiKey: l7xxa54460c573b5497c9b24b505xxxxxxxx
Request Parameters
template parameters
NameTypeDescription
categoryIdinteger
(required)
The id of the category to request information for.
header parameters
NameTypeDescription
who-apiKeystring
(required)
A unique identifier of your application that is generated by the API portal and presented in the header.
acceptstring
(required)
options:
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8, application/vnd.who.Sportsbook+json;v=1;charset=utf-8
The representation of the response.
Response Description
whoCompetitions
Object Name Type Constraints Optional Description
element created String YYYY-MM-DD HH:MM:SS No Date and time the response was created
element disclaimer String - No The William Hill disclaimer notice
element copyright String - No The William Hill copyright notice
node category Node - No The category node
category
Object Name Type Constraints Optional Description
attribute id Integer - No Unique identifier for this category
element displayOrder Integer - No The lower the order number, the more important the entry (can be a negative number)
element name String - No Human-friendly name of the category in the language requested
element code String - No The identifier code of the category
node class Node - No The class node
class
Object Name Type Constraints Optional Description
attribute id Integer - No Unique identifier for this class
element channels String - No The channels where the entry can be accessed
element displayOrder Integer - No The lower the order number, the more important the entry (can be a negative number)
element name String - No Human-friendly name of the class
ResponsesExpand AllCollapse All
Status: 200 (Ok) - Success - Information obtained
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <created>2013-09-27 9:58:43</created>
   <disclaimer></disclaimer>
   <copyright>Copyright (c) 2013, WHG (International) Limited. All rights reserved.</copyright>
   <category id="1">
      <displayOrder>1</displayOrder>
      <name>American Football</name>
      <code>AMERICAN_FB</code>
      <class id="19">
         <channels>IPLYFBJSCMHQGNAEVU</channels>
         <displayOrder>9999</displayOrder>
         <name>American Football</name>
      </class>
   </category>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
"whoCompetitions":
   {
      "created": "2013-09-27 10:01:29",
      "disclaimer": "",
      "copyright": Copyright (c) 2013, WHG (International) Limited. All rights reserved.",
      "category": {
         "id": "1",
         "displayOrder": "1",
         "name": "American Football",
         "code": "AMERICAN_FB"
         "class": [
            {
               "id": "19",
               "channels": "IPLYFBJSCMHQGNAEVU",
               "displayOrder": "9999",
               "name": "American Football"
            }
         ]
      }
   }
}
Status: 200 (Ok) - Fault 10070 - Missing categoryId
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10070</faultCode>
         <faultString>Missing request parameter.</faultString>
         <faultName>categoryId</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10070",
               "faultString":"Missing request parameter",
               "faultName":"categoryId"
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10071 - Invalid categoryId
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10071</faultCode>
         <faultString>Invalid request parameter.</faultString>
         <faultName>categoryId</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10071",
               "faultString":"Invalid request parameter.",
               "faultName":"categoryId"
            }
         ]
      }
   ]
}
getClassesTypesByCategory()
Retrieves a subset of types within an individual category class. For example: English Premier League, English League Division One, etc. within UK Football. The header response contains the Cache Control and Expires headers, which inform the remote client how long it should retain and redisplay the response before sending a request to the server for and updated response. The Cache control time for this request is 21,600 seconds (6 hours).
Request Example
GET /v1/competitions/categories/{categoryId}/classes/types HTTP/1.1
Host: sandbox.whapi.com
Accept: application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
who-apiKey: l7xxa54460c573b5497c9b24b505xxxxxxxx
Request Parameters
template parameters
NameTypeDescription
categoryIdinteger
(required)
The id of the category to request information for.
header parameters
NameTypeDescription
who-apiKeystring
(required)
A unique identifier of your application that is generated by the API portal and presented in the header.
acceptstring
(required)
options:
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8, application/vnd.who.Sportsbook+json;v=1;charset=utf-8
The representation of the response.
Response Description
whoCompetitions
Object Name Type Constraints Optional Description
element created String YYYY-MM-DD HH:MM:SS No Date and time the response was created
element disclaimer String - No The William Hill disclaimer notice
element copyright String - No The William Hill copyright notice
node category Node - No The category node
category
Object Name Type Constraints Optional Description
attribute id Integer - No Unique identifier for this category
element displayOrder Integer - No The lower the order number, the more important the entry (can be a negative number)
element name String - No Human-friendly name of the category in the language requested
element code String - No The identifier code of the category
node class Node - No The class node
class
Object Name Type Constraints Optional Description
attribute id Integer - No Unique identifier for this class
element channels String - No The channels where the entry can be accessed
element displayOrder Integer - No The lower the order number, the more important the entry (can be a negative number)
element name String - No Human-friendly name of the class
node type Node - No The types node
type
Object Name Type Constraints Optional Description
attribute id Integer - No Unique identifier for this type
element channels String - No The channels where the entry can be accessed
element displayOrder Integer - No The lower the order number, the more important the entry (can be a negative number)
element lastUpdateDate String YYYY-MM-DD No Date of the last update to the entry
element lastUpdateTime String HH:MM:SS No Time of the last update to the entry
element name String - No Human-friendly name of the type
element url String - No URL of the type in the online sports book
ResponsesExpand AllCollapse All
Status: 200 (Ok) - Success - Information obtained
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <created>2013-09-27 9:58:43</created>
   <disclaimer></disclaimer>
   <copyright>Copyright (c) 2013, WHG (International) Limited. All rights reserved.</copyright>
   <category id="1">
      <displayOrder>1</displayOrder>
      <name>American Football</name>
      <code>AMERICAN_FB</code>
      <class id="19">
         <channels>IPLYFBJSCMHQGNAEVU</channels>
         <displayOrder>9999</displayOrder>
         <name>American Football</name>
         <type id="195">
            <channels>IPLYFBJSCMHQGNAEVU</channels>
            <displayOrder>-998</displayOrder>
            <lastUpdateDate>2015-04-08</lastUpdateDate>
            <lastUpdateTime>03:03:12</lastUpdateTime>
            <name>NFL</name>
            <url>http://sports.williamhill.com/bet/betting/t/195</url>
         </type>
      </class>
   </category>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
"whoCompetitions":
   {
      "created": "2013-09-27 10:01:29",
      "disclaimer": "",
      "copyright": Copyright (c) 2013, WHG (International) Limited. All rights reserved.",
      "category": {
         "id": "1",
         "displayOrder": "1",
         "name": "American Football",
         "code": "AMERICAN_FB"
         "class": [
            {
               "id": "19",
               "channels": "IPLYFBJSCMHQGNAEVU",
               "displayOrder": "9999",
               "name": "American Football",
               "type": [ 
                  {
                     "id": "195",
                     "channels": "IPLYFBJSCMHQGNAEVU",
                     "displayOrder": "-998",
                     "lastUpdateDate": "2015-04-08",
                     "lastUpdateTime": "03:03:12",
                     "name": "NFL",
                     "url": "http://sports.williamhill.com/bet/betting/t/195"
                  }
               ]
            }
         ]
      }
   }
}
Status: 200 (Ok) - Fault 10070 - Missing categoryId
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10070</faultCode>
         <faultString>Missing request parameter.</faultString>
         <faultName>categoryId</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10070",
               "faultString":"Missing request parameter",
               "faultName":"categoryId"
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10071 - Invalid categoryId
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10071</faultCode>
         <faultString>Invalid request parameter.</faultString>
         <faultName>categoryId</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10071",
               "faultString":"Invalid request parameter.",
               "faultName":"categoryId"
            }
         ]
      }
   ]
}
getClassesTypesEventsByCategory()
Retrieves all events in a subset of types within an individual category class. For example Man. Utd v Tottenham, Swansea v Arsenal , etc. within Football > UK Football > EPL. . The header response contains the Cache Control and Expires headers, which inform the remote client how long it should retain and redisplay the response before sending a request to the server for and updated response. The Cache control time for this request is 900 seconds.
Request Example
GET /v1/competitions/categories/{categoryId}/classes/types/events HTTP/1.1
Host: sandbox.whapi.com
Accept: application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
who-apiKey: l7xxa54460c573b5497c9b24b505xxxxxxxx
Request Parameters
template parameters
NameTypeDescription
categoryIdinteger
(required)
The id of the category to request information for.
header parameters
NameTypeDescription
who-apiKeystring
(required)
A unique identifier of your application that is generated by the API portal and presented in the header.
acceptstring
(required)
options:
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8, application/vnd.who.Sportsbook+json;v=1;charset=utf-8
The representation of the response.
query parameters
NameTypeDescription
eventsTodaystring
options:
, Y
If set to Y, the response will only show events running in the current 24 hour period. When the parameter is left blank the response will include all events.
eventsActivestring
options:
, Y, N
If set to Y, the response will only show active events. When the parameter is left blank the response will include all events. If set to N the response will return only events which are not active.
inPlayStartedstring
options:
, Y, N
If set to Y, the response will only show events that have already started. When the parameter is left blank the response will include all events. If set to N the response will return only events for which inplay has not started but will be available.
availableInPlaystring
options:
, Y, N
If set to Y, the response will only show events that are available in play. When the parameter is left blank the response will include all events. If set to N the response will return only events for which inplay is not available.
Response Description
whoCompetitions
Object Name Type Constraints Optional Description
element created String YYYY-MM-DD HH:MM:SS No Date and time the response was created
element disclaimer String - No The William Hill disclaimer notice
element copyright String - No The William Hill copyright notice
node category Node - No The category node
category
Object Name Type Constraints Optional Description
attribute id Integer - No Unique identifier for this category
element displayOrder Integer - No The lower the order number, the more important the entry (can be a negative number)
element name String - No Human-friendly name of the category in the language requested
element code String - No The identifier code of the category
node class Node - No The class node
class
Object Name Type Constraints Optional Description
attribute id Integer - No Unique identifier for this class
element channels String - No The channels where the entry can be accessed
element displayOrder Integer - No The lower the order number, the more important the entry (can be a negative number)
element name String - No Human-friendly name of the class
node type Node - No The types node
type
Object Name Type Constraints Optional Description
attribute id Integer - No Unique identifier for this type
element channels String - No The channels where the entry can be accessed
element displayOrder Integer - No The lower the order number, the more important the entry (can be a negative number)
element lastUpdateDate String YYYY-MM-DD No Date of the last update to the entry
element lastUpdateTime String HH:MM:SS No Time of the last update to the entry
element name String - No Human-friendly name of the type
element url String - No URL of the type in the online sports book
node event Node - No The event node
event
Object Name Type Constraints Optional Description
attribute id Integer - No Unique identifier for this event
element name String - No Human-friendly name of the event
element venue String - Yes The event venue
element status String A|S No The status of the event. A - Active | S - Suspended
element date String YYYY-MM-DD No The date at which the event occurs
element time String HH:MM:SS No The time at which the event occurs
element sort String - No The type of the event (for example: MTCH)
element channels String - No Channels where the entry can be accessed
node betting Node - No The betting node
node availability Node - No The availability node
node inPlay Node - No The inPlay node
element url String - No URL of the event in the online sports book
element raceNum String - Yes Used to provide an order number for event entries at the track, taken from the racecard
element displayed String Y|N No Whether the object is displayed
element displayOrder String - No The lower the order number, the more important the entry (can be a negative number)
element lastUpdateDate String - No The date of the last update to the entry
element lastUpdateTime String HH:MM:SS No The time of the last update to the entry
betting
Object Name Type Constraints Optional Description
element untilDate String YYYY-MM-DD No The date at which betting stops for the entry
element untilTime String HH:MM:SS No The time at which betting stops for the entry
element status String PRICED|OFF|RESULTED|PENDING No The status for betting on that event
availability
Object Name Type Constraints Optional Description
element inPlay String Y|N No Whether betting in running will be available on this event entry
element livePrives String Y|N No Whether the event has live prices
inPlay
Object Name Type Constraints Optional Description
element started String Y|N No Whether this inplay event has started
ResponsesExpand AllCollapse All
Status: 200 (Ok) - Success - Information obtained
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <created>2013-09-27 9:58:43</created>
   <disclaimer></disclaimer>
   <copyright>Copyright (c) 2013, WHG (International) Limited. All rights reserved.</copyright>
   <category id="1">
      <displayOrder>1</displayOrder>
      <name>American Football</name>
      <code>AMERICAN_FB</code>
      <class id="19">
         <channels>IPLYFBJSCMHQGNAEVU</channels>
         <displayOrder>9999</displayOrder>
         <name>American Football</name>
         <type id="195">
            <channels>IPLYFBJSCMHQGNAEVU</channels>
            <displayOrder>-998</displayOrder>
            <lastUpdateDate>2015-04-08</lastUpdateDate>
            <lastUpdateTime>03:03:12</lastUpdateTime>
            <name>NFL</name>
            <url>http://sports.williamhill.com/bet/betting/t/195</url>
            <event id="7155808">
               <name>Super Bowl 50 - Outright</name>
               <venue/>
               <status>A</status>
               <date>2015-04-30</date>
               <time>09:00:00</time>
               <sort>TNMT</sort>
               <channels>IPLYFBJSCMHQGNAEVU</channels>
               <betting>
                  <untilDate>2015-04-30</untilDate>
                  <untilTime>09:00:00</untilTime>
                  <status>PRICED</status>
               </betting>
               <availability>
                  <inPlay>N</inPlay>
                  <livePrices>Y</livePrices>
               </availability>
               <inPlay>
                  <started>N</started>
               </inPlay>
               <url>http://sports.williamhill.com/bet/en-gb/betting/e/195/</url>
               <raceNum/>
               <displayed>Y</displayed>
               <displayOrder>0</displayOrder>
               <lastUpdateDate>2015-04-08</lastUpdateDate>
               <lastUpdateTime>03:04:52</lastUpdateTime>
            </event>
         </type>
      </class>
   </category>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
"whoCompetitions":
   {
      "created": "2013-09-27 10:01:29",
      "disclaimer": "",
      "copyright": Copyright (c) 2013, WHG (International) Limited. All rights reserved.",
      "category": {
         "id": "1",
         "displayOrder": "1",
         "name": "American Football",
         "code": "AMERICAN_FB"
         "class": [
            {
               "id": "19",
               "channels": "IPLYFBJSCMHQGNAEVU",
               "displayOrder": "9999",
               "name": "American Football",
               "type": [ 
                  {
                     "id": "195",
                     "channels": "IPLYFBJSCMHQGNAEVU",
                     "displayOrder": "-998",
                     "lastUpdateDate": "2015-04-08",
                     "lastUpdateTime": "03:03:12",
                     "name": "NFL",
                     "url": "http://sports.williamhill.com/bet/betting/t/195",
                     "event": [ 
                        {
                           "id": "7155808",
                           "name": "Super Bowl 50 - Outright",
                           "status": "A",
                           "date": "2015-04-30",
                           "time": "09:00:00",
                           "sort": "TNMT",
                           "channels": "IPLYFBJSCMHQGNAEVU",
                           "betting": {
                              "untilDate": "2015-04-30",
                              "untilTime": "09:00:00",
                              "status": "PRICED"
                           },
                           "availability": {
                              "inPlay": "N",
                              "livePrices": "Y"
                           },
                           "inPlay": { "started": "N" },
                           "url": "http://sports.williamhill.com/bet/en-gb/betting/e/195/",
                           "displayed": "Y",
                           "displayOrder": "0",
                           "lastUpdateDate": "2015-04-08",
                           "lastUpdateTime": "03:04:52"
                        }
                     ]
                  }
               ]
            }
         ]
      }
   }
}
Status: 200 (Ok) - Fault 10070 - Missing categoryId
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10070</faultCode>
         <faultString>Missing request parameter.</faultString>
         <faultName>categoryId</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10070",
               "faultString":"Missing request parameter",
               "faultName":"categoryId"
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10071 - Invalid categoryId
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10071</faultCode>
         <faultString>Invalid request parameter.</faultString>
         <faultName>categoryId</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10071",
               "faultString":"Invalid request parameter.",
               "faultName":"categoryId"
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10071 - Invalid eventsToday
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10071</faultCode>
         <faultString>Invalid request parameter.</faultString>
         <faultName>eventsToday</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10071",
               "faultString":"Invalid request parameter.",
               "faultName":"eventsToday"
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10071 - Invalid eventsActive
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10071</faultCode>
         <faultString>Invalid request parameter.</faultString>
         <faultName>eventsActive</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10071",
               "faultString":"Invalid request parameter.",
               "faultName":"eventsActive"
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10071 - Invalid inPlayStarted
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10071</faultCode>
         <faultString>Invalid request parameter.</faultString>
         <faultName>inPlayStarted</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10071",
               "faultString":"Invalid request parameter.",
               "faultName":"inPlayStarted"
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10071 - Invalid availableInPlay
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10071</faultCode>
         <faultString>Invalid request parameter.</faultString>
         <faultName>availableInPlay</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10071",
               "faultString":"Invalid request parameter.",
               "faultName":"availableInPlay"
            }
         ]
      }
   ]
}
getClasses()
Retrieves a complete list of classes for each available category. The header response contains the Cache Control and Expires headers, which inform the remote client how long it should retain and redisplay the response before sending a request to the server for and updated response. The Cache control time for this request is 43,200 seconds (12 hours).
Request Example
GET /v1/competitions/classes HTTP/1.1
Host: sandbox.whapi.com
Accept: application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
who-apiKey: l7xxa54460c573b5497c9b24b505xxxxxxxx
Request Parameters
header parameters
NameTypeDescription
who-apiKeystring
(required)
A unique identifier of your application that is generated by the API portal and presented in the header.
acceptstring
(required)
options:
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8, application/vnd.who.Sportsbook+json;v=1;charset=utf-8
The representation of the response.
Response Description
whoCompetitions
Object Name Type Constraints Optional Description
element created String YYYY-MM-DD HH:MM:SS No Date and time the response was created
element disclaimer String - No The William Hill disclaimer notice
element copyright String - No The William Hill copyright notice
node category Node - No The category node
category
Object Name Type Constraints Optional Description
attribute id Integer - No Unique identifier for this category
element displayOrder Integer - No The lower the order number, the more important the entry (can be a negative number)
element name String - No Human-friendly name of the category in the language requested
element code String - No The identifier code of the category
node class Node - No The class node
class
Object Name Type Constraints Optional Description
attribute id Integer - No Unique identifier for this class
element channels String - No The channels where the entry can be accessed
element displayOrder Integer - No The lower the order number, the more important the entry (can be a negative number)
element name String - No Human-friendly name of the class
ResponsesExpand AllCollapse All
Status: 200 (Ok) - Success - Information obtained
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <created>2013-09-27 9:58:43</created>
   <disclaimer></disclaimer>
   <copyright>Copyright (c) 2013, WHG (International) Limited. All rights reserved.</copyright>
   <category id="1">
      <displayOrder>1</displayOrder>
      <name>American Football</name>
      <code>AMERICAN_FB</code>
      <class id="19">
         <channels>IPLYFBJSCMHQGNAEVU</channels>
         <displayOrder>9999</displayOrder>
         <name>American Football</name>
      </class>
   </category>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
"whoCompetitions":
   {
      "created": "2013-09-27 10:01:29",
      "disclaimer": "",
      "copyright": Copyright (c) 2013, WHG (International) Limited. All rights reserved.",
      "category": [
         {
            "id": "1",
            "displayOrder": "1",
            "name": "American Football",
            "code": "AMERICAN_FB"
            "class": [
               {
                  "id": "19",
                  "channels": "IPLYFBJSCMHQGNAEVU",
                  "displayOrder": "9999",
                  "name": "American Football"
               }
            ]
         }
      ]
   }
}
getClass()
Retrieves an individual class by its ID, for example 36 – International Football. The header response contains the Cache Control and Expires headers, which inform the remote client how long it should retain and redisplay the response before sending a request to the server for and updated response. The Cache control time for this request is 43,200 seconds (12 hours).
Request Example
GET /v1/competitions/classes/{classId} HTTP/1.1
Host: sandbox.whapi.com
Accept: application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
who-apiKey: l7xxa54460c573b5497c9b24b505xxxxxxxx
Request Parameters
template parameters
NameTypeDescription
classIdinteger
(required)
The id of the class to request information for.
header parameters
NameTypeDescription
who-apiKeystring
(required)
A unique identifier of your application that is generated by the API portal and presented in the header.
acceptstring
(required)
options:
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8, application/vnd.who.Sportsbook+json;v=1;charset=utf-8
The representation of the response.
Response Description
whoCompetitions
Object Name Type Constraints Optional Description
element created String YYYY-MM-DD HH:MM:SS No Date and time the response was created
element disclaimer String - No The William Hill disclaimer notice
element copyright String - No The William Hill copyright notice
node category Node - No The category node
category
Object Name Type Constraints Optional Description
attribute id Integer - No Unique identifier for this category
element displayOrder Integer - No The lower the order number, the more important the entry (can be a negative number)
element name String - No Human-friendly name of the category in the language requested
element code String - No The identifier code of the category
node class Node - No The class node
class
Object Name Type Constraints Optional Description
attribute id Integer - No Unique identifier for this class
element channels String - No The channels where the entry can be accessed
element displayOrder Integer - No The lower the order number, the more important the entry (can be a negative number)
element name String - No Human-friendly name of the class
ResponsesExpand AllCollapse All
Status: 200 (Ok) - Success - Information obtained
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <created>2013-09-27 9:58:43</created>
   <disclaimer></disclaimer>
   <copyright>Copyright (c) 2013, WHG (International) Limited. All rights reserved.</copyright>
   <category id="1">
      <displayOrder>1</displayOrder>
      <name>American Football</name>
      <code>AMERICAN_FB</code>
      <class id="19">
         <channels>IPLYFBJSCMHQGNAEVU</channels>
         <displayOrder>9999</displayOrder>
         <name>American Football</name>
      </class>
   </category>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
"whoCompetitions":
   {
      "created": "2013-09-27 10:01:29",
      "disclaimer": "",
      "copyright": Copyright (c) 2013, WHG (International) Limited. All rights reserved.",
      "category": {
         "id": "1",
         "displayOrder": "1",
         "name": "American Football",
         "code": "AMERICAN_FB"
         "class": {
            "id": "19",
            "channels": "IPLYFBJSCMHQGNAEVU",
            "displayOrder": "9999",
            "name": "American Football"
         }
      }
   }
}
Status: 200 (Ok) - Fault 10070 - Missing classId
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10070</faultCode>
         <faultString>Missing request parameter.</faultString>
         <faultName>classId</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10070",
               "faultString":"Missing request parameter",
               "faultName":"classId"
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10071 - Invalid classId
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10071</faultCode>
         <faultString>Invalid request parameter.</faultString>
         <faultName>classId</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10071",
               "faultString":"Invalid request parameter.",
               "faultName":"classId"
            }
         ]
      }
   ]
}
getTypesByClass()
Retrievesretrieve all types within an individual class ID. For example: English Premier League, English League Division One, etc. within UK Football (class ID - 1). The header response contains the Cache Control and Expires headers, which inform the remote client how long it should retain and redisplay the response before sending a request to the server for and updated response. The Cache control time for this request is 21,600 seconds (6 hours).
Request Example
GET /v1/competitions/classes/{classId}/types HTTP/1.1
Host: sandbox.whapi.com
Accept: application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
who-apiKey: l7xxa54460c573b5497c9b24b505xxxxxxxx
Request Parameters
template parameters
NameTypeDescription
classIdinteger
(required)
The id of the class to request information for.
header parameters
NameTypeDescription
who-apiKeystring
(required)
A unique identifier of your application that is generated by the API portal and presented in the header.
acceptstring
(required)
options:
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8, application/vnd.who.Sportsbook+json;v=1;charset=utf-8
The representation of the response.
Response Description
whoCompetitions
Object Name Type Constraints Optional Description
element created String YYYY-MM-DD HH:MM:SS No Date and time the response was created
element disclaimer String - No The William Hill disclaimer notice
element copyright String - No The William Hill copyright notice
node category Node - No The category node
category
Object Name Type Constraints Optional Description
attribute id Integer - No Unique identifier for this category
element displayOrder Integer - No The lower the order number, the more important the entry (can be a negative number)
element name String - No Human-friendly name of the category in the language requested
element code String - No The identifier code of the category
node class Node - No The class node
class
Object Name Type Constraints Optional Description
attribute id Integer - No Unique identifier for this class
element channels String - No The channels where the entry can be accessed
element displayOrder Integer - No The lower the order number, the more important the entry (can be a negative number)
element name String - No Human-friendly name of the class
node type Node - No The types node
type
Object Name Type Constraints Optional Description
attribute id Integer - No Unique identifier for this type
element channels String - No The channels where the entry can be accessed
element displayOrder Integer - No The lower the order number, the more important the entry (can be a negative number)
element lastUpdateDate String YYYY-MM-DD No Date of the last update to the entry
element lastUpdateTime String HH:MM:SS No Time of the last update to the entry
element name String - No Human-friendly name of the type
element url String - No URL of the type in the online sports book
ResponsesExpand AllCollapse All
Status: 200 (Ok) - Success - Information obtained
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <created>2013-09-27 9:58:43</created>
   <disclaimer></disclaimer>
   <copyright>Copyright (c) 2013, WHG (International) Limited. All rights reserved.</copyright>
   <category id="1">
      <displayOrder>1</displayOrder>
      <name>American Football</name>
      <code>AMERICAN_FB</code>
      <class id="19">
         <channels>IPLYFBJSCMHQGNAEVU</channels>
         <displayOrder>9999</displayOrder>
         <name>American Football</name>
         <type id="195">
            <channels>IPLYFBJSCMHQGNAEVU</channels>
            <displayOrder>-998</displayOrder>
            <lastUpdateDate>2015-04-08</lastUpdateDate>
            <lastUpdateTime>03:03:12</lastUpdateTime>
            <name>NFL</name>
            <url>http://sports.williamhill.com/bet/betting/t/195</url>
         </type>
      </class>
   </category>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
"whoCompetitions":
   {
      "created": "2013-09-27 10:01:29",
      "disclaimer": "",
      "copyright": Copyright (c) 2013, WHG (International) Limited. All rights reserved.",
      "category": {
         "id": "1",
         "displayOrder": "1",
         "name": "American Football",
         "code": "AMERICAN_FB"
         "class": {
            "id": "19",
            "channels": "IPLYFBJSCMHQGNAEVU",
            "displayOrder": "9999",
            "name": "American Football",
            "type": [ 
               {
                  "id": "195",
                  "channels": "IPLYFBJSCMHQGNAEVU",
                  "displayOrder": "-998",
                  "lastUpdateDate": "2015-04-08",
                  "lastUpdateTime": "03:03:12",
                  "name": "NFL",
                  "url": "http://sports.williamhill.com/bet/betting/t/195"
               }
            ]
         }
      }
   }
}
Status: 200 (Ok) - Fault 10070 - Missing classId
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10070</faultCode>
         <faultString>Missing request parameter.</faultString>
         <faultName>classId</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10070",
               "faultString":"Missing request parameter",
               "faultName":"classId"
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10071 - Invalid classId
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10071</faultCode>
         <faultString>Invalid request parameter.</faultString>
         <faultName>classId</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10071",
               "faultString":"Invalid request parameter.",
               "faultName":"classId"
            }
         ]
      }
   ]
}
getTypesEventsByClass()
Retrieves all events and types within an individual class ID. For example: UK Football (class ID - 1). The header response contains the Cache Control and Expires headers, which inform the remote client how long it should retain and redisplay the response before sending a request to the server for and updated response. The Cache control time for this request is 900 seconds (15 minutes).
Request Example
GET /v1/competitions/classes/{classId}/types/events HTTP/1.1
Host: sandbox.whapi.com
Accept: application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
who-apiKey: l7xxa54460c573b5497c9b24b505xxxxxxxx
Request Parameters
template parameters
NameTypeDescription
classIdinteger
(required)
The id of the class to request information for.
header parameters
NameTypeDescription
who-apiKeystring
(required)
A unique identifier of your application that is generated by the API portal and presented in the header.
acceptstring
(required)
options:
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8, application/vnd.who.Sportsbook+json;v=1;charset=utf-8
The representation of the response.
query parameters
NameTypeDescription
eventsTodaystring
options:
, Y
If set to Y, the response will only show events running in the current 24 hour period. When the parameter is left blank the response will include all events.
eventsActivestring
options:
, Y, N
If set to Y, the response will only show active events. When the parameter is left blank the response will include all events. If set to N the response will return only events which are not active.
inPlayStartedstring
options:
, Y, N
If set to Y, the response will only show events that have already started. When the parameter is left blank the response will include all events. If set to N the response will return only events for which inplay has not started but will be available.
availableInPlaystring
options:
, Y, N
If set to Y, the response will only show events that are available in play. When the parameter is left blank the response will include all events. If set to N the response will return only events for which inplay is not available.
Response Description
whoCompetitions
Object Name Type Constraints Optional Description
element created String YYYY-MM-DD HH:MM:SS No Date and time the response was created
element disclaimer String - No The William Hill disclaimer notice
element copyright String - No The William Hill copyright notice
node category Node - No The category node
category
Object Name Type Constraints Optional Description
attribute id Integer - No Unique identifier for this category
element displayOrder Integer - No The lower the order number, the more important the entry (can be a negative number)
element name String - No Human-friendly name of the category in the language requested
element code String - No The identifier code of the category
node class Node - No The class node
class
Object Name Type Constraints Optional Description
attribute id Integer - No Unique identifier for this class
element channels String - No The channels where the entry can be accessed
element displayOrder Integer - No The lower the order number, the more important the entry (can be a negative number)
element name String - No Human-friendly name of the class
node type Node - No The types node
type
Object Name Type Constraints Optional Description
attribute id Integer - No Unique identifier for this type
element channels String - No The channels where the entry can be accessed
element displayOrder Integer - No The lower the order number, the more important the entry (can be a negative number)
element lastUpdateDate String YYYY-MM-DD No Date of the last update to the entry
element lastUpdateTime String HH:MM:SS No Time of the last update to the entry
element name String - No Human-friendly name of the type
element url String - No URL of the type in the online sports book
node event Node - No The event node
event
Object Name Type Constraints Optional Description
attribute id Integer - No Unique identifier for this event
element name String - No Human-friendly name of the event
element venue String - Yes The event venue
element status String A|S No The status of the event. A - Active | S - Suspended
element date String YYYY-MM-DD No The date at which the event occurs
element time String HH:MM:SS No The time at which the event occurs
element sort String - No The type of the event (for example: MTCH)
element channels String - No Channels where the entry can be accessed
node betting Node - No The betting node
node availability Node - No The availability node
node inPlay Node - No The inPlay node
element url String - No URL of the event in the online sports book
element raceNum String - Yes Used to provide an order number for event entries at the track, taken from the racecard
element displayed String Y|N No Whether the object is displayed
element displayOrder String - No The lower the order number, the more important the entry (can be a negative number)
element lastUpdateDate String - No The date of the last update to the entry
element lastUpdateTime String HH:MM:SS No The time of the last update to the entry
betting
Object Name Type Constraints Optional Description
element untilDate String YYYY-MM-DD No The date at which betting stops for the entry
element untilTime String HH:MM:SS No The time at which betting stops for the entry
element status String PRICED|OFF|RESULTED|PENDING No The status for betting on that event
availability
Object Name Type Constraints Optional Description
element inPlay String Y|N No Whether betting in running will be available on this event entry
element livePrives String Y|N No Whether the event has live prices
inPlay
Object Name Type Constraints Optional Description
element started String Y|N No Whether this inplay event has started
ResponsesExpand AllCollapse All
Status: 200 (Ok) - Success - Information obtained
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <created>2013-09-27 9:58:43</created>
   <disclaimer></disclaimer>
   <copyright>Copyright (c) 2013, WHG (International) Limited. All rights reserved.</copyright>
   <category id="1">
      <displayOrder>1</displayOrder>
      <name>American Football</name>
      <code>AMERICAN_FB</code>
      <class id="19">
         <channels>IPLYFBJSCMHQGNAEVU</channels>
         <displayOrder>9999</displayOrder>
         <name>American Football</name>
         <type id="195">
            <channels>IPLYFBJSCMHQGNAEVU</channels>
            <displayOrder>-998</displayOrder>
            <lastUpdateDate>2015-04-08</lastUpdateDate>
            <lastUpdateTime>03:03:12</lastUpdateTime>
            <name>NFL</name>
            <url>http://sports.williamhill.com/bet/betting/t/195</url>
            <event id="7155808">
               <name>Super Bowl 50 - Outright</name>
               <venue/>
               <status>A</status>
               <date>2015-04-30</date>
               <time>09:00:00</time>
               <sort>TNMT</sort>
               <channels>IPLYFBJSCMHQGNAEVU</channels>
               <betting>
                  <untilDate>2015-04-30</untilDate>
                  <untilTime>09:00:00</untilTime>
                  <status>PRICED</status>
               </betting>
               <availability>
                  <inPlay>N</inPlay>
                  <livePrices>Y</livePrices>
               </availability>
               <inPlay>
                  <started>N</started>
               </inPlay>
               <url>http://sports.williamhill.com/bet/en-gb/betting/e/195/</url>
               <raceNum/>
               <displayed>Y</displayed>
               <displayOrder>0</displayOrder>
               <lastUpdateDate>2015-04-08</lastUpdateDate>
               <lastUpdateTime>03:04:52</lastUpdateTime>
            </event>
         </type>
      </class>
   </category>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
"whoCompetitions":
   {
      "created": "2013-09-27 10:01:29",
      "disclaimer": "",
      "copyright": Copyright (c) 2013, WHG (International) Limited. All rights reserved.",
      "category": {
         "id": "1",
         "displayOrder": "1",
         "name": "American Football",
         "code": "AMERICAN_FB"
         "class": {
            "id": "19",
            "channels": "IPLYFBJSCMHQGNAEVU",
            "displayOrder": "9999",
            "name": "American Football",
            "type": [ 
               {
                  "id": "195",
                  "channels": "IPLYFBJSCMHQGNAEVU",
                  "displayOrder": "-998",
                  "lastUpdateDate": "2015-04-08",
                  "lastUpdateTime": "03:03:12",
                  "name": "NFL",
                  "url": "http://sports.williamhill.com/bet/betting/t/195",
                  "event": [ 
                     {
                        "id": "7155808",
                        "name": "Super Bowl 50 - Outright",
                        "status": "A",
                        "date": "2015-04-30",
                        "time": "09:00:00",
                        "sort": "TNMT",
                        "channels": "IPLYFBJSCMHQGNAEVU",
                        "betting": {
                           "untilDate": "2015-04-30",
                           "untilTime": "09:00:00",
                           "status": "PRICED"
                        },
                        "availability": {
                           "inPlay": "N",
                           "livePrices": "Y"
                        },
                        "inPlay": { "started": "N" },
                        "url": "http://sports.williamhill.com/bet/en-gb/betting/e/195/",
                        "displayed": "Y",
                        "displayOrder": "0",
                        "lastUpdateDate": "2015-04-08",
                        "lastUpdateTime": "03:04:52"
                     }
                  ]
               }
            ]
         }
      }
   }
}
Status: 200 (Ok) - Fault 10070 - Missing classId
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10070</faultCode>
         <faultString>Missing request parameter.</faultString>
         <faultName>classId</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10070",
               "faultString":"Missing request parameter",
               "faultName":"classId"
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10071 - Invalid classId
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10071</faultCode>
         <faultString>Invalid request parameter.</faultString>
         <faultName>classId</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10071",
               "faultString":"Invalid request parameter.",
               "faultName":"classId"
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10071 - Invalid eventsToday
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10071</faultCode>
         <faultString>Invalid request parameter.</faultString>
         <faultName>eventsToday</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10071",
               "faultString":"Invalid request parameter.",
               "faultName":"eventsToday"
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10071 - Invalid eventsActive
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10071</faultCode>
         <faultString>Invalid request parameter.</faultString>
         <faultName>eventsActive</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10071",
               "faultString":"Invalid request parameter.",
               "faultName":"eventsActive"
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10071 - Invalid inPlayStarted
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10071</faultCode>
         <faultString>Invalid request parameter.</faultString>
         <faultName>inPlayStarted</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10071",
               "faultString":"Invalid request parameter.",
               "faultName":"inPlayStarted"
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10071 - Invalid availableInPlay
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10071</faultCode>
         <faultString>Invalid request parameter.</faultString>
         <faultName>availableInPlay</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10071",
               "faultString":"Invalid request parameter.",
               "faultName":"availableInPlay"
            }
         ]
      }
   ]
}
getTypes()
Retrieves a complete list of all available types.
Request Example
GET /v1/competitions/types HTTP/1.1
Host: sandbox.whapi.com
Accept: application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
who-apiKey: l7xxa54460c573b5497c9b24b505xxxxxxxx
Request Parameters
header parameters
NameTypeDescription
who-apiKeystring
(required)
A unique identifier of your application that is generated by the API portal and presented in the header.
acceptstring
(required)
options:
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8, application/vnd.who.Sportsbook+json;v=1;charset=utf-8
The representation of the response.
Response Description
whoCompetitions
Object Name Type Constraints Optional Description
element created String YYYY-MM-DD HH:MM:SS No Date and time the response was created
element disclaimer String - No The William Hill disclaimer notice
element copyright String - No The William Hill copyright notice
node category Node - No The category node
category
Object Name Type Constraints Optional Description
attribute id Integer - No Unique identifier for this category
element displayOrder Integer - No The lower the order number, the more important the entry (can be a negative number)
element name String - No Human-friendly name of the category in the language requested
element code String - No The identifier code of the category
node class Node - No The class node
class
Object Name Type Constraints Optional Description
attribute id Integer - No Unique identifier for this class
element channels String - No The channels where the entry can be accessed
element displayOrder Integer - No The lower the order number, the more important the entry (can be a negative number)
element name String - No Human-friendly name of the class
node type Node - No The types node
type
Object Name Type Constraints Optional Description
attribute id Integer - No Unique identifier for this type
element channels String - No The channels where the entry can be accessed
element displayOrder Integer - No The lower the order number, the more important the entry (can be a negative number)
element lastUpdateDate String YYYY-MM-DD No Date of the last update to the entry
element lastUpdateTime String HH:MM:SS No Time of the last update to the entry
element name String - No Human-friendly name of the type
element url String - No URL of the type in the online sports book
ResponsesExpand AllCollapse All
Status: 200 (Ok) - Success - Information obtained
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <created>2013-09-27 9:58:43</created>
   <disclaimer></disclaimer>
   <copyright>Copyright (c) 2013, WHG (International) Limited. All rights reserved.</copyright>
   <category id="1">
      <displayOrder>1</displayOrder>
      <name>American Football</name>
      <code>AMERICAN_FB</code>
      <class id="19">
         <channels>IPLYFBJSCMHQGNAEVU</channels>
         <displayOrder>9999</displayOrder>
         <name>American Football</name>
         <type id="195">
            <channels>IPLYFBJSCMHQGNAEVU</channels>
            <displayOrder>-998</displayOrder>
            <lastUpdateDate>2015-04-08</lastUpdateDate>
            <lastUpdateTime>03:03:12</lastUpdateTime>
            <name>NFL</name>
            <url>http://sports.williamhill.com/bet/betting/t/195</url>
         </type>
      </class>
   </category>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
"whoCompetitions":
   {
      "created": "2013-09-27 10:01:29",
      "disclaimer": "",
      "copyright": Copyright (c) 2013, WHG (International) Limited. All rights reserved.",
      "category": [
         {
            "id": "1",
            "displayOrder": "1",
            "name": "American Football",
            "code": "AMERICAN_FB"
            "class": [
               {
                  "id": "19",
                  "channels": "IPLYFBJSCMHQGNAEVU",
                  "displayOrder": "9999",
                  "name": "American Football",
                  "type": [ 
                     {
                        "id": "195",
                        "channels": "IPLYFBJSCMHQGNAEVU",
                        "displayOrder": "-998",
                        "lastUpdateDate": "2015-04-08",
                        "lastUpdateTime": "03:03:12",
                        "name": "NFL",
                        "url": "http://sports.williamhill.com/bet/betting/t/195"
                     }
                  ]
               }
            ]
         }
      ]
   }
}
getType()
Retrieves an individual type by defining the type ID. For example: 295 is the identifier for the English Premier League. The header response contains the Cache Control and Expires headers, which inform the remote client how long it should retain and redisplay the response before sending a request to the server for and updated response. The Cache control time for this request is 21,600 seconds (6 hours).
Request Example
GET /v1/competitions/types/{typeId} HTTP/1.1
Host: sandbox.whapi.com
Accept: application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
who-apiKey: l7xxa54460c573b5497c9b24b505xxxxxxxx
Request Parameters
template parameters
NameTypeDescription
typeIdinteger
(required)
The id of the type to request information for.
header parameters
NameTypeDescription
who-apiKeystring
(required)
A unique identifier of your application that is generated by the API portal and presented in the header.
acceptstring
(required)
options:
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8, application/vnd.who.Sportsbook+json;v=1;charset=utf-8
The representation of the response.
Response Description
whoCompetitions
Object Name Type Constraints Optional Description
element created String YYYY-MM-DD HH:MM:SS No Date and time the response was created
element disclaimer String - No The William Hill disclaimer notice
element copyright String - No The William Hill copyright notice
node category Node - No The category node
category
Object Name Type Constraints Optional Description
attribute id Integer - No Unique identifier for this category
element displayOrder Integer - No The lower the order number, the more important the entry (can be a negative number)
element name String - No Human-friendly name of the category in the language requested
element code String - No The identifier code of the category
node class Node - No The class node
class
Object Name Type Constraints Optional Description
attribute id Integer - No Unique identifier for this class
element channels String - No The channels where the entry can be accessed
element displayOrder Integer - No The lower the order number, the more important the entry (can be a negative number)
element name String - No Human-friendly name of the class
node type Node - No The types node
type
Object Name Type Constraints Optional Description
attribute id Integer - No Unique identifier for this type
element channels String - No The channels where the entry can be accessed
element displayOrder Integer - No The lower the order number, the more important the entry (can be a negative number)
element lastUpdateDate String YYYY-MM-DD No Date of the last update to the entry
element lastUpdateTime String HH:MM:SS No Time of the last update to the entry
element name String - No Human-friendly name of the type
element url String - No URL of the type in the online sports book
ResponsesExpand AllCollapse All
Status: 200 (Ok) - Success - Information obtained
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <created>2013-09-27 9:58:43</created>
   <disclaimer></disclaimer>
   <copyright>Copyright (c) 2013, WHG (International) Limited. All rights reserved.</copyright>
   <category id="1">
      <displayOrder>1</displayOrder>
      <name>American Football</name>
      <code>AMERICAN_FB</code>
      <class id="19">
         <channels>IPLYFBJSCMHQGNAEVU</channels>
         <displayOrder>9999</displayOrder>
         <name>American Football</name>
         <type id="195">
            <channels>IPLYFBJSCMHQGNAEVU</channels>
            <displayOrder>-998</displayOrder>
            <lastUpdateDate>2015-04-08</lastUpdateDate>
            <lastUpdateTime>03:03:12</lastUpdateTime>
            <name>NFL</name>
            <url>http://sports.williamhill.com/bet/betting/t/195</url>
         </type>
      </class>
   </category>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
"whoCompetitions":
   {
      "created": "2013-09-27 10:01:29",
      "disclaimer": "",
      "copyright": Copyright (c) 2013, WHG (International) Limited. All rights reserved.",
      "category": {
         "id": "1",
         "displayOrder": "1",
         "name": "American Football",
         "code": "AMERICAN_FB"
         "class": {
            "id": "19",
            "channels": "IPLYFBJSCMHQGNAEVU",
            "displayOrder": "9999",
            "name": "American Football",
            "type": {
               "id": "195",
               "channels": "IPLYFBJSCMHQGNAEVU",
               "displayOrder": "-998",
               "lastUpdateDate": "2015-04-08",
               "lastUpdateTime": "03:03:12",
               "name": "NFL",
               "url": "http://sports.williamhill.com/bet/betting/t/195"
            }
         }
      }
   }
}
Status: 200 (Ok) - Fault 10070 - Missing typeId
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10070</faultCode>
         <faultString>Missing request parameter.</faultString>
         <faultName>typeId</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10070",
               "faultString":"Missing request parameter",
               "faultName":"typeId"
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10071 - Invalid typeId
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10071</faultCode>
         <faultString>Invalid request parameter.</faultString>
         <faultName>typeId</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10071",
               "faultString":"Invalid request parameter.",
               "faultName":"typeId"
            }
         ]
      }
   ]
}
getEventsByType()
Retrieves the events within an individual type by defining the type ID. For example: 344 – UEFA Champions League. The header response contains the Cache Control and Expires headers, which inform the remote client how long it should retain and redisplay the response before sending a request to the server for and updated response. The Cache control time for this request is 900 seconds (15 minutes).
Request Example
GET /v1/competitions/types/{typeId}/events HTTP/1.1
Host: sandbox.whapi.com
Accept: application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
who-apiKey: l7xxa54460c573b5497c9b24b505xxxxxxxx
Request Parameters
template parameters
NameTypeDescription
typeIdinteger
(required)
The id of the type to request information for.
header parameters
NameTypeDescription
who-apiKeystring
(required)
A unique identifier of your application that is generated by the API portal and presented in the header.
acceptstring
(required)
options:
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8, application/vnd.who.Sportsbook+json;v=1;charset=utf-8
The representation of the response.
query parameters
NameTypeDescription
eventsTodaystring
options:
, Y
If set to Y, the response will only show events running in the current 24 hour period. When the parameter is left blank the response will include all events.
eventsActivestring
options:
, Y, N
If set to Y, the response will only show active events. When the parameter is left blank the response will include all events. If set to N the response will return only events which are not active.
inPlayStartedstring
options:
, Y, N
If set to Y, the response will only show events that have already started. When the parameter is left blank the response will include all events. If set to N the response will return only events for which inplay has not started but will be available.
availableInPlaystring
options:
, Y, N
If set to Y, the response will only show events that are available in play. When the parameter is left blank the response will include all events. If set to N the response will return only events for which inplay is not available.
Response Description
whoCompetitions
Object Name Type Constraints Optional Description
element created String YYYY-MM-DD HH:MM:SS No Date and time the response was created
element disclaimer String - No The William Hill disclaimer notice
element copyright String - No The William Hill copyright notice
node category Node - No The category node
category
Object Name Type Constraints Optional Description
attribute id Integer - No Unique identifier for this category
element displayOrder Integer - No The lower the order number, the more important the entry (can be a negative number)
element name String - No Human-friendly name of the category in the language requested
element code String - No The identifier code of the category
node class Node - No The class node
class
Object Name Type Constraints Optional Description
attribute id Integer - No Unique identifier for this class
element channels String - No The channels where the entry can be accessed
element displayOrder Integer - No The lower the order number, the more important the entry (can be a negative number)
element name String - No Human-friendly name of the class
node type Node - No The types node
type
Object Name Type Constraints Optional Description
attribute id Integer - No Unique identifier for this type
element channels String - No The channels where the entry can be accessed
element displayOrder Integer - No The lower the order number, the more important the entry (can be a negative number)
element lastUpdateDate String YYYY-MM-DD No Date of the last update to the entry
element lastUpdateTime String HH:MM:SS No Time of the last update to the entry
element name String - No Human-friendly name of the type
element url String - No URL of the type in the online sports book
node event Node - No The event node
event
Object Name Type Constraints Optional Description
attribute id Integer - No Unique identifier for this event
element name String - No Human-friendly name of the event
element venue String - Yes The event venue
element status String A|S No The status of the event. A - Active | S - Suspended
element date String YYYY-MM-DD No The date at which the event occurs
element time String HH:MM:SS No The time at which the event occurs
element sort String - No The type of the event (for example: MTCH)
element channels String - No Channels where the entry can be accessed
node betting Node - No The betting node
node availability Node - No The availability node
node inPlay Node - No The inPlay node
element url String - No URL of the event in the online sports book
element raceNum String - Yes Used to provide an order number for event entries at the track, taken from the racecard
element displayed String Y|N No Whether the object is displayed
element displayOrder String - No The lower the order number, the more important the entry (can be a negative number)
element lastUpdateDate String - No The date of the last update to the entry
element lastUpdateTime String HH:MM:SS No The time of the last update to the entry
betting
Object Name Type Constraints Optional Description
element untilDate String YYYY-MM-DD No The date at which betting stops for the entry
element untilTime String HH:MM:SS No The time at which betting stops for the entry
element status String PRICED|OFF|RESULTED|PENDING No The status for betting on that event
availability
Object Name Type Constraints Optional Description
element inPlay String Y|N No Whether betting in running will be available on this event entry
element livePrives String Y|N No Whether the event has live prices
inPlay
Object Name Type Constraints Optional Description
element started String Y|N No Whether this inplay event has started
ResponsesExpand AllCollapse All
Status: 200 (Ok) - Success - Information obtained
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <created>2013-09-27 9:58:43</created>
   <disclaimer></disclaimer>
   <copyright>Copyright (c) 2013, WHG (International) Limited. All rights reserved.</copyright>
   <category id="1">
      <displayOrder>1</displayOrder>
      <name>American Football</name>
      <code>AMERICAN_FB</code>
      <class id="19">
         <channels>IPLYFBJSCMHQGNAEVU</channels>
         <displayOrder>9999</displayOrder>
         <name>American Football</name>
         <type id="195">
            <channels>IPLYFBJSCMHQGNAEVU</channels>
            <displayOrder>-998</displayOrder>
            <lastUpdateDate>2015-04-08</lastUpdateDate>
            <lastUpdateTime>03:03:12</lastUpdateTime>
            <name>NFL</name>
            <url>http://sports.williamhill.com/bet/betting/t/195</url>
            <event id="7155808">
               <name>Super Bowl 50 - Outright</name>
               <venue/>
               <status>A</status>
               <date>2015-04-30</date>
               <time>09:00:00</time>
               <sort>TNMT</sort>
               <channels>IPLYFBJSCMHQGNAEVU</channels>
               <betting>
                  <untilDate>2015-04-30</untilDate>
                  <untilTime>09:00:00</untilTime>
                  <status>PRICED</status>
               </betting>
               <availability>
                  <inPlay>N</inPlay>
                  <livePrices>Y</livePrices>
               </availability>
               <inPlay>
                  <started>N</started>
               </inPlay>
               <url>http://sports.williamhill.com/bet/en-gb/betting/e/195/</url>
               <raceNum/>
               <displayed>Y</displayed>
               <displayOrder>0</displayOrder>
               <lastUpdateDate>2015-04-08</lastUpdateDate>
               <lastUpdateTime>03:04:52</lastUpdateTime>
            </event>
         </type>
      </class>
   </category>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
"whoCompetitions":
   {
      "created": "2013-09-27 10:01:29",
      "disclaimer": "",
      "copyright": Copyright (c) 2013, WHG (International) Limited. All rights reserved.",
      "category": {
         "id": "1",
         "displayOrder": "1",
         "name": "American Football",
         "code": "AMERICAN_FB"
         "class": {
            "id": "19",
            "channels": "IPLYFBJSCMHQGNAEVU",
            "displayOrder": "9999",
            "name": "American Football",
            "type": {
               "id": "195",
               "channels": "IPLYFBJSCMHQGNAEVU",
               "displayOrder": "-998",
               "lastUpdateDate": "2015-04-08",
               "lastUpdateTime": "03:03:12",
               "name": "NFL",
               "url": "http://sports.williamhill.com/bet/betting/t/195",
               "event": [ 
                  {
                     "id": "7155808",
                     "name": "Super Bowl 50 - Outright",
                     "status": "A",
                     "date": "2015-04-30",
                     "time": "09:00:00",
                     "sort": "TNMT",
                     "channels": "IPLYFBJSCMHQGNAEVU",
                     "betting": {
                        "untilDate": "2015-04-30",
                        "untilTime": "09:00:00",
                        "status": "PRICED"
                     },
                     "availability": {
                        "inPlay": "N",
                        "livePrices": "Y"
                     },
                     "inPlay": { "started": "N" },
                     "url": "http://sports.williamhill.com/bet/en-gb/betting/e/195/",
                     "displayed": "Y",
                     "displayOrder": "0",
                     "lastUpdateDate": "2015-04-08",
                     "lastUpdateTime": "03:04:52"
                  }
               ]
            }
         }
      }
   }
}
Status: 200 (Ok) - Fault 10070 - Missing typeId
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10070</faultCode>
         <faultString>Missing request parameter.</faultString>
         <faultName>typeId</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10070",
               "faultString":"Missing request parameter",
               "faultName":"typeId"
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10071 - Invalid typeId
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10071</faultCode>
         <faultString>Invalid request parameter.</faultString>
         <faultName>typeId</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10071",
               "faultString":"Invalid request parameter.",
               "faultName":"typeId"
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10071 - Invalid eventsToday
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10071</faultCode>
         <faultString>Invalid request parameter.</faultString>
         <faultName>eventsToday</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10071",
               "faultString":"Invalid request parameter.",
               "faultName":"eventsToday"
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10071 - Invalid eventsActive
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10071</faultCode>
         <faultString>Invalid request parameter.</faultString>
         <faultName>eventsActive</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10071",
               "faultString":"Invalid request parameter.",
               "faultName":"eventsActive"
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10071 - Invalid inPlayStarted
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10071</faultCode>
         <faultString>Invalid request parameter.</faultString>
         <faultName>inPlayStarted</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10071",
               "faultString":"Invalid request parameter.",
               "faultName":"inPlayStarted"
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10071 - Invalid availableInPlay
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10071</faultCode>
         <faultString>Invalid request parameter.</faultString>
         <faultName>availableInPlay</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10071",
               "faultString":"Invalid request parameter.",
               "faultName":"availableInPlay"
            }
         ]
      }
   ]
}
getSuggestedOutcomesByType()
Suggests outcomes for a specific type.
Request Example
POST /v1/competitions/types/10/outcomes/suggestions?stake=100&numOutcomes=10&expectedReturns=1000 HTTP/1.1
Host: sandbox.whapi.com
Accept: application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
who-apiKey: l7xxa54460c573b5497c9b24b505xxxxxxxx
Payload:
<whoCompetitions>                 
   <suggestions>
      <outcome id="26190681" suggestion="exclude" />
      <outcome id="26190693" suggestion="exclude" />
      <outcome id="26190697" suggestion="held">                          
         <odds>
            <livePrice>
               <priceNum>16</priceNum>
               <priceDen>1</priceDen>
               <priceDec>17</priceDec>
            </livePrice>
         </odds>
      </outcome>                       
      <!-- MORE -->
   </suggestions>
</whoCompetitions>
Request Description
whoCompetitions
Object Name Type Constraints Optional Description
node suggestions - - No The suggestions node
suggestions
Object Name Type Constraints Optional Description
node outcome Node - No The outcome node
outcome
Object Name Type Constraints Optional Description
attribute id String - No The outcome identifier
attribute suggestion String - No The outcome suggestion
node odds Node - Yes The odds node
odds
Object Name Type Constraints Optional Description
node livePrice - - No The livePrice node
livePrice
>
Object Name Type Constraints Optional Description
element priceNum Float (?=.*\d)\d*(?:\.\d\d)? No When the odds are shown in vulgar fractions this is the numerator of the fraction. For example: 5 in 5/2
element priceDen Float (?=.*\d)\d*(?:\.\d\d)? No When the odds are shown in vulgar fractions this is the denominator of the fraction. For example: 2 in 5/2
element priceDec Float (?=.*\d)\d*(?:\.\d\d)? No The price in decimal format
Request Parameters
template parameters
NameTypeDescription
typeIdinteger
(required)
The id of the type to request information for.
header parameters
NameTypeDescription
who-apiKeystring
(required)
A unique identifier of your application that is generated by the API portal and presented in the header.
acceptstring
(required)
options:
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8, application/vnd.who.Sportsbook+json;v=1;charset=utf-8
The representation of the response.
query parameters
NameTypeDescription
stakestring
(required)
Enter a value for the stake parameter.
numOutcomesstring
(required)
Enter how many outcomes you want to be included in the response. The maximum number for the outcome is 100.
expectedReturnsstring
(required)
Enter the amount you want to make on your stake.
Response Description
whoCompetitions
Object Name Type Constraints Optional Description
element estimatedReturns Float (?=.*\d)\d*(?:\.\d\d)? No Estimated returns
node suggestions - - No Suggestions node
suggestions
Object Name Type Constraints Optional Description
node outcome - - No Outcome node
outcome
Object Name Type Constraints Optional Description
attribute id Integer [0-9]* No Id of the outcome
attribute suggestion String NEW|HELD|EXCLUDED No Type of the outcome
element name String - No Human-friendly name of the outcome
node odds Node - No Odds node
node sport Node - No The sport node
node type Node - No The type node
odds
Object Name Type Constraints Optional Description
node livePrice - - No The livePrice node
livePrice
Object Name Type Constraints Optional Description
element priceNum Float (?=.*\d)\d*(?:\.\d\d)? No When the odds are shown in vulgar fractions this is the numerator of the fraction. For example: 5 in 5/2
element priceDen Float (?=.*\d)\d*(?:\.\d\d)? No When the odds are shown in vulgar fractions this is the denominator of the fraction. For example: 2 in 5/2
element priceDec Float (?=.*\d)\d*(?:\.\d\d)? No The price in decimal format
element priceFrac String - No Odds for this outcome in fractional format
sport
Object Name Type Constraints Optional Description
attribute id Integer [0-9]* No Id of the sport
element name String - No Name of the sport
type
Object Name Type Constraints Optional Description
attribute id Integer [0-9]* No Id of the type
element name String - No Name of the Type
node event - - No Event node
event
Object Name Type Constraints Optional Description
attribute id Integer [0-9]* No Id of the event
element name String - No Name of the Event
node market - - No Market node
market
Object Name Type Constraints Optional Description
attribute id Integer [0-9]* No Id of the market
element name String - No Name of the Market
ResponsesExpand AllCollapse All
Status: 200 (Ok) - Success - Outcomes returned that match suggested criteria
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <estimatedReturns>12345.67</estimatedReturns>
   <suggestions>
      <outcome id="26190696" suggestion="new">                                      
         <name>Gold Gleam</name>
         <odds>
            <livePrice>
               <priceNum>4</priceNum>
               <priceDen>1</priceDen>
               <priceDec>5</priceDec>
               <priceFrac>4/1</priceFrac>
            </livePrice>
         </odds>
         <sport id="2">
            <name>Horse Racing</name>
         </sport>
         <type id="184">
            <name>Leicester</name>
            <event id="1135765">
               <name>8:00 Leicester</name>
               <market id="4811009">
                  <name>Win</name>
               </market>
            </event>
         </type>
      </outcome>
      <outcome id="26190697" suggestion="new">                                       
         <name>Koha</name>
         <odds>
            <livePrice>
               <priceNum>16</priceNum>
               <priceDen>1</priceDen>
               <priceDec>17</priceDec>
               <priceFrac>16/1</priceFrac>
            </livePrice>
         </odds>
         <sport id="2">
            <name>Horse Racing</name>
         </sport>
         <type id="185">
            <name>Windsor</name>
            <event id="1135781">
               <name>6:10 Windsor</name>
               <market id="4811025">
                  <name>Win</name>
               </market>
            </event>
         </type>
      </outcome>
   </suggestions>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
  "whoCompetitions": {
    "estimatedReturns": "12345.67",
    "suggestions": {
      "outcome": [
        {
          "id": "26190696",
          "suggestion": "new",
          "name": "Gold Gleam",
          "odds": {
            "livePrice": {
              "priceNum": "4",
              "priceDen": "1",
              "priceDec": "5",
              "priceFrac": "4/1"
            }
          },
          "sport": {
            "id": "2",
            "name": "Horse Racing"
          },
          "type": {
            "id": "184",
            "name": "Leicester",
            "event": {
              "id": "1135765",
              "name": "8:00 Leicester",
              "market": {
                "id": "4811009",
                "name": "Win"
              }
            }
          }
        },
        {
          "id": "26190697",
          "suggestion": "new",
          "name": "Koha",
          "odds": {
            "livePrice": {
              "priceNum": "16",
              "priceDen": "1",
              "priceDec": "17",
              "priceFrac": "16/1"
            }
          },
          "sport": {
            "id": "2",
            "name": "Horse Racing"
          },
          "type": {
            "id": "185",
            "name": "Windsor",
            "event": {
              "id": "1135781",
              "name": "6:10 Windsor",
              "market": {
                "id": "4811025",
                "name": "Win"
              }
            }
          }
        }
      ]
    }
  }
}
Status: 200 (Ok) - Fault 10070 - Missing typeId
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10070</faultCode>
         <faultString>Missing request parameter.</faultString>
         <faultName>typeId</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10070",
               "faultString":"Missing request parameter",
               "faultName":"typeId"
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10070 - No outcomes requested
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10070</faultCode>
         <faultString>Missing request parameter.</faultString>
         <faultName>numOutcomes</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10070",
               "faultString":"Missing request parameter",
               "faultName":"numOutcomes"
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10070 - No stake supplied
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10070</faultCode>
         <faultString>Missing request parameter.</faultString>
         <faultName>stake</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10070",
               "faultString":"Missing request parameter",
               "faultName":"stake"
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10070 - No estimatedReturns supplied
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10070</faultCode>
         <faultString>Missing request parameter.</faultString>
         <faultName>estimatedReturns</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10070",
               "faultString":"Missing request parameter",
               "faultName":"estimatedReturns"
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10070 - Missing outcome id
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10070</faultCode>
         <faultString>Missing request parameter.</faultString>
         <faultName>outcome.id</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10070",
               "faultString":"Missing request parameter",
               "faultName":"outcome.id"
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10070 - Missing outcome suggestion
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10070</faultCode>
         <faultString>Missing request parameter.</faultString>
         <faultName>outcome.suggestion</faultName>
         <solution><outcome id="26190697" /></solution>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10070",
               "faultString":"Missing request parameter",
               "faultName":"outcome.suggestion"
               "solution": {
          	      "outcome": { "id": "26190697" }
               }
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10070 - Missing priceNum
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10070</faultCode>
         <faultString>Missing request parameter.</faultString>
         <faultName>priceNum</faultName>
         <solution><outcome id="26190697" /></solution>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10070",
               "faultString":"Missing request parameter",
               "faultName":"priceNum"
               "solution": {
          	      "outcome": { "id": "26190697" }
               }
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10070 - Missing priceDen
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10070</faultCode>
         <faultString>Missing request parameter.</faultString>
         <faultName>priceDen</faultName>
         <solution><outcome id="26190697" /></solution>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10070",
               "faultString":"Missing request parameter",
               "faultName":"priceDen"
               "solution": {
          	      "outcome": { "id": "26190697" }
               }
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10070 - Missing priceDec
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10070</faultCode>
         <faultString>Missing request parameter.</faultString>
         <faultName>priceDec</faultName>
         <solution><outcome id="26190697" /></solution>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10070",
               "faultString":"Missing request parameter",
               "faultName":"priceDec"
               "solution": {
          	      "outcome": { "id": "26190697" }
               }
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10071 - Invalid typeId
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10071</faultCode>
         <faultString>Invalid request parameter.</faultString>
         <faultName>typeId</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10071",
               "faultString":"Invalid request parameter.",
               "faultName":"typeId"
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10071 - Invalid numOutcomes, should be an integer between 1 and 10
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10071</faultCode>
         <faultString>Invalid request parameter.</faultString>
         <faultName>numOutcomes</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10071",
               "faultString":"Invalid request parameter.",
               "faultName":"numOutcomes"
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10071 - Invalid stake, should be a GBP monetary amount
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10071</faultCode>
         <faultString>Invalid request parameter.</faultString>
         <faultName>stake</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10071",
               "faultString":"Invalid request parameter.",
               "faultName":"stake"
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10071 - Invalid estimatedReturns, should be a GBP monetary amount
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10071</faultCode>
         <faultString>Invalid request parameter.</faultString>
         <faultName>estimatedReturns</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10071",
               "faultString":"Invalid request parameter.",
               "faultName":"estimatedReturns"
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10071 - Invalid outcome id
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10071</faultCode>
         <faultString>Invalid request parameter.</faultString>
         <faultName>outcome.id</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10071",
               "faultString":"Invalid request parameter.",
               "faultName":"outcome.id"
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10071 - Invalid outcome suggestion
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10071</faultCode>
         <faultString>Invalid request parameter.</faultString>
         <faultName>outcome.suggestion</faultName>
         <solution><outcome id="26190697" /></solution>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10071",
               "faultString":"Invalid request parameter.",
               "faultName":"outcome.suggestion"
               "solution": {
          	      "outcome": { "id": "26190697" }
               }
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10071 - Invalid priceNum (not an integer)
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10071</faultCode>
         <faultString>Invalid request parameter.</faultString>
         <faultName>priceNum</faultName>
         <solution><outcome id="26190697" /></solution>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10071",
               "faultString":"Invalid request parameter.",
               "faultName":"priceNum"
               "solution": {
          	      "outcome": { "id": "26190697" }
               }
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10071 - Invalid priceDen (not an integer)
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10071</faultCode>
         <faultString>Invalid request parameter.</faultString>
         <faultName>priceDen</faultName>
         <solution><outcome id="26190697" /></solution>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10071",
               "faultString":"Invalid request parameter.",
               "faultName":"priceDen"
               "solution": {
          	      "outcome": { "id": "26190697" }
               }
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10071 - Invalid priceDec (not an integer)
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10071</faultCode>
         <faultString>Invalid request parameter.</faultString>
         <faultName>priceDec</faultName>
         <solution><outcome id="26190697" /></solution>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10071",
               "faultString":"Invalid request parameter.",
               "faultName":"priceDec"
               "solution": {
          	      "outcome": { "id": "26190697" }
               }
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 27010 - Not enough suggestions to support numOutcomes
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>27010</faultCode>
         <faultString>Too few outcomes available for a suggestion.</faultString>
         <faultName>numOutcomes</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"27010",
               "faultString":"Too few outcomes available for a suggestion.",
               "faultName":"numOutcomes"
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 27020 - stake and/or expectedReturns combination returns no results
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>27020</faultCode>
         <faultString>stake and/or expectedReturns combination returns no results.</faultString>
         <faultName>stake and/or expectedReturns</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"27020",
               "faultString":"stake and/or expectedReturns combination returns no results.",
               "faultName":"stake and/or expectedReturns"
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 27030 - Too few outcomes requested for a suggestion
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>27030</faultCode>
         <faultString>Too few outcomes requested for a suggestion.</faultString>
         <faultName>numOutcomes</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"27030",
               "faultString":"Too few outcomes requested for a suggestion.",
               "faultName":"numOutcomes"
            }
         ]
      }
   ]
}
getEvent()
Retrieves an individual event by defining the event ID. This request returns the event without odds, scores or commentaries. The header response contains the Cache Control and Expires headers, which inform the remote client how long it should retain and redisplay the response before sending a request to the server for and updated response. The Cache control time for this request is 4 seconds.
Request Example
GET /v1/competitions/events/{eventId} HTTP/1.1
Host: sandbox.whapi.com
Accept: application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
who-apiKey: l7xxa54460c573b5497c9b24b505xxxxxxxx
Request Parameters
template parameters
NameTypeDescription
eventIdinteger
(required)
The id of the event to request information for. Note, that if you execute the request without an eventID you will get back a ' Fault 10070 - Missing eventId' error and it's also possible the performance of our services may be affected if you make too many attempts executing the call without an eventID.
header parameters
NameTypeDescription
who-apiKeystring
(required)
A unique identifier of your application that is generated by the API portal and presented in the header.
acceptstring
(required)
options:
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8, application/vnd.who.Sportsbook+json;v=1;charset=utf-8
The representation of the response.
Response Description
whoCompetitions
Object Name Type Constraints Optional Description
element created String YYYY-MM-DD HH:MM:SS No Date and time the response was created
element disclaimer String - No The William Hill disclaimer notice
element copyright String - No The William Hill copyright notice
node event Node Only one child node No The event node
event
Object Name Type Constraints Optional Description
attribute id Integer - No Unique identifier for this event
element name String - No Human-friendly name of the event
element venue String - Yes The event venue
element status String A|S No The status of the event. A - Active | S - Suspended
element date String YYYY-MM-DD No The date at which the event occurs
element time String HH:MM:SS No The time at which the event occurs
element numMarkets Integer - Yes The number of markets in that event
element sort String - No The type of the event (for example: MTCH)
element channels String - No Channels where the entry can be accessed
node betting Node - No The betting node
node availability Node - No The availability node
node inPlay Node - No The inPlay node
element url String - No URL of the event in the online sports book
element flags String - Yes Flags applied to this entry
element raceNum String - Yes Used to provide an order number for event entries at the track, taken from the racecard
element displayOrder String - No The lower the order number, the more important the entry (can be a negative number)
element lastUpdateDate String - No The date of the last update to the entry
element lastUpdateTime String HH:MM:SS No The time of the last update to the entry
betting
Object Name Type Constraints Optional Description
element untilDate String YYYY-MM-DD No The date at which betting stops for the entry
element untilTime String HH:MM:SS No The time at which betting stops for the entry
element status String PRICED|OFF|RESULTED|PENDING No The status for betting on that event
availability
Object Name Type Constraints Optional Description
element inPlay String Y|N No Whether betting in running will be available on this event entry
element livePrives String Y|N No Whether the event has live prices
inPlay
Object Name Type Constraints Optional Description
element started String Y|N No Whether this inplay event has started
ResponsesExpand AllCollapse All
Status: 200 (Ok) - Success - Information obtained
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <created>2013-09-27 9:58:43</created>
   <disclaimer></disclaimer>
   <copyright>Copyright (c) 2013, WHG (International) Limited. All rights reserved.</copyright>
   <event id="7155808">
      <name>Super Bowl 50 - Outright</name>
      <venue/>
      <status>A</status>
      <date>2015-04-30</date>
      <time>09:00:00</time>
      <numMarkets/>
      <sort>TNMT</sort>
      <channels>IPLYFBJSCMHQGNAEVU</channels>
      <betting>
         <untilDate>2015-04-30</untilDate>
         <untilTime>09:00:00</untilTime>
         <status>PRICED</status>
      </betting>
      <availability>
         <inPlay>N</inPlay>
      </availability>
      <inPlay>
         <started>N</started>
      </inPlay>
      <url>http://sports.williamhill.com/bet/en-gb/betting/e/7155808/Super%2dBowl%2d50%2d%2d%2dOutright</url>
      <flags/>
      <raceNum/>
      <displayOrder>0</displayOrder>
      <lastUpdateDate>2015-04-08</lastUpdateDate>
      <lastUpdateTime>03:04:52</lastUpdateTime>
   </event>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
"whoCompetitions":
   {
      "created": "2013-09-27 10:01:29",
      "disclaimer": "",
      "copyright": Copyright (c) 2013, WHG (International) Limited. All rights reserved.",
      "event": {
         "id": "7155808",
         "name": "Super Bowl 50 - Outright",
         "status": "A",
         "date": "2015-04-30",
         "time": "09:00:00",
         "sort": "TNMT",
         "channels": "IPLYFBJSCMHQGNAEVU",
         "betting": {
           "untilDate": "2015-04-30",
           "untilTime": "09:00:00",
           "status": "PRICED"
         },
         "availability": { "inPlay": "N" },
         "inPlay": { "started": "N" },
         "url": "http://sports.williamhill.com/bet/en-gb/betting/e/7155808/Super%2dBowl%2d50%2d%2d%2dOutright",
         "displayOrder": "0",
         "lastUpdateDate": "2015-04-08",
         "lastUpdateTime": "03:04:52"
      }
   }
}
Status: 200 (Ok) - Fault 10070 - Missing eventId
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10070</faultCode>
         <faultString>Missing request parameter.</faultString>
         <faultName>eventId</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10070",
               "faultString":"Missing request parameter",
               "faultName":"eventId"
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10071 - Invalid eventId
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10071</faultCode>
         <faultString>Invalid request parameter.</faultString>
         <faultName>eventId</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10071",
               "faultString":"Invalid request parameter.",
               "faultName":"eventId"
            }
         ]
      }
   ]
}
getMarketsByEvent()
Retrieves the markets for a given event by using the event ID. The header response contains the Cache Control and Expires headers, which inform the remote client how long it should retain and redisplay the response before sending a request to the server for and updated response. The Cache control time for this request is 7 seconds.
Request Example
GET /v1/competitions/events/{eventId}/markets HTTP/1.1
Host: sandbox.whapi.com
Accept: application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
who-apiKey: l7xxa54460c573b5497c9b24b505xxxxxxxx
Request Parameters
template parameters
NameTypeDescription
eventIdinteger
(required)
The id of the event to request information for. Note, that if you execute the request without an eventID you will get back a ' Fault 10070 - Missing eventId' error and it's also possible the performance of our services may be affected if you make too many attempts executing the call without an eventID.
header parameters
NameTypeDescription
who-apiKeystring
(required)
A unique identifier of your application that is generated by the API portal and presented in the header.
acceptstring
(required)
options:
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8, application/vnd.who.Sportsbook+json;v=1;charset=utf-8
The representation of the response.
Response Description
whoCompetitions
Object Name Type Constraints Optional Description
element created String YYYY-MM-DD HH:MM:SS No Date and time the response was created
element disclaimer String - No The William Hill disclaimer notice
element copyright String - No The William Hill copyright notice
node event Node Only one child node No The event node
event
Object Name Type Constraints Optional Description
attribute id Integer - No Unique identifier for this event
element name String - No Human-friendly name of the event
element venue String - Yes The event venue
element status String A|S No The status of the event. A - Active | S - Suspended
element date String YYYY-MM-DD No The date at which the event occurs
element time String HH:MM:SS No The time at which the event occurs
element numMarkets Integer - Yes The number of markets in this event
element sort String - No The type of the event (for example: MTCH)
element channels String - No Channels where the entry can be accessed
node betting Node - No The betting node
node availability Node - No The availability node
node inPlay Node - No The inPlay node
element url String - No URL of the event in the online sports book
element flags String - Yes Indicates any flags applied to that entry
element raceNum String - Yes Used to provide an order number for event entries at the track, taken from the racecard
element displayOrder String - No The lower the order number, the more important the entry (can be a negative number)
element lastUpdateDate String - No The date of the last update to the entry
element lastUpdateTime String HH:MM:SS No The time of the last update to the entry
node market Node - No The market node
betting
Object Name Type Constraints Optional Description
element untilDate String YYYY-MM-DD No The date at which betting stops for the entry
element untilTime String HH:MM:SS No The time at which betting stops for the entry
element status String PRICED|OFF|RESULTED|PENDING No The status for betting on that event
availability
Object Name Type Constraints Optional Description
element inPlay String Y|N No Whether betting in running will be available on this event entry
inPlay
Object Name Type Constraints Optional Description
element started String Y|N No Whether this inplay event has started
markets
Object Name Type Constraints Optional Description
attribute id Integer - No Unique identifier for this market
element name String - No Human-friendly name of the market
element type String - Yes The event type the entry belongs to
element sort String - Yes Two-letter market sort code for the market
element eachWayFactor Integer - No Factor applied to the odds for the place part of an each-way bet
element eachWayPlaces Integer - No Number of places the place part of an each-way bet pays out on
element status String A|S No Status of the market: A - Active S – Suspended
node availability Node - No The availability node
node inPlay Node - No The inPlay node
element templateId String - No The market template id
element displayOrder Integer - No The lower the order number, the more important the entry (can be a negative number)
element unformattedHandicap String - Yes The unformatted handicap applied to the market
element handicap String - Yes The handicap applied to the market
element flags String - Yes The flags applied to this entry
element channels String - No The channels this entry can be accessed from
element url String - No URL of the event in the online sports book
element lastUpdateDate String YYYY-MM-DD No The date of the last update to the entry
element lastUpdateTime String HH:MM:SS No The time of the last update to the entry
availability
Object Name Type Constraints Optional Description
element eachway String Y|N No Whether Each-Way bets are available on this market
element startingPrice String Y|N No Whether starting price betting is available on this market
element place String Y|N No Whether place betting is available on this market
element forecast String Y|N No Whether Forecast betting is available on this market
element tricast String Y|N No Whether Tricast betting is available on this market
element quinella String Y|N Yes Whether Quinella betting is available on this market
element firstFour String Y|N Yes Whether first four betting is available on this market
element livePrice String Y|N No Whether live price betting is available on this market
element guaranteedPrice String Y|N No Whether guaranteed price betting is available on this market
inPlay
Object Name Type Constraints Optional Description
element index Integer - Yes The index for betting in running used by the William Hill system when handling certain inplay markets
element delay Integer - Yes The amount of time (in seconds) before a inplay bet is accepted
ResponsesExpand AllCollapse All
Status: 200 (Ok) - Success - Information obtained
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <created>2013-09-27 9:58:43</created>
   <disclaimer></disclaimer>
   <copyright>Copyright (c) 2013, WHG (International) Limited. All rights reserved.</copyright>
   <event id="7155808">
      <name>Super Bowl 50 - Outright</name>
      <venue/>
      <status>A</status>
      <date>2015-04-30</date>
      <time>09:00:00</time>
      <numMarkets/>
      <sort>TNMT</sort>
      <channels>IPLYFBJSCMHQGNAEVU</channels>
      <betting>
         <untilDate>2015-04-30</untilDate>
         <untilTime>09:00:00</untilTime>
         <status>PRICED</status>
      </betting>
      <availability>
         <inPlay>N</inPlay>
      </availability>
      <inPlay>
         <started>N</started>
      </inPlay>
      <url>http://sports.williamhill.com/bet/en-gb/betting/e/7155808/Super%2dBowl%2d50%2d%2d%2dOutright</url>
      <flags/>
      <raceNum/>
      <displayOrder>0</displayOrder>
      <lastUpdateDate>2015-04-08</lastUpdateDate>
      <lastUpdateTime>03:04:52</lastUpdateTime>
      <market id="232821899">
         <name>Super Bowl Outright</name>
         <type>-</type>
         <sort>--</sort>
         <eachWayFactor>1/2</eachWayFactor>
         <eachWayPlaces>2</eachWayPlaces>
         <status>A</status>
         <availability>
            <eachWay>Y</eachWay>
            <startingPrice>N</startingPrice>
            <place>N</place>
            <forecast>N</forecast>
            <tricast>N</tricast>
            <quinella/>
            <firstFour/>
            <livePrice>Y</livePrice>
            <guaranteedPrice>N</guaranteedPrice>
         </availability>
         <inPlay>
            <index/>
            <delay/>
         </inPlay>
         <templateId>232</templateId>
         <displayOrder>0</displayOrder>
         <unformattedHandicap/>
         <handicap/>
         <flags/>
         <channels>IPLYFBJSCMHQGNAEVU</channels>
         <url>http://sports.williamhill.com/bet/betting/m/232821899</url>
         <lastUpdateDate>2015-04-08</lastUpdateDate>
         <lastUpdateTime>03:08:20</lastUpdateTime>
      </market>
   </event>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
"whoCompetitions":
   {
      "created": "2013-09-27 10:01:29",
      "disclaimer": "",
      "copyright": Copyright (c) 2013, WHG (International) Limited. All rights reserved.",
      "event": {
         "id": "7155808",
         "name": "Super Bowl 50 - Outright",
         "status": "A",
         "date": "2015-04-30",
         "time": "09:00:00",
         "sort": "TNMT",
         "channels": "IPLYFBJSCMHQGNAEVU",
         "betting": {
           "untilDate": "2015-04-30",
           "untilTime": "09:00:00",
           "status": "PRICED"
         },
         "availability": { "inPlay": "N" },
         "inPlay": { "started": "N" },
         "url": "http://sports.williamhill.com/bet/en-gb/betting/e/7155808/Super%2dBowl%2d50%2d%2d%2dOutright",
         "displayOrder": "0",
         "lastUpdateDate": "2015-04-08",
         "lastUpdateTime": "03:04:52",
         "market": [
            {
               "id": "232821899",
               "name": "Super Bowl Outright",
               "type": "-",
               "sort": "--",
               "eachWayFactor": "1/2",
               "eachWayPlaces": "2",
               "status": "A",
               "availability": {
                 "eachWay": "Y",
                 "startingPrice": "N",
                 "place": "N",
                 "forecast": "N",
                 "tricast": "N",
                 "livePrice": "Y",
                 "guaranteedPrice": "N"
               },
               "inPlay": {
                  "index":"",
                  "delay":""
               },
               "templateId": "232",
               "displayOrder": "0",
               "channels": "IPLYFBJSCMHQGNAEVU",
               "url": "http://sports.williamhill.com/bet/betting/m/232821899",
               "lastUpdateDate": "2015-04-08",
               "lastUpdateTime": "03:08:20"
            }
         ]
      }
   }
}
Status: 200 (Ok) - Fault 10070 - Missing eventId
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10070</faultCode>
         <faultString>Missing request parameter.</faultString>
         <faultName>eventId</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10070",
               "faultString":"Missing request parameter",
               "faultName":"eventId"
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10071 - Invalid eventId
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10071</faultCode>
         <faultString>Invalid request parameter.</faultString>
         <faultName>eventId</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10071",
               "faultString":"Invalid request parameter.",
               "faultName":"eventId"
            }
         ]
      }
   ]
}
getMarketsOutcomesByEvent()
Retrieves an individual event and its available markets and outcomes by using the event ID. The header response contains the Cache Control and Expires headers, which inform the remote client how long it should retain and redisplay the response before sending a request to the server for and updated response. The Cache control time for this request is 4 seconds.
Request Example
GET /v1/competitions/events/{eventId}/markets/outcomes HTTP/1.1
Host: sandbox.whapi.com
Accept: application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
who-apiKey: l7xxa54460c573b5497c9b24b505xxxxxxxx
Request Parameters
template parameters
NameTypeDescription
eventIdinteger
(required)
The id of the event to request information for. Note, that if you execute the request without an eventID you will get back a ' Fault 10070 - Missing eventId' error and it's also possible the performance of our services may be affected if you make too many attempts executing the call without an eventID.
header parameters
NameTypeDescription
who-apiKeystring
(required)
A unique identifier of your application that is generated by the API portal and presented in the header.
acceptstring
(required)
options:
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8, application/vnd.who.Sportsbook+json;v=1;charset=utf-8
The representation of the response.
Response Description
whoCompetitions
Object Name Type Constraints Optional Description
element created String YYYY-MM-DD HH:MM:SS No Date and time the response was created
element disclaimer String - No The William Hill disclaimer notice
element copyright String - No The William Hill copyright notice
node event Node Only one child node No The event node
event
Object Name Type Constraints Optional Description
attribute id Integer - No Unique identifier for this event
element name String - No Human-friendly name of the event
element venue String - Yes The event venue
element status String A|S No The status of the event. A - Active | S - Suspended
element date String YYYY-MM-DD No The date at which the event occurs
element time String HH:MM:SS No The time at which the event occurs
element numMarkets Integer - Yes The number of markets in this event
element sort String - No The type of the event (for example: MTCH)
element channels String - No Channels where the entry can be accessed
node betting Node - No The betting node
node availability Node - No The availability node
node inPlay Node - No The inPlay node
element url String - No URL of the event in the online sports book
element flags String - Yes Indicates any flags applied to that entry
element raceNum String - Yes Used to provide an order number for event entries at the track, taken from the racecard
element displayOrder String - No The lower the order number, the more important the entry (can be a negative number)
element lastUpdateDate String - No The date of the last update to the entry
element lastUpdateTime String HH:MM:SS No The time of the last update to the entry
node market Node - No The market node
betting
Object Name Type Constraints Optional Description
element untilDate String YYYY-MM-DD No The date at which betting stops for the entry
element untilTime String HH:MM:SS No The time at which betting stops for the entry
element status String PRICED|OFF|RESULTED|PENDING No The status for betting on that event
availability
Object Name Type Constraints Optional Description
element inPlay String Y|N No Whether betting in running will be available on this event entry
inPlay
Object Name Type Constraints Optional Description
element started String Y|N No Whether this inplay event has started
market
Object Name Type Constraints Optional Description
attribute id Integer - No Unique identifier for this market
element name String - No Human-friendly name of the market
element type String - Yes The event type the entry belongs to
element sort String - Yes Two-letter market sort code for the market
element eachWayFactor Integer - No Factor applied to the odds for the place part of an each-way bet
element eachWayPlaces Integer - No Number of places the place part of an each-way bet pays out on
element status String A|S No Status of the market: A - Active S – Suspended
node availability Node - No The availability node
node inPlay Node - No The inPlay node
element templateId String - No The market template id
element displayOrder Integer - No The lower the order number, the more important the entry (can be a negative number)
element unformattedHandicap String - Yes The unformatted handicap applied to the market
element handicap String - Yes The handicap applied to the market
element flags String - Yes The flags applied to this entry
element channels String - No The channels this entry can be accessed from
element url String - No URL of the event in the online sports book
element lastUpdateDate String YYYY-MM-DD No The date of the last update to the entry
element lastUpdateTime String HH:MM:SS No The time of the last update to the entry
node outcome Node - No The outcomes node
availability
Object Name Type Constraints Optional Description
element eachway String Y|N No Whether Each-Way bets are available on this market
element startingPrice String Y|N No Whether starting price betting is available on this market
element place String Y|N No Whether place betting is available on this market
element forecast String Y|N No Whether Forecast betting is available on this market
element tricast String Y|N No Whether Tricast betting is available on this market
element quinella String Y|N Yes Whether Quinella betting is available on this market
element firstFour String Y|N Yes Whether first four betting is available on this market
element livePrice String Y|N No Whether live price betting is available on this market
element guaranteedPrice String Y|N No Whether guaranteed price betting is available on this market
inPlay
Object Name Type Constraints Optional Description
element index Integer - Yes The index for betting in running used by the William Hill system when handling certain inplay markets
element delay Integer - Yes The amount of time (in seconds) before a inplay bet is accepted
outcome
Object Name Type Constraints Optional Description
attribute id Integer - No Unique identifier for this outcome
element name String - No Human-friendly name of the outcome
element status String A|S No Status of the outcomes: A - Active S – Suspended
node odds Node - No The odds node
node results Node - Yes The results node
element channels String - No The channels this entry can be accessed from
element displayOrder Integer - No The lower the order number, the more important the entry (can be a negative number)
element displayed String - Yes Whether the outcome is displayed
element runnerNumber Integer - Yes The number of the runner
element unformattedHandicap String - Yes The unformatted handicap applied to the outcome
element handicap String - Yes The handicap applied to the outcome
element lastUpdateDate String YYYY-MM-DD No The date of the last update to the entry
element lastUpdateTime String HH:MM:SS No The time of the last update to the entry
odds
Object Name Type Constraints Optional Description
node livePrice Node - No The livePrice node
element history Integer - Yes The amount of time (in seconds) before a inplay bet is accepted
livePrice
Object Name Type Constraints Optional Description
element priceNum Float (?=.*\d)\d*(?:\.\d\d)? No When the odds are shown in vulgar fractions this is the numerator of the fraction. For example: 5 in 5/2
element priceDen Float (?=.*\d)\d*(?:\.\d\d)? No When the odds are shown in vulgar fractions this is the denominator of the fraction. For example: 2 in 5/2
element priceFrac String - No Odds for this outcome in fractional format
element priceDec Float (?=.*\d)\d*(?:\.\d\d)? No The price in decimal format
results
Object Name Type Constraints Optional Description
element result String - Yes The result of the outcome
element type String - Yes The type of the result
ResponsesExpand AllCollapse All
Status: 200 (Ok) - Success - Information obtained
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <created>2013-09-27 9:58:43</created>
   <disclaimer></disclaimer>
   <copyright>Copyright (c) 2013, WHG (International) Limited. All rights reserved.</copyright>
   <event id="7155808">
      <name>Super Bowl 50 - Outright</name>
      <venue/>
      <status>A</status>
      <date>2015-04-30</date>
      <time>09:00:00</time>
      <numMarkets/>
      <sort>TNMT</sort>
      <channels>IPLYFBJSCMHQGNAEVU</channels>
      <betting>
         <untilDate>2015-04-30</untilDate>
         <untilTime>09:00:00</untilTime>
         <status>PRICED</status>
      </betting>
      <availability>
         <inPlay>N</inPlay>
      </availability>
      <inPlay>
         <started>N</started>
      </inPlay>
      <url>http://sports.williamhill.com/bet/en-gb/betting/e/7155808/Super%2dBowl%2d50%2d%2d%2dOutright</url>
      <flags/>
      <raceNum/>
      <displayOrder>0</displayOrder>
      <lastUpdateDate>2015-04-08</lastUpdateDate>
      <lastUpdateTime>03:04:52</lastUpdateTime>
      <market id="232821899">
         <name>Super Bowl Outright</name>
         <type>-</type>
         <sort>--</sort>
         <eachWayFactor>1/2</eachWayFactor>
         <eachWayPlaces>2</eachWayPlaces>
         <status>A</status>
         <availability>
            <eachWay>Y</eachWay>
            <startingPrice>N</startingPrice>
            <place>N</place>
            <forecast>N</forecast>
            <tricast>N</tricast>
            <quinella/>
            <firstFour/>
            <livePrice>Y</livePrice>
            <guaranteedPrice>N</guaranteedPrice>
         </availability>
         <inPlay>
            <index/>
            <delay/>
         </inPlay>
         <templateId>232</templateId>
         <displayOrder>0</displayOrder>
         <unformattedHandicap/>
         <handicap/>
         <flags/>
         <channels>IPLYFBJSCMHQGNAEVU</channels>
         <url>http://sports.williamhill.com/bet/betting/m/232821899</url>
         <lastUpdateDate>2015-04-08</lastUpdateDate>
         <lastUpdateTime>03:08:20</lastUpdateTime>
         <outcome id="786274541">
            <name>Seattle Seahawks</name>
            <status>A</status>
            <odds>
               <livePrice>
                  <priceNum>9</priceNum>
                  <priceDen>2</priceDen>
                  <priceFrac>9/2</priceFrac>
                  <priceDec>5.50</priceDec>
               </livePrice>
               <history/>
            </odds>
            <results>
               <result>-</result>
               <type>-</type>
            </results>
            <channels>IPLYFBJSCMHQGNAEVU</channels>
            <displayOrder>0</displayOrder>
            <displayed/>
            <runnerNumber/>
            <unformattedHandicap/>
            <handicap/>
            <lastUpdateDate>2015-04-06</lastUpdateDate>
            <lastUpdateTime>01:03:11</lastUpdateTime>
         </outcome>
      </market>
   </event>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
"whoCompetitions":
   {
      "created": "2013-09-27 10:01:29",
      "disclaimer": "",
      "copyright": Copyright (c) 2013, WHG (International) Limited. All rights reserved.",
      "event": {
         "id": "7155808",
         "name": "Super Bowl 50 - Outright",
         "status": "A",
         "date": "2015-04-30",
         "time": "09:00:00",
         "sort": "TNMT",
         "channels": "IPLYFBJSCMHQGNAEVU",
         "betting": {
           "untilDate": "2015-04-30",
           "untilTime": "09:00:00",
           "status": "PRICED"
         },
         "availability": { "inPlay": "N" },
         "inPlay": { "started": "N" },
         "url": "http://sports.williamhill.com/bet/en-gb/betting/e/7155808/Super%2dBowl%2d50%2d%2d%2dOutright",
         "displayOrder": "0",
         "lastUpdateDate": "2015-04-08",
         "lastUpdateTime": "03:04:52",
         "market": [
            {
               "id": "232821899",
               "name": "Super Bowl Outright",
               "type": "-",
               "sort": "--",
               "eachWayFactor": "1/2",
               "eachWayPlaces": "2",
               "status": "A",
               "availability": {
                 "eachWay": "Y",
                 "startingPrice": "N",
                 "place": "N",
                 "forecast": "N",
                 "tricast": "N",
                 "livePrice": "Y",
                 "guaranteedPrice": "N"
               },
               "inPlay": {
                  "index":"",
                  "delay":""
               },
               "templateId": "232",
               "displayOrder": "0",
               "channels": "IPLYFBJSCMHQGNAEVU",
               "url": "http://sports.williamhill.com/bet/betting/m/232821899",
               "lastUpdateDate": "2015-04-08",
               "lastUpdateTime": "03:08:20",
               "outcomes": [
                  {
                     "id": "786274541",
                     "name": "Seattle Seahawks",
                     "status": "A",
                     "odds": {
                        "livePrice": {
                           "priceNum": "9", 
                           "priceDen": "2", 
                           "priceFrac": "9/2",
                           "priceDec": "5.50"
                        }
                     }
                     "results":{"result": "-", "type": "-"},
                     "channels": "IPLYFBJSCMHQGNAEVU",
                     "displayOrder": "0",
                     "displayed": "",
                     "runnerNumber": "",
                     "unformattedHandicap": "",
                     "handicap": "",
                     "lastUpdateDate": "2015-04-06",
                     "lastUpdateTime": "01:03:11"
                  }
               ]
            }
         ]
      }
   }
}
Status: 200 (Ok) - Fault 10070 - Missing eventId
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10070</faultCode>
         <faultString>Missing request parameter.</faultString>
         <faultName>eventId</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10070",
               "faultString":"Missing request parameter",
               "faultName":"eventId"
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10071 - Invalid eventId
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10071</faultCode>
         <faultString>Invalid request parameter.</faultString>
         <faultName>eventId</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10071",
               "faultString":"Invalid request parameter.",
               "faultName":"eventId"
            }
         ]
      }
   ]
}
getMarketsOutcomesCompetitorsByEvent()
Retrieves the horse information for the parent resource. The header response contains the Cache Control and Expires headers, which inform the remote client how long it should retain and redisplay the response before sending a request to the server for and updated response. The Cache control time for this request is 4 seconds.
Request Example
GET /v1/competitions/events/123/markets/outcomes/competitors HTTP/1.1
Host: sandbox.whapi.com
Accept: application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
who-apiKey: l7xxa54460c573b5497c9b24b505xxxxxxxx
Request Parameters
template parameters
NameTypeDescription
eventIdinteger
(required)
The id of the event to request information for. Note, that if you execute the request without an eventID you will get back a ' Fault 10070 - Missing eventId' error and it's also possible the performance of our services may be affected if you make too many attempts executing the call without an eventID.
header parameters
NameTypeDescription
who-apiKeystring
(required)
A unique identifier of your application that is generated by the API portal and presented in the header.
acceptstring
(required)
options:
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8, application/vnd.who.Sportsbook+json;v=1;charset=utf-8
The representation of the response.
Response Description
whoCompetitions
Object Name Type Constraints Optional Description
element created String YYYY-MM-DD HH:MM:SS No Date and time the response was created
element disclaimer String - No The William Hill disclaimer notice
element copyright String - No The William Hill copyright notice
node outcome Node - No The outcome node
node competitors Node - No The competitors node
outcome
Object Name Type Constraints Optional Description
attribute id Integer - No Unique identifier for this outcome
element name String - No Human-friendly name of the outcome
element status String A|S No Status of the outcomes: A - Active S – Suspended
node odds Node - No The odds node
node results Node - Yes The results node
element channels String - No The channels this entry can be accessed from
element displayOrder Integer - No The lower the order number, the more important the entry (can be a negative number)
element displayed String - Yes Whether the outcome is displayed
element runnerNumber Integer - Yes The number of the runner
element unformattedHandicap String - Yes The unformatted handicap applied to the outcome
element handicap String - Yes The handicap applied to the outcome
element lastUpdateDate String YYYY-MM-DD No The date of the last update to the entry
element lastUpdateTime String HH:MM:SS No The time of the last update to the entry
odds
Object Name Type Constraints Optional Description
node livePrice Node - No The livePrice node
element history Integer - Yes The amount of time (in seconds) before a inplay bet is accepted
livePrice
Object Name Type Constraints Optional Description
element priceNum Float (?=.*\d)\d*(?:\.\d\d)? No When the odds are shown in vulgar fractions this is the numerator of the fraction. For example: 5 in 5/2
element priceDen Float (?=.*\d)\d*(?:\.\d\d)? No When the odds are shown in vulgar fractions this is the denominator of the fraction. For example: 2 in 5/2
element priceFrac String - No Odds for this outcome in fractional format
element priceDec Float (?=.*\d)\d*(?:\.\d\d)? No The price in decimal format
results
Object Name Type Constraints Optional Description
element result String - Yes The result of the outcome
element type String - Yes The type of the result
competitors
Object Name Type Constraints Optional Description
node competitor Node - No The competitor node
competitor
Object Name Type Constraints Optional Description
attribute id Integer [0-9]+ No Unique identifier of the competitor in the event
attribute type Integer [A-Z]* No The type of competitor that the information is being given for
element age Integer [0-9]* No The age of the horse
element drawNum Integer [0-9]* No The stall number that the horse is allocated and will start from
element formGuide String [A-Z]* No The form of a horse is a record of significant events, mainly its performance in previous races. For example: The value 874-1 means that the horse finished 8th, then 7th in the next race, then 4th, hyphen here means he did not finish in the race, and was 1st in the last race he was running in.
element jockeyName String [A-Z]* No The name of the Jockey who's riding the horse
element overview String [A-Z]* No Additional information about the horse's performance
element rating Integer [0-9]* No The rating of the horse which is defined by a rating provider. It represents the horse's performance (the higher the rating, the better the horse is)
element trainerName String [A-Z]* No The name of the horses trainer
element weightPounds Integer [0-9]* No The rider weight (in pounds)
element silkImageUrl String URI No The full URL of the silk image in our sportsbook
element ownerName String [A-Z]* No The name of the horses owner(s)
element colour String b|bl|br|ch|gr Yes The colour of the horse (There are 5 colours. b = Bay. bl = Black. br = Brown. ch = Chestnut. gr = Grey)
element sex String F|M Yes The sex of the horse (F|M)
ResponsesExpand AllCollapse All
Status: 200 (Ok) - Success - Information obtained
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <created>2014-09-15 08:19:23</created>
   <disclaimer>WHG (International) Ltd ("We/Us") of 6/1 Waterport Place, Gibraltar owns the Website (the "Website") relating to information contained on its main trading website. By using this service you agree to these full Terms of Use available at http://developer.wiliamhilll.com/</disclaimer>
   <copyright>Copyright (c)2014, WHG (International) Limited. All rights reserved</copyright>
   <outcome id="14189101">
      <name>Cabbies Lou</name>
      <status>A</status>
      <odds>
         <livePrice>
            <priceNum>SP</priceNum>
            <priceDen/>
            <priceFrac>SP</priceFrac>
            <priceDec>SP</priceDec>
         </livePrice>
         <history/>
      </odds>
      <results>
         <result>-</result>
         <type>-</type>
      </results>
      <channels>IPLYFBJSCMN</channels>
      <displayOrder>3</displayOrder>
      <displayed/>
      <runnerNumber>3</runnerNumber>
      <unformattedHandicap/>
      <handicap/>
      <lastUpdateDate/>
      <lastUpdateTime/>
      <competitor id="3"/>
   </outcome>
   <competitors>
      <competitor id="3" type="Horse">
         <age>2</age>
         <drawNum>5</drawNum>
         <formGuide>21569</formGuide>
         <jockeyName>Haynes, J</jockeyName>
         <overview>Didn't need to improve on promising debut to win Ripon maiden (5f, good to soft) in May but has struggled in both nurseries; plummeting down the weights but needs first-time visor to help her get back on track.</overview>
         <rating>78</rating>
         <trainerName>Wilson, N</trainerName>
         <weightPounds>124</weightPounds>
         <silkImageUrl>http://whdn.williamhill.com/content/sportsbook/silks/218689.gif</silkImageUrl>
         <ownerName>Glyn Budden</ownerName>
         <colour/>
         <sex/>
      </competitor>
   </competitors>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{"whoCompetitions": {
    "created": "2014-09-15 08:39:32",
    "disclaimer": "WHG (International) Ltd (\"We/Us\") of 6/1 Waterport Place, Gibraltar owns the Website (the \"Website\") relating to information contained on its main trading website. By using this service you agree to these full Terms of Use available at http://developer.wiliamhilll.com/",
    "copyright": "Copyright (c)2014, WHG (International) Limited. All rights reserved",
    "outcome": {
        "id": "14189101",
        "name": "Cabbies Lou",
        "status": "A",
        "odds": {
            "livePrice": {
                "priceNum": "SP",
                "priceDen": "",
                "priceFrac": "SP",
                "priceDec": "SP"
            },
            "history": ""
        },
        "results": {
            "result": "-",
            "type": "-"
        },
        "channels": "IPLYFBJSCMN",
        "displayOrder": "3",
        "displayed": "",
        "runnerNumber": "3",
        "unformattedHandicap": "",
        "handicap": "",
        "lastUpdateDate": "",
        "lastUpdateTime": "",
        "competitor": [{"id": "3"}]
    },
    "competitors": [{
        "id": "3",
        "type": "Horse",
        "age": "2",
        "drawNum": "5",
        "formGuide": "21569",
        "jockeyName": "Haynes, J",
        "overview": "Didn't need to improve on promising debut to win Ripon maiden (5f, good to soft) in May but has struggled in both nurseries; plummeting down the weights but needs first-time visor to help her get back on track.",
        "rating": "78",
        "trainerName": "Wilson, N",
        "weightPounds": "124",
        "silkImageUrl": "http://whdn.williamhill.com/content/sportsbook/silks/218689.gif",
        "ownerName": "Glyn Budden",
        "colour": "",
        "sex": ""
    }]
}}
Status: 404 (Not Found) - Not Found or invalid id
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoFaults>
   <fault>
      <faultCode>10003</faultCode>
      <faultString>Resource not found</faultString>
      <faultName/>
   </fault>
</whoFaults>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
  "whoFaults": {
    "fault": {
      "faultCode": "10003",
      "faultString": "Resource not found"
    }
  }
}
Status: 404 (Not Found) - Metadata not configured correctly
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoFaults>
  <fault>
    <faultCode>11000</faultCode>
    <faultString>Application metadata not configured correctly</faultString>
    <faultName></faultName>
  </fault>
</whoFaults>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
  "whoFaults": {
    "fault": {
      "faultCode": "11000",
      "faultString": "Application metadata not configured correctly"
    }
  }
}
Status: 200 (Ok) - Fault 10070 - Missing eventId
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10070</faultCode>
         <faultString>Missing request parameter.</faultString>
         <faultName>eventId</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10070",
               "faultString":"Missing request parameter",
               "faultName":"eventId"
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10071 - Invalid eventId
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10071</faultCode>
         <faultString>Invalid request parameter.</faultString>
         <faultName>eventId</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10071",
               "faultString":"Invalid request parameter.",
               "faultName":"eventId"
            }
         ]
      }
   ]
}
getEventInplay()
Retrieves details for a specific event that is currently running (inPlay) by defining the event ID. The response includes odds and scores (no commentaries). The header response contains the Cache Control and Expiry headers, which inform the remote client how long it should retain and redisplay the response before sending a request to the server for and updated response. The Cache control time for this request is 4 seconds.
Request Example
GET /v1/competitions/events/{eventId}/inplay HTTP/1.1
Host: sandbox.whapi.com
Accept: application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
who-apiKey: l7xxa54460c573b5497c9b24b505xxxxxxxx
Request Parameters
template parameters
NameTypeDescription
eventIdinteger
(required)
The id of the event to request information for. Note, that if you execute the request without an eventID you will get back a ' Fault 10070 - Missing eventId' error and it's also possible the performance of our services may be affected if you make too many attempts executing the call without an eventID.
header parameters
NameTypeDescription
who-apiKeystring
(required)
A unique identifier of your application that is generated by the API portal and presented in the header.
acceptstring
(required)
options:
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8, application/vnd.who.Sportsbook+json;v=1;charset=utf-8
The representation of the response.
Response Description
whoCompetitions
Object Name Type Constraints Optional Description
element created String YYYY-MM-DD HH:MM:SS No Date and time the response was created
element disclaimer String - No The William Hill disclaimer notice
element copyright String - No The William Hill copyright notice
node category Node - No The category node
category
Object Name Type Constraints Optional Description
attribute id Integer - No Unique identifier for this category
element code String - No The identifier code of the category
node class Node - No The class node
class
Object Name Type Constraints Optional Description
attribute id Integer - No Unique identifier for this category
element name String - No Human-friendly name of that class
node type Node - No The type node
type
Object Name Type Constraints Optional Description
attribute id Integer - No Unique identifier for this category
element name String - No Human-friendly name of that class
node event Node - Yes The event node
event
Object Name Type Constraints Optional Description
attribute id Integer - No Unique identifier for this category
element name String - No Human-friendly name of that class
element home String - Yes The home team name
element away String - Yes The away team name
element status String A|S No Status of the event: A - Active S - Suspended
element date String YYYY-MM-DD No The date on which the event occurs
element time String HH:MM:SS No The time at which the event occurs
node availability Node - No The availability node
node inPlay Node - No The inPlay node
node market Node - No The market node
availability
Object Name Type Constraints Optional Description
element inPlay String - No Whether betting in running will be available on this event entry
element commentary String - No Whether inplay commentary is available for this event
inPlay
Object Name Type Constraints Optional Description
element started String Y|N Yes Whether inPlay betting for this entry has started
element state String - Yes The state of the inplay event
element lastUpdatedDate String YYYY-MM-DD No The date the inplay information was last updated
element lastUpdatedTime String HH:MM:SS No The time the inplay information was last updated
market
Object Name Type Constraints Optional Description
attribute id String - No Unique identifier for this market
element name String - No The name of that market
element sort String YYYY-MM-DD No Two letter market sort code
element blurb String - No The market blurb
element status String A|S No Status of the market: A - Active S - Suspended
element templateName String - No The market template name
node outcome Node - No The outcome node
outcome
Object Name Type Constraints Optional Description
attribute id String - No Unique identifier for this outcome
element name String - No Human-friendly name of that outcome
element status String A|S No Status of the market: A - Active S - Suspended
element tag String H|D|A No The outcome tag. Can be one of the following values: H=Home D=Draw A=Away
node odds Node - No The odds node
odds
Object Name Type Constraints Optional Description
node livePrice - - No The livePrice node
livePrice
Object Name Type Constraints Optional Description
element priceNum Float (?=.*\d)\d*(?:\.\d\d)? No When the odds are shown in vulgar fractions this is the numerator of the fraction. For example: 5 in 5/2
element priceDen Float (?=.*\d)\d*(?:\.\d\d)? No When the odds are shown in vulgar fractions this is the denominator of the fraction. For example: 2 in 5/2
element priceFrac String - No Odds for this outcome in fractional format
element priceDec Float (?=.*\d)\d*(?:\.\d\d)? No The price in decimal format
element priceUS Integer - No The price in US format
ResponsesExpand AllCollapse All
Status: 200 (Ok) - Success - Information obtained
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <created>2014-09-15 08:19:23</created>
   <disclaimer>WHG (International) Ltd ("We/Us") of 6/1 Waterport Place, Gibraltar owns the Website (the "Website") relating to information contained on its main trading website. By using this service you agree to these full Terms of Use available at http://developer.wiliamhilll.com/</disclaimer>
   <copyright>Copyright (c)2014, WHG (International) Limited. All rights reserved</copyright>
   <category id="1">
      <code>AMERICAN_FB</code>
      <class id="19">
         <name>American Football</name>
         <type id="195">
            <name>NFL</name>
            <event id="7155808">
               <name>Super Bowl 50 - Outright</name>
               <home/>
               <away/>
               <status>A</status>
               <date>2015-04-30</date>
               <time>09:00:00</time>
               <availability>
                  <inPlay>Y</inPlay>
                  <commentary>N</commentary>
               </availability>
               <inPlay>
                  <started>-</started>
                  <state/>
                  <lastUpdatedDate/>
                  <lastUpdatedTime/>
               </inPlay>
               <market id="232821899">
                  <name>Super Bowl Outright</name>
                  <sort>--</sort>
                  <blurb/>
                  <status>A</status>
                  <templateName>YN</templateName>
                  <outcome id="786274541">
                     <name>Seattle Seahawks</name>
                     <status>A</status>
                     <tag>-</tag>
                     <odds>
                        <livePrice>
                           <priceNum>9</priceNum>
                           <priceDen>2</priceDen>
                           <priceFrac>9/2</priceFrac>
                           <priceDec>5.50</priceDec>
                           <priceUS>450</priceUS>
                        </livePrice>
                     </odds>
                  </outcome>
               </market>
            </event>
         </type>
      </class>
   </category>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions": {
      "created": "2014-09-15 08:19:23",
      "disclaimer": "WHG (International) Ltd (\"We/Us\") of 6/1 Waterport Place, Gibraltar owns the Website (the \"Website\") relating to information contained on its main trading website. By using this service you agree to these full Terms of Use available at http://developer.wiliamhilll.com/",
      "copyright": "Copyright (c)2014, WHG (International) Limited. All rights reserved",
      "category": {
         "id": "1",
         "code": "AMERICAN_FB",
         "class": {
            "id": "19",
            "name": "American Football",
            "type": {
               "id": "195",
               "name": "NFL",
               "event": {
                  "id": "7155808",
                  "name": "Super Bowl 50 - Outright",
                  "status": "A",
                  "date": "2015-04-30",
                  "time": "09:00:00",
                  "availability": {
                     "inPlay": "Y",
                     "commentary": "N"
                  },
                  "inPlay": { "started": "-" },
                  "market": {
                     "id": "232821899",
                     "name": "Super Bowl Outright",
                     "sort": "--",
                     "status": "A",
                     "templateName": "YN",
                     "outcome": {
                        "id": "786274541",
                        "name": "Seattle Seahawks",
                        "status": "A",
                        "tag": "-",
                        "odds": {
                           "livePrice": {
                              "priceNum": "9",
                              "priceDen": "2",
                              "priceFrac": "9/2",
                              "priceDec": "5.50",
                              "priceUS": "450"
                           }
                        }
                     }
                  }
               }
            }
         }
      }
   }
}
Status: 200 (Ok) - Fault 10070 - Missing eventId
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10070</faultCode>
         <faultString>Missing request parameter.</faultString>
         <faultName>eventId</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10070",
               "faultString":"Missing request parameter",
               "faultName":"eventId"
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10071 - Invalid eventId
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10071</faultCode>
         <faultString>Invalid request parameter.</faultString>
         <faultName>eventId</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10071",
               "faultString":"Invalid request parameter.",
               "faultName":"eventId"
            }
         ]
      }
   ]
}
getCommentariesByEvent()
Retrieves details for a specific event that is currently running (inPlay) by defining the event ID. This returns the event with odds, scores and commentaries. Note that, commentaries are supplied at the discretion of your business manager. To enable this service, contact your Business Manager. The header response contains the Cache Control and Expiry headers, which inform the remote client how long it should retain and redisplay the response before sending a request to the server for and updated response. The Cache control time for this request is 4 seconds.
Request Example
GET /v1/competitions/events/{eventId}/inplay/commentaries HTTP/1.1
Host: sandbox.whapi.com
Accept: application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
who-apiKey: l7xxa54460c573b5497c9b24b505xxxxxxxx
Request Parameters
template parameters
NameTypeDescription
eventIdinteger
(required)
The id of the event to request information for. Note, that if you execute the request without an eventID you will get back a ' Fault 10070 - Missing eventId' error and it's also possible the performance of our services may be affected if you make too many attempts executing the call without an eventID.
header parameters
NameTypeDescription
who-apiKeystring
(required)
A unique identifier of your application that is generated by the API portal and presented in the header.
acceptstring
(required)
options:
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8, application/vnd.who.Sportsbook+json;v=1;charset=utf-8
The representation of the response.
Response Description
whoCompetitions
Object Name Type Constraints Optional Description
element created String YYYY-MM-DD HH:MM:SS No Date and time the response was created
element disclaimer String - No The William Hill disclaimer notice
element copyright String - No The William Hill copyright notice
node category Node - No The category node
category
Object Name Type Constraints Optional Description
attribute id Integer - No Unique identifier for this category
element code String - No The identifier code of the category
node class Node - No The class node
class
Object Name Type Constraints Optional Description
attribute id Integer - No Unique identifier for this category
element name String - No Human-friendly name of that class
node type Node - No The type node
type
Object Name Type Constraints Optional Description
attribute id Integer - No Unique identifier for this category
element name String - No Human-friendly name of that class
node event Node - Yes The event node
event
Object Name Type Constraints Optional Description
attribute id Integer - No Unique identifier for this category
element name String - No Human-friendly name of that class
element home String - Yes The home team name
element away String - Yes The away team name
element status String A|S No Status of the event: A - Active S - Suspended
element date String YYYY-MM-DD No The date on which the event occurs
element time String HH:MM:SS No The time at which the event occurs
node availability Node - No The availability node
node inPlay Node - No The inPlay node
node market Node - No The market node
availability
Object Name Type Constraints Optional Description
element inPlay String - No Whether betting in running will be available on this event entry
element commentary String - No Whether inplay commentary is available for this event
inPlay
Object Name Type Constraints Optional Description
element started String Y|N No Whether this inplay event has started
element state String - No The state of the inplay event
element lastUpdatedDate String YYYY-MM-DD No The date the inplay information was last updated
element lastUpdatedTime String HH:MM:SS No The time the inplay information was last updated
node scores Node - No The scores node
node clock Node - No The clock node
node commentary Node - No The commentary node
scores
Object Name Type Constraints Optional Description
element score_1 Integer - No The scores for the event (first half)
element score_2 Integer - No The scores for the event (second half)
clock
Object Name Type Constraints Optional Description
element state String R|S No The clock's state (R=Running | S=Stopped)
element period String - No The clock period
element time String MM:SS No The clock's time (MM:SS)
commentary
Object Name Type Constraints Optional Description
element version Integer - No The commentary version
element bestOf String - No How many parts are left to the event
node translations Node - No The translations node
node competitors Node - No The competitors node
node stats Node - No The stats node
node messages Node - No The messages node
translations
Object Name Type Constraints Optional Description
node translation Node Multiple child-nodes No The translation node
translation
Object Name Type Constraints Optional Description
element token String - No The Action token. For example: cnr=Corners
element recorded String - Yes The Action token (eg cnr=Corners)
element desc String - No Action description in the translation language
competitors
Object Name Type Constraints Optional Description
node competitor Node - No The competitor node
competitor
Object Name Type Constraints Optional Description
attribute id String - No Unique identifier of the competitor
element name String - No Human-friendly name of the competitor
element active String Y|' ' No Whether the competitor is currently active
stats
Object Name Type Constraints Optional Description
node summary Node - No The summary node
summary
Object Name Type Constraints Optional Description
element period String - No The clock period of the event
node stat Node Multiple child nodes No The statistics node
stat
Object Name Type Constraints Optional Description
attribute id String - No Identifier of the statistics node
element competitor String - No The identifier for the competitor the statistic applies to
element desc String - No The description of the statistic
messages
Object Name Type Constraints Optional Description
node msg Node - No The msg node
msg
Object Name Type Constraints Optional Description
attribute id String - No Unique identifier for the commentary message
element type String - No The type of the message
element period Integer - No The description of the statistic
element competitor Integer - No The description of the statistic
element time String MMM:SS No The time of the message
element desc String - No The narrative of the message
market
Object Name Type Constraints Optional Description
attribute id String - No Unique identifier for this market
element name String - No The name of that market
element sort String YYYY-MM-DD No Two letter market sort code
element blurb String - No The market blurb
element status String A|S No Status of the market: A - Active S - Suspended
element templateName String - No The market template name
node outcome Node - No The outcome node
outcome
Object Name Type Constraints Optional Description
attribute id String - No Unique identifier for this outcome
element name String - No Human-friendly name of that outcome
element status String A|S No Status of the market: A - Active S - Suspended
element tag String H|D|A No The outcome tag. Can be one of the following values: H=Home D=Draw A=Away
node odds Node - No The odds node
odds
Object Name Type Constraints Optional Description
node livePrice - - No The livePrice node
livePrice
Object Name Type Constraints Optional Description
element priceNum Float (?=.*\d)\d*(?:\.\d\d)? No When the odds are shown in vulgar fractions this is the numerator of the fraction. For example: 5 in 5/2
element priceDen Float (?=.*\d)\d*(?:\.\d\d)? No When the odds are shown in vulgar fractions this is the denominator of the fraction. For example: 2 in 5/2
element priceFrac String - No Odds for this outcome in fractional format
element priceDec Float (?=.*\d)\d*(?:\.\d\d)? No The price in decimal format
element priceUS Integer - No The price in US format
ResponsesExpand AllCollapse All
Status: 200 (Ok) - Success - Information obtained
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
 
<whoCompetitions>
   <created>2015-04-16 10:35:03</created>
   <disclaimer>WHG (International) Ltd ("We/Us") of 6/1 Waterport Place, Gibraltar owns the Website (the "Website") relating to information contained on its main trading website. By using this service you agree to these full Terms of Use available at http://developer.wiliamhilll.com/</disclaimer>
   <copyright>Copyright (c)2015, WHG (International) Limited. All rights reserved</copyright>
   <category id="17">
      <code>TENNIS</code>
      <class id="43">
         <name>Mens Tennis</name>
         <type id="20045">
            <name>Monte-Carlo Rolex Masters - ATP Monaco</name>
            <event id="7485253">
               <name>Tommy Robredo v Milos Raonic</name>
               <home>Tommy Robredo</home>
               <away>Milos Raonic</away>
               <status>A</status>
               <date>2015-04-16</date>
               <time>09:30:00</time>
               <availability>
                  <inPlay>Y</inPlay>
                  <commentary>Y</commentary>
               </availability>
               <inPlay>
                  <started>Y</started>
                  <state>ST2</state>
                  <lastUpdatedDate>2015-04-16</lastUpdatedDate>
                  <lastUpdatedTime>10:34:53</lastUpdatedTime>
                  <scores>
                     <score_1>0-1</score_1>
                     <score_2 />
                  </scores>
                  <clock>
                     <state>R</state>
                     <period>st2</period>
                     <time>51:36</time>
                  </clock>
                  <commentary>
                     <version>3</version>
                     <bestOf>3</bestOf>
                     <translations>
                        <locale>en</locale>
                        <translation>
                           <token>defaultMessage</token>
                           <recorded />
                           <desc>Commentary will appear shortly</desc>
                        </translation>
                        <translation>
                           <token>abrv_TOTAL</token>
                           <recorded />
                           <desc>PERD_ABRV_TOTAL</desc>
                        </translation>
                        <translation>
                           <token>abrv_fin</token>
                           <recorded />
                           <desc>Fin</desc>
                        </translation>
                        <translation>
                           <token>abrv_injb</token>
                           <recorded />
                           <desc>injb</desc>
                        </translation>
                        <translation>
                           <token>abrv_ns</token>
                           <recorded />
                           <desc>ns</desc>
                        </translation>
                        <translation>
                           <token>abrv_st1</token>
                           <recorded />
                           <desc>1st</desc>
                        </translation>
                        <translation>
                           <token>abrv_st2</token>
                           <recorded />
                           <desc>2nd</desc>
                        </translation>
                     </translations>
                     <competitors>
                        <competitor id="0">
                           <name>Tommy Robredo</name>
                           <active>Y</active>
                        </competitor>
                        <competitor id="1">
                           <name>Milos Raonic</name>
                           <active />
                        </competitor>
                     </competitors>
                     <stats>
                        <summary>
                           <period>total</period>
                           <stat id="ace">
                              <competitor>0</competitor>
                              <desc>1</desc>
                           </stat>
                           <stat id="ace">
                              <competitor>1</competitor>
                              <desc>2</desc>
                           </stat>
                           <stat id="brk">
                              <competitor>0</competitor>
                              <desc>0</desc>
                           </stat>
                           <stat id="brk">
                              <competitor>1</competitor>
                              <desc>1</desc>
                           </stat>
                           <stat id="dbl">
                              <competitor>0</competitor>
                              <desc>1</desc>
                           </stat>
                           <stat id="dbl">
                              <competitor>1</competitor>
                              <desc>1</desc>
                           </stat>
                           <stat id="gme">
                              <competitor>0</competitor>
                              <desc>1</desc>
                           </stat>
                           <stat id="gme">
                              <competitor>1</competitor>
                              <desc>1</desc>
                           </stat>
                           <stat id="scr">
                              <competitor>0</competitor>
                              <desc>40</desc>
                           </stat>
                        </summary>
                     </stats>
                     <messages>
                        <msg id="57202832">
                           <type>ft</type>
                           <period>st2</period>
                           <competitor>0</competitor>
                           <time>634:53</time>
                           <desc>Game 3 - Point 6 - Tommy Robredo</desc>
                        </msg>
                        <msg id="57202788">
                           <type>ft</type>
                           <period>st2</period>
                           <competitor>0</competitor>
                           <time>634:05</time>
                           <desc>Game 3 - Point 5 - Milos Raonic</desc>
                        </msg>
                        <msg id="57202740">
                           <type>ft</type>
                           <period>st2</period>
                           <competitor>0</competitor>
                           <time>633:09</time>
                           <desc>Game 3 - Point 4 - Tommy Robredo</desc>
                        </msg>
                        <msg id="57202723">
                           <type>ft</type>
                           <period>st2</period>
                           <competitor>0</competitor>
                           <time>632:52</time>
                           <desc>Game 3 - Point 3 - Tommy Robredo</desc>
                        </msg>
                        <msg id="57202699">
                           <type>ft</type>
                           <period>st2</period>
                           <competitor>0</competitor>
                           <time>632:30</time>
                           <desc>Game 3 - Point 2 - Milos Raonic</desc>
                        </msg>
                        <msg id="57202681">
                           <type>ft</type>
                           <period>st2</period>
                           <competitor>0</competitor>
                           <time>632:14</time>
                           <desc>Game 3 - Point 1 - Milos Raonic</desc>
                        </msg>
                     </messages>
                  </commentary>
               </inPlay>
               <market id="255650463">
                  <name>Match Betting Live</name>
                  <sort>HH</sort>
                  <blurb />
                  <status>A</status>
                  <templateName>YN</templateName>
                  <outcome id="856716329">
                     <name>Tommy Robredo</name>
                     <status>A</status>
                     <tag>H</tag>
                     <odds>
                        <livePrice>
                           <priceNum>5</priceNum>
                           <priceDen>1</priceDen>
                           <priceFrac>5/1</priceFrac>
                           <priceDec>6.00</priceDec>
                           <priceUS>500</priceUS>
                        </livePrice>
                     </odds>
                  </outcome>
                  <outcome id="856716330">
                     <name>Milos Raonic</name>
                     <status>A</status>
                     <tag>A</tag>
                     <odds>
                        <livePrice>
                           <priceNum>1</priceNum>
                           <priceDen>9</priceDen>
                           <priceFrac>1/9</priceFrac>
                           <priceDec>1.11</priceDec>
                           <priceUS>-900</priceUS>
                        </livePrice>
                     </odds>
                  </outcome>
               </market>
            </event>
         </type>
      </class>
   </category>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
    "whoCompetitions": {
        "created": "2015-04-16 10:35:03",
        "disclaimer": "WHG (International) Ltd (\"We/Us\") of 6/1 Waterport Place, Gibraltar owns the Website (the \"Website\") relating to information contained on its main trading website. By using this service you agree to these full Terms of Use available at http://developer.wiliamhilll.com/",
        "copyright": "Copyright (c)2015, WHG (International) Limited. All rights reserved",
        "category": {
            "code": "TENNIS",
            "class": {
                "name": "Mens Tennis",
                "type": {
                    "name": "Monte-Carlo Rolex Masters - ATP Monaco",
                    "event": {
                        "name": "Tommy Robredo v Milos Raonic",
                        "home": "Tommy Robredo",
                        "away": "Milos Raonic",
                        "status": "A",
                        "date": "2015-04-16",
                        "time": "09:30:00",
                        "availability": {
                            "inPlay": "Y",
                            "commentary": "Y"
                        },
                        "inPlay": {
                            "started": "Y",
                            "state": "ST2",
                            "lastUpdatedDate": "2015-04-16",
                            "lastUpdatedTime": "10:34:53",
                            "scores": {
                                "score_1": "0-1",
                                "score_2": ""
                            },
                            "clock": {
                                "state": "R",
                                "period": "st2",
                                "time": "51:36"
                            },
                            "commentary": {
                                "version": "3",
                                "bestOf": "3",
                                "translations": {
                                    "locale": "en",
                                    "translation": [
                                        {
                                            "token": "defaultMessage",
                                            "recorded": "",
                                            "desc": "Commentary will appear shortly"
                                        },
                                        {
                                            "token": "abrv_TOTAL",
                                            "recorded": "",
                                            "desc": "PERD_ABRV_TOTAL"
                                        },
                                        {
                                            "token": "abrv_fin",
                                            "recorded": "",
                                            "desc": "Fin"
                                        },
                                        {
                                            "token": "abrv_injb",
                                            "recorded": "",
                                            "desc": "injb"
                                        },
                                        {
                                            "token": "abrv_ns",
                                            "recorded": "",
                                            "desc": "ns"
                                        },
                                        {
                                            "token": "abrv_st1",
                                            "recorded": "",
                                            "desc": "1st"
                                        },
                                        {
                                            "token": "abrv_st2",
                                            "recorded": "",
                                            "desc": "2nd"
                                        }
                                    ]
                                },
                                "competitors": {
                                    "competitor": [
                                        {
                                            "name": "Tommy Robredo",
                                            "active": "Y",
                                            "_id": "0"
                                        },
                                        {
                                            "name": "Milos Raonic",
                                            "active": "",
                                            "_id": "1"
                                        }
                                    ]
                                },
                                "stats": {
                                    "summary": [
                                        {
                                            "period": "total",
                                            "stat": [
                                                {
                                                    "competitor": "0",
                                                    "desc": "1",
                                                    "_id": "ace"
                                                },
                                                {
                                                    "competitor": "1",
                                                    "desc": "2",
                                                    "_id": "ace"
                                                },
                                                {
                                                    "competitor": "0",
                                                    "desc": "0",
                                                    "_id": "brk"
                                                },
                                                {
                                                    "competitor": "1",
                                                    "desc": "1",
                                                    "_id": "brk"
                                                },    
                                                {
                                                    "competitor": "0",
                                                    "desc": "1",
                                                    "_id": "dbl"
                                                },
                                                {
                                                    "competitor": "1",
                                                    "desc": "1",
                                                    "_id": "dbl"
                                                },
                                                {
                                                    "competitor": "0",
                                                    "desc": "1",
                                                    "_id": "gme"
                                                },
                                                {
                                                    "competitor": "1",
                                                    "desc": "1",
                                                    "_id": "gme"
                                                },
                                                {
                                                    "competitor": "0",
                                                    "desc": "40",
                                                    "_id": "scr"
                                                }
                                            ]
                                        }
                                    ]
                                },
                                "messages": {
                                    "msg": [
                                        {
                                            "type": "ft",
                                            "period": "st2",
                                            "competitor": "0",
                                            "time": "634:53",
                                            "desc": "Game 3 - Point 6 - Tommy Robredo",
                                            "_id": "57202832"
                                        },
                                        {
                                            "type": "ft",
                                            "period": "st2",
                                            "competitor": "0",
                                            "time": "634:05",
                                            "desc": "Game 3 - Point 5 - Milos Raonic",
                                            "_id": "57202788"
                                        },
                                        {
                                            "type": "ft",
                                            "period": "st2",
                                            "competitor": "0",
                                            "time": "633:09",
                                            "desc": "Game 3 - Point 4 - Tommy Robredo",
                                            "_id": "57202740"
                                        },
                                        {
                                            "type": "ft",
                                            "period": "st2",
                                            "competitor": "0",
                                            "time": "632:52",
                                            "desc": "Game 3 - Point 3 - Tommy Robredo",
                                            "_id": "57202723"
                                        },
                                        {
                                            "type": "ft",
                                            "period": "st2",
                                            "competitor": "0",
                                            "time": "632:30",
                                            "desc": "Game 3 - Point 2 - Milos Raonic",
                                            "_id": "57202699"
                                        },
                                        {
                                            "type": "ft",
                                            "period": "st2",
                                            "competitor": "0",
                                            "time": "632:14",
                                            "desc": "Game 3 - Point 1 - Milos Raonic",
                                            "_id": "57202681"
                                        }
                                    ]
                                }
                            }
                        },
                        "market": [
                            {
                                "name": "Match Betting Live",
                                "sort": "HH",
                                "blurb": "",
                                "status": "A",
                                "templateName": "YN",
                                "outcome": [
                                    {
                                        "name": "Tommy Robredo",
                                        "status": "A",
                                        "tag": "H",
                                        "odds": {
                                            "livePrice": {
                                                "priceNum": "5",
                                                "priceDen": "1",
                                                "priceFrac": "5/1",
                                                "priceDec": "6.00",
                                                "priceUS": "500"
                                            }
                                        },
                                        "_id": "856716329"
                                    },
                                    {
                                        "name": "Milos Raonic",
                                        "status": "A",
                                        "tag": "A",
                                        "odds": {
                                            "livePrice": {
                                                "priceNum": "1",
                                                "priceDen": "9",
                                                "priceFrac": "1/9",
                                                "priceDec": "1.11",
                                                "priceUS": "-900"
                                            }
                                        },
                                        "_id": "856716330"
                                    }
                                ],
                                "_id": "255650463"
                            },
                        ]
                        "_id": "7485253"
                    },
                    "_id": "20045"
                },
                "_id": "43"
            },
            "_id": "17"
        }
    }
}
Status: 200 (Ok) - Fault 10070 - Missing eventId
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10070</faultCode>
         <faultString>Missing request parameter.</faultString>
         <faultName>eventId</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10070",
               "faultString":"Missing request parameter",
               "faultName":"eventId"
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10071 - Invalid eventId
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10071</faultCode>
         <faultString>Invalid request parameter.</faultString>
         <faultName>eventId</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10071",
               "faultString":"Invalid request parameter.",
               "faultName":"eventId"
            }
         ]
      }
   ]
}
getEventsInplay()
Retrieves details of all inplay events. The header response contains the Cache Control and Expiry headers, which inform the remote client how long it should retain and redisplay the response before sending a request to the server for and updated response. The Cache control time for this request is 4 seconds.
Request Example
GET /v1/competitions/events/inplay HTTP/1.1
Host: sandbox.whapi.com
Accept: application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
who-apiKey: l7xxa54460c573b5497c9b24b505xxxxxxxx
Request Parameters
header parameters
NameTypeDescription
who-apiKeystring
(required)
A unique identifier of your application that is generated by the API portal and presented in the header.
acceptstring
(required)
options:
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8, application/vnd.who.Sportsbook+json;v=1;charset=utf-8
The representation of the response.
query parameters
NameTypeDescription
eventsTodaystring
options:
, Y
If set to Y, the response will only show events running in the current 24 hour period. When the parameter is left blank the response will include all events.
Response Description
whoCompetitions
Object Name Type Constraints Optional Description
element created String YYYY-MM-DD HH:MM:SS No Date and time the response was created
element disclaimer String - No The William Hill disclaimer notice
element copyright String - No The William Hill copyright notice
node category Node - No The category node
category
Object Name Type Constraints Optional Description
attribute id Integer - No Unique identifier for this category
element name String - No Human-friendly name of that class
node class Node - Yes The class node
class
Object Name Type Constraints Optional Description
attribute id Integer - No Unique identifier for this category
element name String - No Human-friendly name of that class
node type Node - Yes The type node
type
Object Name Type Constraints Optional Description
attribute id Integer - No Unique identifier for this category
element name String - No Human-friendly name of that class
node event Node - Yes The event node
event
Object Name Type Constraints Optional Description
attribute id Integer - No Unique identifier for this category
element name String - No Human-friendly name of that class
element home String - Yes The home team name
element away String Yes Yes The away team name
element status String A|S No Status of the event: A - Active S - Suspended
element date String YYYY-MM-DD No The date on which the event occurs
element time String HH:MM:SS No The time at which the event occurs
node availability Node - No The availability node
node inPlay Node - No The inPlay node
availability
Object Name Type Constraints Optional Description
element inPlay String Y|N No Whether betting in running will be available on this event entry
inPlay
Object Name Type Constraints Optional Description
element started String Y|N No Whether this inplay event has started
ResponsesExpand AllCollapse All
Status: 200 (Ok) - Success - Information obtained
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <created>2014-09-15 08:19:23</created>
   <disclaimer>WHG (International) Ltd ("We/Us") of 6/1 Waterport Place, Gibraltar owns the Website (the "Website") relating to information contained on its main trading website. By using this service you agree to these full Terms of Use available at http://developer.wiliamhilll.com/</disclaimer>
   <copyright>Copyright (c)2014, WHG (International) Limited. All rights reserved</copyright>
   <category id="1">
      <name>American Football</name>
   </category>
   <category id="2">
      <name>Baseball</name>
   </category>
   <category id="3">
      <name>Basketball</name>
      <class id="273">
         <name>European Basketball</name>
         <type id="8215">
            <name>Spanish Liga Femenina</name>
            <event id="7443424">
               <name>Uni Girona (W) v CB Conquero (W)</name>
               <home/>
               <away/>
               <status>A</status>
               <date>2015-04-09</date>
               <time>19:30:00</time>
               <availability>
                  <inPlay>Y</inPlay>
               </availability>
               <inPlay>
                  <started>Y</started>
               </inPlay>
            </event>
         </type>
      </class>
   </category>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
  "whoCompetitions": {
    "created": "2014-09-15 08:19:23",
    "disclaimer": "WHG (International) Ltd (\"We/Us\") of 6/1 Waterport Place, Gibraltar owns the Website (the \"Website\") relating to information contained on its main trading website. By using this service you agree to these full Terms of Use available at http://developer.wiliamhilll.com/",
    "copyright": "Copyright (c)2014, WHG (International) Limited. All rights reserved",
    "category": [
      {
        "id": "1",
        "name": "American Football"
      },
      {
        "id": "2",
        "name": "Baseball"
      },
      {
        "id": "3",
        "name": "Basketball",
        "class": {
          "id": "273",
          "name": "European Basketball",
          "type": {
            "id": "8215",
            "name": "Spanish Liga Femenina",
            "event": {
              "id": "7443424",
              "name": "Uni Girona (W) v CB Conquero (W)",
              "status": "A",
              "date": "2015-04-09",
              "time": "19:30:00",
              "availability": { "inPlay": "Y" },
              "inPlay": { "started": "Y" }
            }
          }
        }
      }
    ]
  }
}
Status: 200 (Ok) - Fault 10071 - Invalid eventsToday
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10071</faultCode>
         <faultString>Invalid request parameter.</faultString>
         <faultName>eventsToday</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10071",
               "faultString":"Invalid request parameter.",
               "faultName":"eventsToday"
            }
         ]
      }
   ]
}
getEventsInplayLive()
Retrieves details for the events that have inplay and are currently running meaning betting has started. The header response contains the Cache Control and Expires headers, which inform the remote client how long it should retain and redisplay the response before sending a request to the server for and updated response. The Cache control time for this request is 4 seconds.
Request Example
GET /v1/competitions/events/inplay/live HTTP/1.1
Host: sandbox.whapi.com
Accept: application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
who-apiKey: l7xxa54460c573b5497c9b24b505xxxxxxxx
Request Parameters
header parameters
NameTypeDescription
who-apiKeystring
(required)
A unique identifier of your application that is generated by the API portal and presented in the header.
acceptstring
(required)
options:
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8, application/vnd.who.Sportsbook+json;v=1;charset=utf-8
The representation of the response.
Response Description
whoCompetitions
Object Name Type Constraints Optional Description
element created String YYYY-MM-DD HH:MM:SS No Date and time the response was created
element disclaimer String - No The William Hill disclaimer notice
element copyright String - No The William Hill copyright notice
node category Node - No The category node
category
Object Name Type Constraints Optional Description
attribute id Integer - No Unique identifier for this category
element name String - No Human-friendly name of that class
node class Node - Yes The class node
class
Object Name Type Constraints Optional Description
attribute id Integer - No Unique identifier for this category
element name String - No Human-friendly name of that class
node type Node - Yes The type node
type
Object Name Type Constraints Optional Description
attribute id Integer - No Unique identifier for this category
element name String - No Human-friendly name of that class
node event Node - Yes The event node
event
Object Name Type Constraints Optional Description
attribute id Integer - No Unique identifier for this category
element name String - No Human-friendly name of that class
element home String - Yes The home team name
element away String - Yes The away team name
element status String A|S No Status of the event: A - Active S - Suspended
element date String YYYY-MM-DD No The date on which the event occurs
element time String HH:MM:SS No The time at which the event occurs
node availability Node - No The availability node
node inPlay Node - No The inPlay node
node market Node - No The market node
availability
Object Name Type Constraints Optional Description
element inPlay String - No Whether betting in running will be available on this event entry
element commentary String - No Whether inplay commentary is available for this event
inPlay
Object Name Type Constraints Optional Description
element started String Y|N Yes Whether inPlay betting for this entry has started
element state String - Yes The state of the inplay event
element lastUpdatedDate String YYYY-MM-DD No The date the inplay information was last updated
element lastUpdatedTime String HH:MM:SS No The time the inplay information was last updated
market
Object Name Type Constraints Optional Description
attribute id String - No Unique identifier for this market
element name String - No The name of that market
element sort String YYYY-MM-DD No Two letter market sort code
element blurb String - No The market blurb
element status String A|S No Status of the market: A - Active S - Suspended
element templateName String - No The market template name
node outcome Node - No The outcome node
outcome
Object Name Type Constraints Optional Description
attribute id String - No Unique identifier for this outcome
element name String - No Human-friendly name of that outcome
element status String A|S No Status of the market: A - Active S - Suspended
element tag String H|D|A No The outcome tag. Can be one of the following values: H=Home D=Draw A=Away
node odds Node - No The odds node
odds
Object Name Type Constraints Optional Description
node livePrice - - No The livePrice node
livePrice
Object Name Type Constraints Optional Description
element priceNum Float (?=.*\d)\d*(?:\.\d\d)? No When the odds are shown in vulgar fractions this is the numerator of the fraction. For example: 5 in 5/2
element priceDen Float (?=.*\d)\d*(?:\.\d\d)? No When the odds are shown in vulgar fractions this is the denominator of the fraction. For example: 2 in 5/2
element priceFrac String - No Odds for this outcome in fractional format
element priceDec Float (?=.*\d)\d*(?:\.\d\d)? No The price in decimal format
element priceUS Integer - No The price in US format
ResponsesExpand AllCollapse All
Status: 200 (Ok) - Success - Information obtained
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <created>2014-09-15 08:19:23</created>
   <disclaimer>WHG (International) Ltd ("We/Us") of 6/1 Waterport Place, Gibraltar owns the Website (the "Website") relating to information contained on its main trading website. By using this service you agree to these full Terms of Use available at http://developer.wiliamhilll.com/</disclaimer>
   <copyright>Copyright (c)2014, WHG (International) Limited. All rights reserved</copyright>
   <category id="5">
      <name>Football</name>
      <class id="46">
         <name>European Major Leagues</name>
         <type id="10414">
            <name>Azerbaijan 1st Division</name>
            <event id="7475419">
               <name>FK Bakili Baku v Zira IK</name>
               <home>FK Bakili Baku</home>
               <away>Zira IK</away>
               <status>A</status>
               <date>2014-04-14</date>
               <time>08:00:00</time>
               <availability>
                  <inPlay>Y</inPlay>
                  <commentary>Y</commentary>
               </availability>
               <inPlay>
                  <started>A</started>
                  <state>HT</state>
                  <lastUpdatedDate>2014-04-14</lastUpdatedDate>
                  <lastUpdatedTime>08:44:23</lastUpdatedTime>
                  <scores>
                     <score_1>0-0</score_1>
                     <score_2/>
                  </scores>
               </inPlay>
               <market id="254980981">
                  <name>Match Betting Live</name>
                  <type/>
                  <sort>MR</sort>
                  <blurb/>
                  <status>A</status>
                  <templateName>WDW</templateName>
                  <outcome id="854597440">
                     <name>FK Bakili Baku</name>
                     <status>A</status>
                     <tag>H</tag>
                     <odds>
                        <livePrice>
                           <priceNum>6</priceNum>
                           <priceDen>1</priceDen>
                           <priceFrac>6/1</priceFrac>
                           <priceDec>7.00</priceDec>
                           <priceUS>600</priceUS>
                        </livePrice>
                     </odds>
                  </outcome>
               </market>
            </event>
         </type>
      </class>
   </category>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions": {
      "created": "2014-09-15 08:19:23",
      "disclaimer": "WHG (International) Ltd (\"We/Us\") of 6/1 Waterport Place, Gibraltar owns the Website (the \"Website\") relating to information contained on its main trading website. By using this service you agree to these full Terms of Use available at http://developer.wiliamhilll.com/",
      "copyright": "Copyright (c)2014, WHG (International) Limited. All rights reserved",
      "category": {
         "id": "5",
         "name": "Football",
         "class": {
            "id": "46",
            "name": "European Major Leagues",
            "type": {
               "id": "10414",
               "name": "Azerbaijan 1st Division",
               "event": {
                  "id": "7475419",
                  "name": "FK Bakili Baku v Zira IK",
                  "home": "FK Bakili Baku",
                  "away": "Zira IK",
                  "status": "A",
                  "date": "2014-04-14",
                  "time": "08:00:00",
                  "availability": {
                     "inPlay": "Y",
                     "commentary": "Y"
                  },
                  "inPlay": {
                     "started": "A",
                     "state": "HT",
                     "lastUpdatedDate": "2014-04-14",
                     "lastUpdatedTime": "08:44:23",
                     "scores": { "score_1": "0-0" }
                  },
                  "market": {
                     "id": "254980981",
                     "name": "Match Betting Live",
                     "sort": "MR",
                     "status": "A",
                     "templateName": "WDW",
                     "outcome": {
                        "id": "854597440",
                        "name": "FK Bakili Baku",
                        "status": "A",
                        "tag": "H",
                        "odds": {
                           "livePrice": {
                              "priceNum": "6",
                              "priceDen": "1",
                              "priceFrac": "6/1",
                              "priceDec": "7.00",
                              "priceUS": "600"
                           }
                        }
                     }
                  }
               }
            }
         }
      }
   }
}
getEventsInplayUpcoming()
Retrieves a complete list of all events that have inplay betting available and have not yet started. The header response contains the Cache Control and Expires headers, which inform the remote client how long it should retain and redisplay the response before sending a request to the server for and updated response. The Cache control time for this request is 30 seconds.
Request Example
GET /v1/competitions/events/inplay/upcoming HTTP/1.1
Host: sandbox.whapi.com
Accept: application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
who-apiKey: l7xxa54460c573b5497c9b24b505xxxxxxxx
Request Parameters
header parameters
NameTypeDescription
who-apiKeystring
(required)
A unique identifier of your application that is generated by the API portal and presented in the header.
acceptstring
(required)
options:
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8, application/vnd.who.Sportsbook+json;v=1;charset=utf-8
The representation of the response.
Response Description
whoCompetitions
Object Name Type Constraints Optional Description
element created String YYYY-MM-DD HH:MM:SS No Date and time the response was created
element disclaimer String - No The William Hill disclaimer notice
element copyright String - No The William Hill copyright notice
node category Node - No The category node
category
Object Name Type Constraints Optional Description
attribute id Integer - No Unique identifier for this category
element name String - No Human-friendly name of that class
node class Node - Yes The class node
class
Object Name Type Constraints Optional Description
attribute id Integer - No Unique identifier for this category
element name String - No Human-friendly name of that class
node type Node - Yes The type node
type
Object Name Type Constraints Optional Description
attribute id Integer - No Unique identifier for this category
element name String - No Human-friendly name of that class
node event Node - Yes The event node
event
Object Name Type Constraints Optional Description
attribute id Integer - No Unique identifier for this category
element name String - No Human-friendly name of that class
element home String - Yes The home team name
element away String Yes Yes The away team name
element status String A|S No Status of the event: A - Active S - Suspended
element date String YYYY-MM-DD No The date on which the event occurs
element time String HH:MM:SS No The time at which the event occurs
node availability Node - No The availability node
node inPlay Node - No The inPlay node
availability
Object Name Type Constraints Optional Description
element inPlay String Y|N No Whether betting in running will be available on this event entry
inPlay
Object Name Type Constraints Optional Description
element started String Y|N No Whether this inplay event has started
ResponsesExpand AllCollapse All
Status: 200 (Ok) - Success - Information obtained
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <created>2014-09-15 08:19:23</created>
   <disclaimer>WHG (International) Ltd ("We/Us") of 6/1 Waterport Place, Gibraltar owns the Website (the "Website") relating to information contained on its main trading website. By using this service you agree to these full Terms of Use available at http://developer.wiliamhilll.com/</disclaimer>
   <copyright>Copyright (c)2014, WHG (International) Limited. All rights reserved</copyright>
   <category id="1">
      <name>American Football</name>
   </category>
   <category id="2">
      <name>Baseball</name>
   </category>
   <category id="3">
      <name>Basketball</name>
      <class id="273">
         <name>European Basketball</name>
         <type id="8215">
            <name>Spanish Liga Femenina</name>
         </type>
         <type id="15460">
            <name>Qatar Cup</name>
            <event id="7474630">
               <name>Al Gharafa v Al Jaish</name>
               <status>S</status>
               <date>2015-04-14</date>
               <time>15:00:00</time>
               <availability>
                  <inPlay>Y</inPlay>
               </availability>
               <inPlay>
                  <started>N</started>
               </inPlay>
            </event>
         </type>
      </class>
   </category>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions": {
      "created": "2014-09-15 08:19:23",
      "disclaimer": "WHG (International) Ltd (\"We/Us\") of 6/1 Waterport Place, Gibraltar owns the Website (the \"Website\") relating to information contained on its main trading website. By using this service you agree to these full Terms of Use available at http://developer.wiliamhilll.com/",
      "copyright": "Copyright (c)2014, WHG (International) Limited. All rights reserved",
      "category": [
         {
            "id": "1",
            "name": "American Football"
         },
         {
            "id": "2",
            "name": "Baseball"
         },
         {
            "id": "3",
            "name": "Basketball",
            "class": {
               "id": "273",
               "name": "European Basketball",
               "type": [
                  {
                     "id": "8215",
                     "name": "Spanish Liga Femenina"
                  },
                  {
                     "id": "15460",
                     "name": "Qatar Cup",
                     "event": {
                        "id": "7474630",
                        "name": "Al Gharafa v Al Jaish",
                        "status": "S",
                        "date": "2015-04-14",
                        "time": "15:00:00",
                        "availability": { "inPlay": "Y" },
                        "inPlay": { "started": "N" }
                     }
                  }
               ]
            }
         }
      ]
   }
}
getMarket()
Retrieves a specific market by defining the marketId.
Request Example
GET /v1/competitions/markets/{marketId} HTTP/1.1
Host: sandbox.whapi.com
Accept: application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
who-apiKey: l7xxa54460c573b5497c9b24b505xxxxxxxx
Request Parameters
template parameters
NameTypeDescription
marketIdinteger
(required)
The id of the market to request information for.
header parameters
NameTypeDescription
who-apiKeystring
(required)
A unique identifier of your application that is generated by the API portal and presented in the header.
acceptstring
(required)
options:
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8, application/vnd.who.Sportsbook+json;v=1;charset=utf-8
The representation of the response.
Response Description
whoCompetitions
Object Name Type Constraints Optional Description
element created String YYYY-MM-DD HH:MM:SS No Date and time the response was created
element disclaimer String - No The William Hill disclaimer notice
element copyright String - No The William Hill copyright notice
node market Node - No The market node
market
Object Name Type Constraints Optional Description
attribute id Integer - No Unique identifier for this market
element name String - No Human-friendly name of the market
element type String - Yes The event type the entry belongs to
element sort String - Yes Two-letter market sort code for the market
element eachWayFactor Integer - No Factor applied to the odds for the place part of an each-way bet
element eachWayPlaces Integer - No Number of places the place part of an each-way bet pays out on
element status String A|S No Status of the market: A - Active S – Suspended
node availability Node - No The availability node
node inPlay Node - No The inPlay node
element templateId String - No The market template id
element displayOrder Integer - No The lower the order number, the more important the entry (can be a negative number)
element unformattedHandicap String - Yes The unformatted handicap applied to the market
element handicap String - Yes The handicap applied to the market
element flags String - Yes The flags applied to this entry
element channels String - No The channels this entry can be accessed from
element url String - No URL of the event in the online sports book
element lastUpdateDate String YYYY-MM-DD No The date of the last update to the entry
element lastUpdateTime String HH:MM:SS No The time of the last update to the entry
availability
Object Name Type Constraints Optional Description
element eachway String Y|N No Whether Each-Way bets are available on this market
element startingPrice String Y|N No Whether starting price betting is available on this market
element place String Y|N No Whether place betting is available on this market
element forecast String Y|N No Whether Forecast betting is available on this market
element tricast String Y|N No Whether Tricast betting is available on this market
element quinella String Y|N Yes Whether Quinella betting is available on this market
element firstFour String Y|N Yes Whether first four betting is available on this market
element livePrice String Y|N No Whether live price betting is available on this market
element guaranteedPrice String Y|N No Whether guaranteed price betting is available on this market
inPlay
Object Name Type Constraints Optional Description
element index Integer - Yes The index for betting in running used by the William Hill system when handling certain inplay markets
element delay Integer - Yes The amount of time (in seconds) before a inplay bet is accepted
ResponsesExpand AllCollapse All
Status: 200 (Ok) - Success - Information obtained
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <created>2014-09-15 08:19:23</created>
   <disclaimer>WHG (International) Ltd ("We/Us") of 6/1 Waterport Place, Gibraltar owns the Website (the "Website") relating to information contained on its main trading website. By using this service you agree to these full Terms of Use available at http://developer.wiliamhilll.com/</disclaimer>
   <copyright>Copyright (c)2014, WHG (International) Limited. All rights reserved</copyright>
   <market id="254980981">
      <name>Match Betting Live</name>
      <type>-</type>
      <sort>MR</sort>
      <eachWayFactor/>
      <eachWayPlaces/>
      <status>A</status>
      <availability>
         <eachWay>N</eachWay>
         <startingPrice>N</startingPrice>
         <place>N</place>
         <forecast>N</forecast>
         <tricast>N</tricast>
         <quinella/>
         <firstFour/>
         <livePrice>Y</livePrice>
         <guaranteedPrice>N</guaranteedPrice>
      </availability>
      <inPlay>
         <index/>
         <delay>4</delay>
      </inPlay>
      <templateId>2043719</templateId>
      <displayOrder>500</displayOrder>
      <unformattedHandicap/>
      <handicap/>
      <flags/>
      <channels>IPLYFBJSCMHQGNAEZVU</channels>
      <url>http://sports.williamhill.com/bet/betting/m/254980981</url>
      <lastUpdateDate/>
      <lastUpdateTime/>
   </market>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions": {
      "created": "2014-09-15 08:19:23",
      "disclaimer": "WHG (International) Ltd (\"We/Us\") of 6/1 Waterport Place, Gibraltar owns the Website (the \"Website\") relating to information contained on its main trading website. By using this service you agree to these full Terms of Use available at http://developer.wiliamhilll.com/",
      "copyright": "Copyright (c)2014, WHG (International) Limited. All rights reserved",
      "market": {
         "id": "254980981",
         "name": "Match Betting Live",
         "type": "-",
         "sort": "MR",
         "status": "A",
         "availability": {
            "eachWay": "N",
            "startingPrice": "N",
            "place": "N",
            "forecast": "N",
            "tricast": "N",
            "livePrice": "Y",
            "guaranteedPrice": "N"
         },
         "inPlay": { "delay": "4" },
         "templateId": "2043719",
         "displayOrder": "500",
         "channels": "IPLYFBJSCMHQGNAEZVU",
         "url": "http://sports.williamhill.com/bet/betting/m/254980981"
      }
   }
}
Status: 200 (Ok) - Fault 10070 - Missing marketId
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10070</faultCode>
         <faultString>Missing request parameter.</faultString>
         <faultName>marketId</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10070",
               "faultString":"Missing request parameter",
               "faultName":"marketId"
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10071 - Invalid marketId
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10071</faultCode>
         <faultString>Invalid request parameter.</faultString>
         <faultName>marketId</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10071",
               "faultString":"Invalid request parameter.",
               "faultName":"marketId"
            }
         ]
      }
   ]
}
getOutcomesByMarket()
Retrieves the outcomes for a given market.
Request Example
GET /v1/competitions/markets/{marketId}/outcomes HTTP/1.1
Host: sandbox.whapi.com
Accept: application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
who-apiKey: l7xxa54460c573b5497c9b24b505xxxxxxxx
Request Parameters
template parameters
NameTypeDescription
marketIdinteger
(required)
The id of the market to request information for.
header parameters
NameTypeDescription
who-apiKeystring
(required)
A unique identifier of your application that is generated by the API portal and presented in the header.
acceptstring
(required)
options:
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8, application/vnd.who.Sportsbook+json;v=1;charset=utf-8
The representation of the response.
Response Description
whoCompetitions
Object Name Type Constraints Optional Description
element created String YYYY-MM-DD HH:MM:SS No Date and time the response was created
element disclaimer String - No The William Hill disclaimer notice
element copyright String - No The William Hill copyright notice
node market Node - No The market node
market
Object Name Type Constraints Optional Description
attribute id Integer - No Unique identifier for this market
element name String - No Human-friendly name of the market
element type String - Yes The event type the entry belongs to
element sort String - Yes Two-letter market sort code for the market
element eachWayFactor Integer - No Factor applied to the odds for the place part of an each-way bet
element eachWayPlaces Integer - No Number of places the place part of an each-way bet pays out on
element status String A|S No Status of the market: A - Active S – Suspended
node availability Node - No The availability node
node inPlay Node - No The inPlay node
element templateId String - No The market template id
element displayOrder Integer - No The lower the order number, the more important the entry (can be a negative number)
element unformattedHandicap String - Yes The unformatted handicap applied to the market
element handicap String - Yes The handicap applied to the market
element flags String - Yes The flags applied to this entry
element channels String - No The channels this entry can be accessed from
element url String - No URL of the event in the online sports book
element lastUpdateDate String YYYY-MM-DD No The date of the last update to the entry
element lastUpdateTime String HH:MM:SS No The time of the last update to the entry
node outcome Node - No The outcomes node
availability
Object Name Type Constraints Optional Description
element eachway String Y|N No Whether Each-Way bets are available on this market
element startingPrice String Y|N No Whether starting price betting is available on this market
element place String Y|N No Whether place betting is available on this market
element forecast String Y|N No Whether Forecast betting is available on this market
element tricast String Y|N No Whether Tricast betting is available on this market
element quinella String Y|N Yes Whether Quinella betting is available on this market
element firstFour String Y|N Yes Whether first four betting is available on this market
element livePrice String Y|N No Whether live price betting is available on this market
element guaranteedPrice String Y|N No Whether guaranteed price betting is available on this market
inPlay
Object Name Type Constraints Optional Description
element index Integer - Yes The index for betting in running used by the William Hill system when handling certain inplay markets
element delay Integer - Yes The amount of time (in seconds) before a inplay bet is accepted
outcomes
Object Name Type Constraints Optional Description
attribute id Integer - No Unique identifier for this outcome
element name String - No Human-friendly name of the outcome
element status String A|S No Status of the outcomes: A - Active S – Suspended
node odds Node - No The odds node
node results Node - Yes The results node
element channels String - No The channels this entry can be accessed from
element displayOrder Integer - No The lower the order number, the more important the entry (can be a negative number)
element displayed String - Yes Whether the outcome is displayed
element runnerNumber Integer - Yes The number of the runner
element unformattedHandicap String - Yes The unformatted handicap applied to the outcome
element handicap String - Yes The handicap applied to the outcome
element lastUpdateDate String YYYY-MM-DD No The date of the last update to the entry
element lastUpdateTime String HH:MM:SS No The time of the last update to the entry
odds
Object Name Type Constraints Optional Description
node livePrice Node - No The livePrice node
element history Integer - Yes The amount of time (in seconds) before a inplay bet is accepted
livePrice
Object Name Type Constraints Optional Description
element priceNum Float (?=.*\d)\d*(?:\.\d\d)? No When the odds are shown in vulgar fractions this is the numerator of the fraction. For example: 5 in 5/2
element priceDen Float (?=.*\d)\d*(?:\.\d\d)? No When the odds are shown in vulgar fractions this is the denominator of the fraction. For example: 2 in 5/2
element priceFrac String - No Odds for this outcome in fractional format
element priceDec Float (?=.*\d)\d*(?:\.\d\d)? No The price in decimal format
results
Object Name Type Constraints Optional Description
element result String - Yes The result of the outcome
element type String - Yes The type of the result
ResponsesExpand AllCollapse All
Status: 200 (Ok) - Success - Information obtained
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <created>2014-09-15 08:19:23</created>
   <disclaimer>WHG (International) Ltd ("We/Us") of 6/1 Waterport Place, Gibraltar owns the Website (the "Website") relating to information contained on its main trading website. By using this service you agree to these full Terms of Use available at http://developer.wiliamhilll.com/</disclaimer>
   <copyright>Copyright (c)2014, WHG (International) Limited. All rights reserved</copyright>
   <market id="254980981">
      <name>Match Betting Live</name>
      <type>-</type>
      <sort>MR</sort>
      <eachWayFactor/>
      <eachWayPlaces/>
      <status>S</status>
      <availability>
         <eachWay>N</eachWay>
         <startingPrice>N</startingPrice>
         <place>N</place>
         <forecast>N</forecast>
         <tricast>N</tricast>
         <quinella/>
         <firstFour/>
         <livePrice>Y</livePrice>
         <guaranteedPrice>N</guaranteedPrice>
      </availability>
      <inPlay>
         <index/>
         <delay>4</delay>
      </inPlay>
      <templateId>2043719</templateId>
      <displayOrder>500</displayOrder>
      <unformattedHandicap/>
      <handicap/>
      <flags/>
      <channels>IPLYFBJSCMHQGNAEZVU</channels>
      <url>http://sports.williamhill.com/bet/betting/m/254980981</url>
      <lastUpdateDate/>
      <lastUpdateTime/>
      <outcome id="854597440">
         <name>FK Bakili Baku</name>
         <status>A</status>
         <odds>
            <livePrice>
               <priceNum>40</priceNum>
               <priceDen>1</priceDen>
               <priceFrac>40/1</priceFrac>
               <priceDec>41.00</priceDec>
            </livePrice>
            <history/>
         </odds>
         <results>
            <result>-</result>
            <type>H</type>
         </results>
         <channels>IPLYFBJSCMHQGNAEZVU</channels>
         <displayOrder>10</displayOrder>
         <displayed/>
         <runnerNumber/>
         <unformattedHandicap/>
         <handicap/>
         <lastUpdateDate/>
         <lastUpdateTime/>
      </outcome>
   </market>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions": {
      "created": "2014-09-15 08:19:23",
      "disclaimer": "WHG (International) Ltd (\"We/Us\") of 6/1 Waterport Place, Gibraltar owns the Website (the \"Website\") relating to information contained on its main trading website. By using this service you agree to these full Terms of Use available at http://developer.wiliamhilll.com/",
      "copyright": "Copyright (c)2014, WHG (International) Limited. All rights reserved",
      "market": {
         "id": "254980981",
         "name": "Match Betting Live",
         "type": "-",
         "sort": "MR",
         "status": "S",
         "availability": {
            "eachWay": "N",
            "startingPrice": "N",
            "place": "N",
            "forecast": "N",
            "tricast": "N",
            "livePrice": "Y",
            "guaranteedPrice": "N"
         },
         "inPlay": { "delay": "4" },
         "templateId": "2043719",
         "displayOrder": "500",
         "channels": "IPLYFBJSCMHQGNAEZVU",
         "url": "http://sports.williamhill.com/bet/betting/m/254980981",
         "outcome": {
            "id": "854597440",
            "name": "FK Bakili Baku",
            "status": "A",
            "odds": {
               "livePrice": {
                  "priceNum": "40",
                  "priceDen": "1",
                  "priceFrac": "40/1",
                  "priceDec": "41.00"
               }
            },
            "results": {
               "result": "-",
               "type": "H"
            },
            "channels": "IPLYFBJSCMHQGNAEZVU",
            "displayOrder": "10"
         }
      }
   }
}
Status: 200 (Ok) - Fault 10070 - Missing marketId
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10070</faultCode>
         <faultString>Missing request parameter.</faultString>
         <faultName>marketId</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10070",
               "faultString":"Missing request parameter",
               "faultName":"marketId"
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10071 - Invalid marketId
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10071</faultCode>
         <faultString>Invalid request parameter.</faultString>
         <faultName>marketId</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10071",
               "faultString":"Invalid request parameter.",
               "faultName":"marketId"
            }
         ]
      }
   ]
}
getOutcomesCompetitorsByMarket()
Retrieves the horse information for the parent resource.
Request Example
GET /v1/competitions/markets/{marketId}/outcomes/competitors HTTP/1.1
Host: sandbox.whapi.com
Accept: application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
who-apiKey: l7xxa54460c573b5497c9b24b505xxxxxxxx
Request Parameters
template parameters
NameTypeDescription
marketIdinteger
(required)
The id of the market to request information for.
header parameters
NameTypeDescription
who-apiKeystring
(required)
A unique identifier of your application that is generated by the API portal and presented in the header.
acceptstring
(required)
options:
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8, application/vnd.who.Sportsbook+json;v=1;charset=utf-8
The representation of the response.
Response Description
whoCompetitions
Object Name Type Constraints Optional Description
element created String YYYY-MM-DD HH:MM:SS No Date and time the response was created
element disclaimer String - No The William Hill disclaimer notice
element copyright String - No The William Hill copyright notice
node outcome Node - No The outcome node
node competitors Node - No The competitors node
outcome
Object Name Type Constraints Optional Description
attribute id Integer - No Unique identifier for this outcome
element name String - No Human-friendly name of the outcome
element status String A|S No Status of the outcomes: A - Active S – Suspended
node odds Node - No The odds node
node results Node - Yes The results node
element channels String - No The channels this entry can be accessed from
element displayOrder Integer - No The lower the order number, the more important the entry (can be a negative number)
element displayed String - Yes Whether the outcome is displayed
element runnerNumber Integer - Yes The number of the runner
element unformattedHandicap String - Yes The unformatted handicap applied to the outcome
element handicap String - Yes The handicap applied to the outcome
element lastUpdateDate String YYYY-MM-DD No The date of the last update to the entry
element lastUpdateTime String HH:MM:SS No The time of the last update to the entry
odds
Object Name Type Constraints Optional Description
node livePrice Node - No The livePrice node
element history Integer - Yes The amount of time (in seconds) before a inplay bet is accepted
livePrice
Object Name Type Constraints Optional Description
element priceNum Float (?=.*\d)\d*(?:\.\d\d)? No When the odds are shown in vulgar fractions this is the numerator of the fraction. For example: 5 in 5/2
element priceDen Float (?=.*\d)\d*(?:\.\d\d)? No When the odds are shown in vulgar fractions this is the denominator of the fraction. For example: 2 in 5/2
element priceFrac String - No Odds for this outcome in fractional format
element priceDec Float (?=.*\d)\d*(?:\.\d\d)? No The price in decimal format
results
Object Name Type Constraints Optional Description
element result String - Yes The result of the outcome
element type String - Yes The type of the result
competitors
Object Name Type Constraints Optional Description
node competitor Node - No The competitor node
competitor
Object Name Type Constraints Optional Description
attribute id Integer [0-9]+ No Unique identifier of the competitor in the event
attribute type Integer [A-Z]* No The type of competitor that the information is being given for
element age Integer [0-9]* No The age of the horse
element drawNum Integer [0-9]* No The stall number that the horse is allocated and will start from
element formGuide String [A-Z]* No The form of a horse is a record of significant events, mainly its performance in previous races. For example: The value 874-1 means that the horse finished 8th, then 7th in the next race, then 4th, hyphen here means he did not finish in the race, and was 1st in the last race he was running in.
element jockeyName String [A-Z]* No The name of the Jockey who's riding the horse
element overview String [A-Z]* No Additional information about the horse's performance
element rating Integer [0-9]* No The rating of the horse which is defined by a rating provider. It represents the horse's performance (the higher the rating, the better the horse is)
element trainerName String [A-Z]* No The name of the horses trainer
element weightPounds Integer [0-9]* No The rider weight (in pounds)
element silkImageUrl String URI No The full URL of the silk image in our sportsbook
element ownerName String [A-Z]* No The name of the horses owner(s)
element colour String b|bl|br|ch|gr Yes The colour of the horse (There are 5 colours. b = Bay. bl = Black. br = Brown. ch = Chestnut. gr = Grey)
element sex String F|M Yes The sex of the horse (F|M)
ResponsesExpand AllCollapse All
Status: 200 (Ok) - Success
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <created>2014-09-15 08:19:23</created>
   <disclaimer>WHG (International) Ltd ("We/Us") of 6/1 Waterport Place, Gibraltar owns the Website (the "Website") relating to information contained on its main trading website. By using this service you agree to these full Terms of Use available at http://developer.wiliamhilll.com/</disclaimer>
   <copyright>Copyright (c)2014, WHG (International) Limited. All rights reserved</copyright>
   <outcome id="14189101">
      <name>Cabbies Lou</name>
      <status>A</status>
      <odds>
         <livePrice>
            <priceNum>SP</priceNum>
            <priceDen/>
            <priceFrac>SP</priceFrac>
            <priceDec>SP</priceDec>
         </livePrice>
         <history/>
      </odds>
      <results>
         <result>-</result>
         <type>-</type>
      </results>
      <channels>IPLYFBJSCMN</channels>
      <displayOrder>3</displayOrder>
      <displayed/>
      <runnerNumber>3</runnerNumber>
      <unformattedHandicap/>
      <handicap/>
      <lastUpdateDate/>
      <lastUpdateTime/>
      <competitor id="3"/>
   </outcome>
   <competitors>
      <competitor id="3" type="Horse">
         <age>2</age>
         <drawNum>5</drawNum>
         <formGuide>21569</formGuide>
         <jockeyName>Haynes, J</jockeyName>
         <overview>Didn't need to improve on promising debut to win Ripon maiden (5f, good to soft) in May but has struggled in both nurseries; plummeting down the weights but needs first-time visor to help her get back on track.</overview>
         <rating>78</rating>
         <trainerName>Wilson, N</trainerName>
         <weightPounds>124</weightPounds>
         <silkImageUrl>http://whdn.williamhill.com/content/sportsbook/silks/218689.gif</silkImageUrl>
         <ownerName>Glyn Budden</ownerName>
         <colour/>
         <sex/>
      </competitor>
   </competitors>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{"whoCompetitions": {
    "created": "2014-09-15 08:39:32",
    "disclaimer": "WHG (International) Ltd (\"We/Us\") of 6/1 Waterport Place, Gibraltar owns the Website (the \"Website\") relating to information contained on its main trading website. By using this service you agree to these full Terms of Use available at http://developer.wiliamhilll.com/",
    "copyright": "Copyright (c)2014, WHG (International) Limited. All rights reserved",
    "outcome": {
        "id": "14189101",
        "name": "Cabbies Lou",
        "status": "A",
        "odds": {
            "livePrice": {
                "priceNum": "SP",
                "priceDen": "",
                "priceFrac": "SP",
                "priceDec": "SP"
            },
            "history": ""
        },
        "results": {
            "result": "-",
            "type": "-"
        },
        "channels": "IPLYFBJSCMN",
        "displayOrder": "3",
        "displayed": "",
        "runnerNumber": "3",
        "unformattedHandicap": "",
        "handicap": "",
        "lastUpdateDate": "",
        "lastUpdateTime": "",
        "competitor": [{"id": "3"}]
    },
    "competitors": [{
        "id": "3",
        "type": "Horse",
        "age": "2",
        "drawNum": "5",
        "formGuide": "21569",
        "jockeyName": "Haynes, J",
        "overview": "Didn't need to improve on promising debut to win Ripon maiden (5f, good to soft) in May but has struggled in both nurseries; plummeting down the weights but needs first-time visor to help her get back on track.",
        "rating": "78",
        "trainerName": "Wilson, N",
        "weightPounds": "124",
        "silkImageUrl": "http://whdn.williamhill.com/content/sportsbook/silks/218689.gif",
        "ownerName": "Glyn Budden",
        "colour": "",
        "sex": ""
    }]
}}
Status: 404 (Not Found) - Not Found or invalid id
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoFaults>
   <fault>
      <faultCode>10003</faultCode>
      <faultString>Resource not found</faultString>
      <faultName/>
   </fault>
</whoFaults>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
  "whoFaults": {
    "fault": {
      "faultCode": "10003",
      "faultString": "Resource not found"
    }
  }
}
Status: 404 (Not Found) - Metadata not configured correctly
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoFaults>
  <fault>
    <faultCode>11000</faultCode>
    <faultString>Application metadata not configured correctly</faultString>
    <faultName></faultName>
  </fault>
</whoFaults>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
  "whoFaults": {
    "fault": {
      "faultCode": "11000",
      "faultString": "Application metadata not configured correctly"
    }
  }
}
Status: 200 (Ok) - Fault 10070 - Missing marketId
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10070</faultCode>
         <faultString>Missing request parameter.</faultString>
         <faultName>marketId</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10070",
               "faultString":"Missing request parameter",
               "faultName":"marketId"
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10071 - Invalid marketId
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10071</faultCode>
         <faultString>Invalid request parameter.</faultString>
         <faultName>marketId</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10071",
               "faultString":"Invalid request parameter.",
               "faultName":"marketId"
            }
         ]
      }
   ]
}
getOutcome()
Retrieves an outcome.
Request Example
GET /v1/competitions/outcomes/{outcomeId} HTTP/1.1
Host: sandbox.whapi.com
Accept: application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
who-apiKey: l7xxa54460c573b5497c9b24b505xxxxxxxx
Request Parameters
template parameters
NameTypeDescription
outcomeIdinteger
(required)
The id of the outcome to request information for.
header parameters
NameTypeDescription
who-apiKeystring
(required)
A unique identifier of your application that is generated by the API portal and presented in the header.
acceptstring
(required)
options:
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8, application/vnd.who.Sportsbook+json;v=1;charset=utf-8
The representation of the response.
Response Description
whoCompetitions
Object Name Type Constraints Optional Description
element created String YYYY-MM-DD HH:MM:SS No Date and time the response was created
element disclaimer String - No The William Hill disclaimer notice
element copyright String - No The William Hill copyright notice
node outcome Node - No The outcome node
outcomes
Object Name Type Constraints Optional Description
attribute id Integer - No Unique identifier for this outcome
element name String - No Human-friendly name of the outcome
element status String A|S No Status of the outcomes: A - Active S – Suspended
node odds Node - No The odds node
node results Node - Yes The results node
element channels String - No The channels this entry can be accessed from
element displayOrder Integer - No The lower the order number, the more important the entry (can be a negative number)
element displayed String - Yes Whether the outcome is displayed
element runnerNumber Integer - Yes The number of the runner
element unformattedHandicap String - Yes The unformatted handicap applied to the outcome
element handicap String - Yes The handicap applied to the outcome
element lastUpdateDate String YYYY-MM-DD No The date of the last update to the entry
element lastUpdateTime String HH:MM:SS No The time of the last update to the entry
odds
Object Name Type Constraints Optional Description
node livePrice Node - No The livePrice node
element history Integer - Yes The amount of time (in seconds) before a inplay bet is accepted
livePrice
Object Name Type Constraints Optional Description
element priceNum Float (?=.*\d)\d*(?:\.\d\d)? No When the odds are shown in vulgar fractions this is the numerator of the fraction. For example: 5 in 5/2
element priceDen Float (?=.*\d)\d*(?:\.\d\d)? No When the odds are shown in vulgar fractions this is the denominator of the fraction. For example: 2 in 5/2
element priceFrac String - No Odds for this outcome in fractional format
element priceDec Float (?=.*\d)\d*(?:\.\d\d)? No The price in decimal format
results
Object Name Type Constraints Optional Description
element result String - Yes The result of the outcome
element type String - Yes The type of the result
ResponsesExpand AllCollapse All
Status: 200 (Ok) - Success - Information obtained
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <created>2014-09-15 08:19:23</created>
   <disclaimer>WHG (International) Ltd ("We/Us") of 6/1 Waterport Place, Gibraltar owns the Website (the "Website") relating to information contained on its main trading website. By using this service you agree to these full Terms of Use available at http://developer.wiliamhilll.com/</disclaimer>
   <copyright>Copyright (c)2014, WHG (International) Limited. All rights reserved</copyright>
   <outcome id="786274572">
      <name>Jacksonville Jaguars</name>
      <status>A</status>
      <odds>
         <livePrice>
            <priceNum>250</priceNum>
            <priceDen>1</priceDen>
            <priceFrac>250/1</priceFrac>
            <priceDec>251.00</priceDec>
         </livePrice>
         <history/>
      </odds>
      <results>
         <result>-</result>
         <type>-</type>
      </results>
      <channels>IPLYFBJSCMHQGNAEVU</channels>
      <displayOrder>0</displayOrder>
      <displayed/>
      <runnerNumber/>
      <unformattedHandicap/>
      <handicap/>
      <lastUpdateDate/>
      <lastUpdateTime/>
   </outcome>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions": {
      "created": "2014-09-15 08:19:23",
      "disclaimer": "WHG (International) Ltd (\"We/Us\") of 6/1 Waterport Place, Gibraltar owns the Website (the \"Website\") relating to information contained on its main trading website. By using this service you agree to these full Terms of Use available at http://developer.wiliamhilll.com/",
      "copyright": "Copyright (c)2014, WHG (International) Limited. All rights reserved",
      "outcome": {
         "id": "786274572",
         "name": "Jacksonville Jaguars",
         "status": "A",
         "odds": {
            "livePrice": {
               "priceNum": "250",
               "priceDen": "1",
               "priceFrac": "250/1",
               "priceDec": "251.00"
            }
         },
         "results": {
            "result": "-",
            "type": "-"
         },
         "channels": "IPLYFBJSCMHQGNAEVU",
         "displayOrder": "0"
      }
   }
}
Status: 200 (Ok) - Fault 10070 - Missing outcomeId
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10070</faultCode>
         <faultString>Missing request parameter.</faultString>
         <faultName>outcomeId</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10070",
               "faultString":"Missing request parameter",
               "faultName":"outcomeId"
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10071 - Invalid outcomeId
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10071</faultCode>
         <faultString>Invalid request parameter.</faultString>
         <faultName>outcomeId</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10071",
               "faultString":"Invalid request parameter.",
               "faultName":"outcomeId"
            }
         ]
      }
   ]
}
getCompetitorsByOutcome()
Retrieves the price information and the horse information for the parent resource.
Request Example
GET /v1/competitions/outcomes/{outcomeId}/competitors HTTP/1.1
Host: sandbox.whapi.com
Accept: application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
who-apiKey: l7xxa54460c573b5497c9b24b505xxxxxxxx
Request Parameters
template parameters
NameTypeDescription
outcomeIdinteger
(required)
The id of the outcome to request information for.
header parameters
NameTypeDescription
who-apiKeystring
(required)
A unique identifier of your application that is generated by the API portal and presented in the header.
acceptstring
(required)
options:
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8, application/vnd.who.Sportsbook+json;v=1;charset=utf-8
The representation of the response.
Response Description
whoCompetitions
Object Name Type Constraints Optional Description
element created String YYYY-MM-DD HH:MM:SS No Date and time the response was created
element disclaimer String - No The William Hill disclaimer notice
element copyright String - No The William Hill copyright notice
node outcome Node - No The outcome node
node competitors Node - No The competitors node
outcome
Object Name Type Constraints Optional Description
attribute id Integer - No Unique identifier for this outcome
element name String - No Human-friendly name of the outcome
element status String A|S No Status of the outcomes: A - Active S – Suspended
node odds Node - No The odds node
node results Node - Yes The results node
element channels String - No The channels this entry can be accessed from
element displayOrder Integer - No The lower the order number, the more important the entry (can be a negative number)
element displayed String - Yes Whether the outcome is displayed
element runnerNumber Integer - Yes The number of the runner
element unformattedHandicap String - Yes The unformatted handicap applied to the outcome
element handicap String - Yes The handicap applied to the outcome
element lastUpdateDate String YYYY-MM-DD No The date of the last update to the entry
element lastUpdateTime String HH:MM:SS No The time of the last update to the entry
odds
Object Name Type Constraints Optional Description
node livePrice Node - No The livePrice node
element history Integer - Yes The amount of time (in seconds) before a inplay bet is accepted
livePrice
Object Name Type Constraints Optional Description
element priceNum Float (?=.*\d)\d*(?:\.\d\d)? No When the odds are shown in vulgar fractions this is the numerator of the fraction. For example: 5 in 5/2
element priceDen Float (?=.*\d)\d*(?:\.\d\d)? No When the odds are shown in vulgar fractions this is the denominator of the fraction. For example: 2 in 5/2
element priceFrac String - No Odds for this outcome in fractional format
element priceDec Float (?=.*\d)\d*(?:\.\d\d)? No The price in decimal format
results
Object Name Type Constraints Optional Description
element result String - Yes The result of the outcome
element type String - Yes The type of the result
competitors
Object Name Type Constraints Optional Description
node competitor Node - No The competitor node
competitor
Object Name Type Constraints Optional Description
attribute id Integer [0-9]+ No Unique identifier of the competitor in the event
attribute type Integer [A-Z]* No The type of competitor that the information is being given for
element age Integer [0-9]* No The age of the horse
element drawNum Integer [0-9]* No The stall number that the horse is allocated and will start from
element formGuide String [A-Z]* No The form of a horse is a record of significant events, mainly its performance in previous races. For example: The value 874-1 means that the horse finished 8th, then 7th in the next race, then 4th, hyphen here means he did not finish in the race, and was 1st in the last race he was running in.
element jockeyName String [A-Z]* No The name of the Jockey who's riding the horse
element overview String [A-Z]* No Additional information about the horse's performance
element rating Integer [0-9]* No The rating of the horse which is defined by a rating provider. It represents the horse's performance (the higher the rating, the better the horse is)
element trainerName String [A-Z]* No The name of the horses trainer
element weightPounds Integer [0-9]* No The rider weight (in pounds)
element silkImageUrl String URI No The full URL of the silk image in our sportsbook
element ownerName String [A-Z]* No The name of the horses owner(s)
element colour String b|bl|br|ch|gr Yes The colour of the horse (There are 5 colours. b = Bay. bl = Black. br = Brown. ch = Chestnut. gr = Grey)
element sex String F|M Yes The sex of the horse (F|M)
ResponsesExpand AllCollapse All
Status: 200 (Ok) - Success - Information obtained
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <created>2014-09-15 08:19:23</created>
   <disclaimer>WHG (International) Ltd ("We/Us") of 6/1 Waterport Place, Gibraltar owns the Website (the "Website") relating to information contained on its main trading website. By using this service you agree to these full Terms of Use available at http://developer.wiliamhilll.com/</disclaimer>
   <copyright>Copyright (c)2014, WHG (International) Limited. All rights reserved</copyright>
   <outcome id="14189101">
      <name>Cabbies Lou</name>
      <status>A</status>
      <odds>
         <livePrice>
            <priceNum>SP</priceNum>
            <priceDen/>
            <priceFrac>SP</priceFrac>
            <priceDec>SP</priceDec>
         </livePrice>
         <history/>
      </odds>
      <results>
         <result>-</result>
         <type>-</type>
      </results>
      <channels>IPLYFBJSCMN</channels>
      <displayOrder>3</displayOrder>
      <displayed/>
      <runnerNumber>3</runnerNumber>
      <unformattedHandicap/>
      <handicap/>
      <lastUpdateDate/>
      <lastUpdateTime/>
      <competitor id="3"/>
   </outcome>
   <competitors>
      <competitor id="3" type="Horse">
         <age>2</age>
         <drawNum>5</drawNum>
         <formGuide>21569</formGuide>
         <jockeyName>Haynes, J</jockeyName>
         <overview>Didn't need to improve on promising debut to win Ripon maiden (5f, good to soft) in May but has struggled in both nurseries; plummeting down the weights but needs first-time visor to help her get back on track.</overview>
         <rating>78</rating>
         <trainerName>Wilson, N</trainerName>
         <weightPounds>124</weightPounds>
         <silkImageUrl>http://whdn.williamhill.com/content/sportsbook/silks/218689.gif</silkImageUrl>
         <ownerName>Glyn Budden</ownerName>
         <colour/>
         <sex/>
      </competitor>
   </competitors>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{"whoCompetitions": {
    "created": "2014-09-15 08:39:32",
    "disclaimer": "WHG (International) Ltd (\"We/Us\") of 6/1 Waterport Place, Gibraltar owns the Website (the \"Website\") relating to information contained on its main trading website. By using this service you agree to these full Terms of Use available at http://developer.wiliamhilll.com/",
    "copyright": "Copyright (c)2014, WHG (International) Limited. All rights reserved",
    "outcome": {
        "id": "14189101",
        "name": "Cabbies Lou",
        "status": "A",
        "odds": {
            "livePrice": {
                "priceNum": "SP",
                "priceDen": "",
                "priceFrac": "SP",
                "priceDec": "SP"
            },
            "history": ""
        },
        "results": {
            "result": "-",
            "type": "-"
        },
        "channels": "IPLYFBJSCMN",
        "displayOrder": "3",
        "displayed": "",
        "runnerNumber": "3",
        "unformattedHandicap": "",
        "handicap": "",
        "lastUpdateDate": "",
        "lastUpdateTime": "",
        "competitor": [{"id": "3"}]
    },
    "competitors": [{
        "id": "3",
        "type": "Horse",
        "age": "2",
        "drawNum": "5",
        "formGuide": "21569",
        "jockeyName": "Haynes, J",
        "overview": "Didn't need to improve on promising debut to win Ripon maiden (5f, good to soft) in May but has struggled in both nurseries; plummeting down the weights but needs first-time visor to help her get back on track.",
        "rating": "78",
        "trainerName": "Wilson, N",
        "weightPounds": "124",
        "silkImageUrl": "http://whdn.williamhill.com/content/sportsbook/silks/218689.gif",
        "ownerName": "Glyn Budden",
        "colour": "",
        "sex": ""
    }]
}}
Status: 404 (Not Found) - Not Found or invalid id
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoFaults>
   <fault>
      <faultCode>10003</faultCode>
      <faultString>Resource not found</faultString>
      <faultName/>
   </fault>
</whoFaults>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
  "whoFaults": {
    "fault": {
      "faultCode": "10003",
      "faultString": "Resource not found"
    }
  }
}
Status: 404 (Not Found) - Metadata not configured correctly
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoFaults>
  <fault>
    <faultCode>11000</faultCode>
    <faultString>Application metadata not configured correctly</faultString>
    <faultName></faultName>
  </fault>
</whoFaults>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
  "whoFaults": {
    "fault": {
      "faultCode": "11000",
      "faultString": "Application metadata not configured correctly"
    }
  }
}
Status: 200 (Ok) - Fault 10070 - Missing outcomeId
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10070</faultCode>
         <faultString>Missing request parameter.</faultString>
         <faultName>outcomeId</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10070",
               "faultString":"Missing request parameter",
               "faultName":"outcomeId"
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10071 - Invalid outcomeId
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10071</faultCode>
         <faultString>Invalid request parameter.</faultString>
         <faultName>outcomeId</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10071",
               "faultString":"Invalid request parameter.",
               "faultName":"outcomeId"
            }
         ]
      }
   ]
}
getSuggestedOutcomes()
Suggests outcomes from all sports.
Request Example
POST /v1/competitions/outcomes/suggestions?stake=100&numOutcomes=10&expectedReturns=1000 HTTP/1.1
Host: sandbox.whapi.com
Accept: application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
who-apiKey: l7xxa54460c573b5497c9b24b505xxxxxxxx
Payload:
<whoCompetitions>                 
   <suggestions>
      <outcome id="26190681" suggestion="exclude" />
      <outcome id="26190693" suggestion="exclude" />
      <outcome id="26190697" suggestion="held">                          
         <odds>
            <livePrice>
               <priceNum>16</priceNum>
               <priceDen>1</priceDen>
               <priceDec>17</priceDec>
            </livePrice>
         </odds>
      </outcome>                       
      <!-- MORE -->
   </suggestions>
</whoCompetitions>
Request Description
whoCompetitions
Object Name Type Constraints Optional Description
node suggestions - - No The suggestions node
suggestions
Object Name Type Constraints Optional Description
node outcome Node - No The outcome node
outcome
Object Name Type Constraints Optional Description
attribute id String - No The outcome identifier
attribute suggestion String - No The outcome suggestion
node odds Node - Yes The odds node
odds
Object Name Type Constraints Optional Description
node livePrice - - No The livePrice node
livePrice
>
Object Name Type Constraints Optional Description
element priceNum Float (?=.*\d)\d*(?:\.\d\d)? No When the odds are shown in vulgar fractions this is the numerator of the fraction. For example: 5 in 5/2
element priceDen Float (?=.*\d)\d*(?:\.\d\d)? No When the odds are shown in vulgar fractions this is the denominator of the fraction. For example: 2 in 5/2
element priceDec Float (?=.*\d)\d*(?:\.\d\d)? No The price in decimal format
Request Parameters
header parameters
NameTypeDescription
who-apiKeystring
(required)
A unique identifier of your application that is generated by the API portal and presented in the header.
acceptstring
(required)
options:
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8, application/vnd.who.Sportsbook+json;v=1;charset=utf-8
The representation of the response.
query parameters
NameTypeDescription
stakestring
(required)
Enter a value for the stake parameter.
numOutcomesstring
(required)
Enter how many outcomes you want to be included in the response. The maximum number for the outcome is 100.
expectedReturnsstring
(required)
Enter the amount you want to make on your stake.
Response Description
whoCompetitions
Object Name Type Constraints Optional Description
element estimatedReturns Float (?=.*\d)\d*(?:\.\d\d)? No Estimated returns
node suggestions - - No Suggestions node
suggestions
Object Name Type Constraints Optional Description
node outcome - - No Outcome node
outcome
Object Name Type Constraints Optional Description
attribute id Integer [0-9]* No Id of the outcome
attribute suggestion String NEW|HELD|EXCLUDED No Type of the outcome
element name String - No Human-friendly name of the outcome
node odds Node - No Odds node
node sport Node - No The sport node
node type Node - No The type node
odds
Object Name Type Constraints Optional Description
node livePrice - - No The livePrice node
livePrice
Object Name Type Constraints Optional Description
element priceNum Float (?=.*\d)\d*(?:\.\d\d)? No When the odds are shown in vulgar fractions this is the numerator of the fraction. For example: 5 in 5/2
element priceDen Float (?=.*\d)\d*(?:\.\d\d)? No When the odds are shown in vulgar fractions this is the denominator of the fraction. For example: 2 in 5/2
element priceDec Float (?=.*\d)\d*(?:\.\d\d)? No The price in decimal format
element priceFrac String - No Odds for this outcome in fractional format
sport
Object Name Type Constraints Optional Description
attribute id Integer [0-9]* No Id of the sport
element name String - No Name of the sport
type
Object Name Type Constraints Optional Description
attribute id Integer [0-9]* No Id of the type
element name String - No Name of the Type
node event - - No Event node
event
Object Name Type Constraints Optional Description
attribute id Integer [0-9]* No Id of the event
element name String - No Name of the Event
node market - - No Market node
market
Object Name Type Constraints Optional Description
attribute id Integer [0-9]* No Id of the market
element name String - No Name of the Market
ResponsesExpand AllCollapse All
Status: 200 (Ok) - Success - Outcomes returned that match suggested criteria
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <estimatedReturns>12345.67</estimatedReturns>
   <suggestions>
      <outcome id="26190696" suggestion="new">                                      
         <name>Gold Gleam</name>
         <odds>
            <livePrice>
               <priceNum>4</priceNum>
               <priceDen>1</priceDen>
               <priceDec>5</priceDec>
               <priceFrac>4/1</priceFrac>
            </livePrice>
         </odds>
         <sport id="2">
            <name>Horse Racing</name>
         </sport>
         <type id="184">
            <name>Leicester</name>
            <event id="1135765">
               <name>8:00 Leicester</name>
               <market id="4811009">
                  <name>Win</name>
               </market>
            </event>
         </type>
      </outcome>
      <outcome id="26190697" suggestion="new">                                       
         <name>Koha</name>
         <odds>
            <livePrice>
               <priceNum>16</priceNum>
               <priceDen>1</priceDen>
               <priceDec>17</priceDec>
               <priceFrac>16/1</priceFrac>
            </livePrice>
         </odds>
         <sport id="2">
            <name>Horse Racing</name>
         </sport>
         <type id="185">
            <name>Windsor</name>
            <event id="1135781">
               <name>6:10 Windsor</name>
               <market id="4811025">
                  <name>Win</name>
               </market>
            </event>
         </type>
      </outcome>
   </suggestions>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
  "whoCompetitions": {
    "estimatedReturns": "12345.67",
    "suggestions": {
      "outcome": [
        {
          "id": "26190696",
          "suggestion": "new",
          "name": "Gold Gleam",
          "odds": {
            "livePrice": {
              "priceNum": "4",
              "priceDen": "1",
              "priceDec": "5",
              "priceFrac": "4/1"
            }
          },
          "sport": {
            "id": "2",
            "name": "Horse Racing"
          },
          "type": {
            "id": "184",
            "name": "Leicester",
            "event": {
              "id": "1135765",
              "name": "8:00 Leicester",
              "market": {
                "id": "4811009",
                "name": "Win"
              }
            }
          }
        },
        {
          "id": "26190697",
          "suggestion": "new",
          "name": "Koha",
          "odds": {
            "livePrice": {
              "priceNum": "16",
              "priceDen": "1",
              "priceDec": "17",
              "priceFrac": "16/1"
            }
          },
          "sport": {
            "id": "2",
            "name": "Horse Racing"
          },
          "type": {
            "id": "185",
            "name": "Windsor",
            "event": {
              "id": "1135781",
              "name": "6:10 Windsor",
              "market": {
                "id": "4811025",
                "name": "Win"
              }
            }
          }
        }
      ]
    }
  }
}
Status: 200 (Ok) - Fault 10070 - No outcomes requested
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10070</faultCode>
         <faultString>Missing request parameter.</faultString>
         <faultName>numOutcomes</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10070",
               "faultString":"Missing request parameter",
               "faultName":"numOutcomes"
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10070 - No stake supplied
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10070</faultCode>
         <faultString>Missing request parameter.</faultString>
         <faultName>stake</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10070",
               "faultString":"Missing request parameter",
               "faultName":"stake"
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10070 - No estimatedReturns supplied
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10070</faultCode>
         <faultString>Missing request parameter.</faultString>
         <faultName>estimatedReturns</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10070",
               "faultString":"Missing request parameter",
               "faultName":"estimatedReturns"
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10070 - Missing outcome id
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10070</faultCode>
         <faultString>Missing request parameter.</faultString>
         <faultName>outcome.id</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10070",
               "faultString":"Missing request parameter",
               "faultName":"outcome.id"
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10070 - Missing outcome suggestion
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10070</faultCode>
         <faultString>Missing request parameter.</faultString>
         <faultName>outcome.suggestion</faultName>
         <solution><outcome id="26190697" /></solution>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10070",
               "faultString":"Missing request parameter",
               "faultName":"outcome.suggestion"
               "solution": {
          	      "outcome": { "id": "26190697" }
               }
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10070 - Missing priceNum
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10070</faultCode>
         <faultString>Missing request parameter.</faultString>
         <faultName>priceNum</faultName>
         <solution><outcome id="26190697" /></solution>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10070",
               "faultString":"Missing request parameter",
               "faultName":"priceNum"
               "solution": {
          	      "outcome": { "id": "26190697" }
               }
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10070 - Missing priceDen
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10070</faultCode>
         <faultString>Missing request parameter.</faultString>
         <faultName>priceDen</faultName>
         <solution><outcome id="26190697" /></solution>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10070",
               "faultString":"Missing request parameter",
               "faultName":"priceDen"
               "solution": {
          	      "outcome": { "id": "26190697" }
               }
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10070 - Missing priceDec
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10070</faultCode>
         <faultString>Missing request parameter.</faultString>
         <faultName>priceDec</faultName>
         <solution><outcome id="26190697" /></solution>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10070",
               "faultString":"Missing request parameter",
               "faultName":"priceDec"
               "solution": {
          	      "outcome": { "id": "26190697" }
               }
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10071 - Invalid numOutcomes, should be an integer between 1 and 10
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10071</faultCode>
         <faultString>Invalid request parameter.</faultString>
         <faultName>numOutcomes</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10071",
               "faultString":"Invalid request parameter.",
               "faultName":"numOutcomes"
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10071 - Invalid stake, should be a GBP monetary amount
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10071</faultCode>
         <faultString>Invalid request parameter.</faultString>
         <faultName>stake</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10071",
               "faultString":"Invalid request parameter.",
               "faultName":"stake"
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10071 - Invalid estimatedReturns, should be a GBP monetary amount
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10071</faultCode>
         <faultString>Invalid request parameter.</faultString>
         <faultName>estimatedReturns</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10071",
               "faultString":"Invalid request parameter.",
               "faultName":"estimatedReturns"
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10071 - Invalid outcome id
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10071</faultCode>
         <faultString>Invalid request parameter.</faultString>
         <faultName>outcome.id</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10071",
               "faultString":"Invalid request parameter.",
               "faultName":"outcome.id"
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10071 - Invalid outcome suggestion
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10071</faultCode>
         <faultString>Invalid request parameter.</faultString>
         <faultName>outcome.suggestion</faultName>
         <solution><outcome id="26190697" /></solution>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10071",
               "faultString":"Invalid request parameter.",
               "faultName":"outcome.suggestion"
               "solution": {
          	      "outcome": { "id": "26190697" }
               }
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10071 - Invalid priceNum (not an integer)
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10071</faultCode>
         <faultString>Invalid request parameter.</faultString>
         <faultName>priceNum</faultName>
         <solution><outcome id="26190697" /></solution>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10071",
               "faultString":"Invalid request parameter.",
               "faultName":"priceNum"
               "solution": {
          	      "outcome": { "id": "26190697" }
               }
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10071 - Invalid priceDen (not an integer)
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10071</faultCode>
         <faultString>Invalid request parameter.</faultString>
         <faultName>priceDen</faultName>
         <solution><outcome id="26190697" /></solution>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10071",
               "faultString":"Invalid request parameter.",
               "faultName":"priceDen"
               "solution": {
          	      "outcome": { "id": "26190697" }
               }
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10071 - Invalid priceDec (not an integer)
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10071</faultCode>
         <faultString>Invalid request parameter.</faultString>
         <faultName>priceDec</faultName>
         <solution><outcome id="26190697" /></solution>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10071",
               "faultString":"Invalid request parameter.",
               "faultName":"priceDec"
               "solution": {
          	      "outcome": { "id": "26190697" }
               }
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 27010 - Not enough suggestions to support numOutcomes
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>27010</faultCode>
         <faultString>Too few outcomes available for a suggestion.</faultString>
         <faultName>numOutcomes</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"27010",
               "faultString":"Too few outcomes available for a suggestion.",
               "faultName":"numOutcomes"
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 27020 - stake and/or expectedReturns combination returns no results
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>27020</faultCode>
         <faultString>stake and/or expectedReturns combination returns no results.</faultString>
         <faultName>stake and/or expectedReturns</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"27020",
               "faultString":"stake and/or expectedReturns combination returns no results.",
               "faultName":"stake and/or expectedReturns"
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 27030 - Too few outcomes requested for a suggestion
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>27030</faultCode>
         <faultString>Too few outcomes requested for a suggestion.</faultString>
         <faultName>numOutcomes</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"27030",
               "faultString":"Too few outcomes requested for a suggestion.",
               "faultName":"numOutcomes"
            }
         ]
      }
   ]
}
getSports()
Retrieves a list of sports.
Request Example
GET /v1/competitions/sports HTTP/1.1
Host: sandbox.whapi.com
Accept: application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
who-apiKey: l7xxa54460c573b5497c9b24b505xxxxxxxx
Request Parameters
header parameters
NameTypeDescription
who-apiKeystring
(required)
A unique identifier of your application that is generated by the API portal and presented in the header.
acceptstring
(required)
options:
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8, application/vnd.who.Sportsbook+json;v=1;charset=utf-8
The representation of the response.
query parameters
NameTypeDescription
communitiesEnabledstring
default:
Y
options:
, Y, N
Should only communities enabled sports be returned.
Response Description
whoCompetitions
Object Name Type Constraints Optional Description
node sports Node - No The sports node
sport
Object Name Type Constraints Optional Description
attribute id Integer [0-9]* No Id of the sport
element name String [A-Z]* No Name of the sport
node category Node - No Category node
element communitiesEnabled Boolean Y|N No Indicates the value you have selected before executing the request, namely - should only communities enabled sports be retrieved
element displayOrder Integer [0-9]* No The display order number.
node inplay Node - No Inplay node
category
Object Name Type Constraints Optional Description
attribute id Integer [0-9]* No Id of the category
element name String [A-Z]* No Name of the category
element code String [A-Z]* No Code of the category
node class Node - No Class node
class
Object Name Type Constraints Optional Description
attribute id Integer [0-9]* No Id of the class
element name String [A-Z]* No Code of the class
inplay
Object Name Type Constraints Optional Description
element displayOrder Integer [0-9]* No The display order number.
ResponsesExpand AllCollapse All
Status: 200 (Ok) - Success - List of sports including category
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <sport id="43">
         <name>Horse Racing</name>
         <category id="9">
            <name>Horse Racing</name>
            <code>HORSE_RACING</code>
            <class id="2">
               <name>Horse Racing - Live</name>       
            </class>    
         </category>
         <communitiesEnabled>Y|N</communitiesEnabled>
         <displayOrder>-9998</displayOrder>
         <inplay>
            <displayOrder>-10</displayOrder>
         </inplay>
   </sport>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
  "whoCompetitions": {
       "sport": {
        "id": "43",
        "name": "Horse Racing",
        "category": {
          "id": "9",
          "name": "Horse Racing",
          "code": "HORSE_RACING",
          "class": {
            "id": "2",
            "name": "Horse Racing - Live"
          }
        },
        "communitiesEnabled": "Y|N",
        "displayOrder": "-9998",
        "inplay": { "displayOrder": "-10" }
      }
}
}
Status: 200 (Ok) - Fault 10071 - Invalid communitiesEnabled filter
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10071</faultCode>
         <faultString>Invalid request parameter.</faultString>
         <faultName>communitiesEnabled</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10071",
               "faultString":"Invalid request parameter.",
               "faultName":"communitiesEnabled"
            }
         ]
      }
   ]
}
getOutcomeWeightingsAllSports()
Retrieves top bets on outcomes for all sport.
Request Example
GET /v1/competitions/sports/outcomes/weightings HTTP/1.1
Host: sandbox.whapi.com
Accept: application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
who-apiKey: l7xxa54460c573b5497c9b24b505xxxxxxxx
Request Parameters
header parameters
NameTypeDescription
who-apiKeystring
(required)
A unique identifier of your application that is generated by the API portal and presented in the header.
acceptstring
(required)
options:
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8, application/vnd.who.Sportsbook+json;v=1;charset=utf-8
The representation of the response.
query parameters
NameTypeDescription
numOutcomesstringEnter the number of outcomes you want to retrieve in the response. The maximum number for the outcomes is 100.
Response Description
whoCompetitions
Object Name Type Constraints Optional Description
node outcome Node - No The outcome node
outcome
Object Name Type Constraints Optional Description
attribute id Integer - No Unique identifier for this outcome
element weight String - No The number of times the outcome has been bet on
element name String - No Human-friendly name of the outcome
node sport Node - No The sport node
node event Node - No The event node
node odds Node - No The odds node
node results Node - Yes The results node
event
Object Name Type Constraints Optional Description
attribute id String - No Unique identifier of the event
element tooltip String - No The tooltip displayed for the event
node market Node - No The market node
market
Object Name Type Constraints Optional Description
attribute id String - No Unique identifier of the market
element sort String - No The two-letter sort code for that market
element name String - No The market name
node availability Node - No The availability node
availability
Object Name Type Constraints Optional Description
element inPlay String Y|N No Whether betting in running will be available on this event entry
odds
Object Name Type Constraints Optional Description
node livePrice Node - No The livePrice node
element history Integer - Yes The amount of time (in seconds) before a inplay bet is accepted
livePrice
>
Object Name Type Constraints Optional Description
element priceNum Float (?=.*\d)\d*(?:\.\d\d)? No When the odds are shown in vulgar fractions this is the numerator of the fraction. For example: 5 in 5/2
element priceDen Float (?=.*\d)\d*(?:\.\d\d)? No When the odds are shown in vulgar fractions this is the denominator of the fraction. For example: 2 in 5/2
element priceFrac String (?=.*\d)\d*(?:\.\d\d)? No The price in fractional format
results
Object Name Type Constraints Optional Description
element result String - Yes The result of the outcome
element type String - Yes The type of the result
ResponsesExpand AllCollapse All
Status: 200 (Ok)
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <outcome id="830334129">
      <weight>63342</weight>
      <name>Juventus</name>
      <sport id="9"/>
      <event id="7366277">
         <tooltip>Juventus v Monaco -  Match Betting</tooltip>
         <market id="247083244">
            <sort>MR</sort>
            <name>#Match Betting</name>
            <availability>
               <eachWay>N</eachWay>
            </availability>
         </market>
      </event>
      <odds>
         <livePrice>
            <priceNum>1</priceNum>
            <priceDen>2</priceDen>
            <priceFrac>1/2</priceFrac>
         </livePrice>
      </odds>
      <results>
         <result>H</result>
      </results>
   </outcome>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions": {
      "outcome": {
         "id": "830334129",
         "weight": "63342",
         "name": "Juventus",
         "sport": { "-id": "9" },
         "event": {
            "id": "7366277",
            "tooltip": "Juventus v Monaco -  Match Betting",
            "market": {
               "id": "247083244",
               "sort": "MR",
               "name": "#Match Betting",
               "availability": { "eachWay": "N" }
            }
         },
         "odds": {
            "livePrice": {
               "priceNum": "1",
               "priceDen": "2",
               "priceFrac": "1/2"
            }
         },
         "results": { "result": "H" }
      }
   }
}
Status: 200 (Ok) - Fault 10071 - Invalid numOutcomes
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10071</faultCode>
         <faultString>Invalid request parameter.</faultString>
         <faultName>numOutcomes</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10071",
               "faultString":"Invalid request parameter.",
               "faultName":"numOutcomes"
            }
         ]
      }
   ]
}
getSport()
Retrieves a single sport.
Request Example
GET /v1/competitions/sports/{sportId} HTTP/1.1
Host: sandbox.whapi.com
Accept: application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
who-apiKey: l7xxa54460c573b5497c9b24b505xxxxxxxx
Request Parameters
template parameters
NameTypeDescription
sportIdstring
(required)
The id of the requested sport.
header parameters
NameTypeDescription
who-apiKeystring
(required)
A unique identifier of your application that is generated by the API portal and presented in the header.
acceptstring
(required)
options:
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8, application/vnd.who.Sportsbook+json;v=1;charset=utf-8
The representation of the response.
Response Description
sport
Object Name Type Constraints Optional Description
attribute id Integer [0-9]* No Id of the sport
element name String [A-Z]* No Name of the sport
node category Node - No Category node
element communitiesEnabled Boolean Y|N No Indicates the value you have selected before executing the request, namely - should only communities enabled sports be retrieved
element displayOrder Integer [0-9]* No The display order number.
node inplay Node - No Inplay node
category
Object Name Type Constraints Optional Description
attribute id Integer [0-9]* No Id of the category
element name String [A-Z]* No Name of the category
element code String [A-Z]* No Code of the category
node class Node - No Class node
class
Object Name Type Constraints Optional Description
attribute id Integer [0-9]* No Id of the class
element name String [A-Z]* No Code of the class
inplay
Object Name Type Constraints Optional Description
element displayOrder Integer [0-9]* No The display order number.
ResponsesExpand AllCollapse All
Status: 200 (Ok) - Success - Single sport including category
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
  <sport id="43">
      <name>Horse Racing</name>
      <category id="9">
         <name>Horse Racing</name>
         <code>HORSE_RACING</code>
         <class id="2">
            <name>Horse Racing - Live</name>       
         </class>    
      </category>
      <communitiesEnabled>Y|N</communitiesEnabled>
      <displayOrder>-9998</displayOrder>
      <inplay>
         <displayOrder>-10</displayOrder>
      </inplay>
  </sport>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
  "whoCompetitions": {
       "sport": {
        "id": "43",
        "name": "Horse Racing",
        "category": {
          "id": "9",
          "name": "Horse Racing",
          "code": "HORSE_RACING",
          "class": {
            "id": "2",
            "name": "Horse Racing - Live"
          }
        },
        "communitiesEnabled": "Y|N",
        "displayOrder": "-9998",
        "inplay": { "displayOrder": "-10" }
      }
}
}
Status: 200 (Ok) - Fault 10071 - Missing sport id
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10070</faultCode>
         <faultString>Missing request parameter.</faultString>
         <faultName>id</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10070",
               "faultString":"Missing request parameter",
               "faultName":"id"
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10071 - Invalid sport id
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10071</faultCode>
         <faultString>Invalid request parameter.</faultString>
         <faultName>id</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10071",
               "faultString":"Invalid request parameter.",
               "faultName":"id"
            }
         ]
      }
   ]
}
getOutcomeWeightingsSingleSport()
Retrieves the top bet on outcomes for a specific sport.
Request Example
GET /v1/competitions/sports/{sportId}/outcomes/weightings HTTP/1.1
Host: sandbox.whapi.com
Accept: application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
who-apiKey: l7xxa54460c573b5497c9b24b505xxxxxxxx
Request Parameters
template parameters
NameTypeDescription
sportIdstring
(required)
The id of the requested sport.
header parameters
NameTypeDescription
who-apiKeystring
(required)
A unique identifier of your application that is generated by the API portal and presented in the header.
acceptstring
(required)
options:
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8, application/vnd.who.Sportsbook+json;v=1;charset=utf-8
The representation of the response.
query parameters
NameTypeDescription
numOutcomesstringThe maximum number for the outcomes is 100
Response Description
whoCompetitions
Object Name Type Constraints Optional Description
node outcome Node - No The outcome node
outcome
Object Name Type Constraints Optional Description
attribute id Integer - No Unique identifier for this outcome
element weight String - No The number of times the outcome has been bet on
element name String - No Human-friendly name of the outcome
node sport Node - No The sport node
node event Node - No The event node
node odds Node - No The odds node
node results Node - Yes The results node
event
Object Name Type Constraints Optional Description
attribute id String - No Unique identifier of the event
element tooltip String - No The tooltip displayed for the event
node market Node - No The market node
market
Object Name Type Constraints Optional Description
attribute id String - No Unique identifier of the market
element sort String - No The two-letter sort code for that market
element name String - No The market name
node availability Node - No The availability node
availability
Object Name Type Constraints Optional Description
element inPlay String Y|N No Whether betting in running will be available on this event entry
odds
Object Name Type Constraints Optional Description
node livePrice Node - No The livePrice node
element history Integer - Yes The amount of time (in seconds) before a inplay bet is accepted
livePrice
>
Object Name Type Constraints Optional Description
element priceNum Float (?=.*\d)\d*(?:\.\d\d)? No When the odds are shown in vulgar fractions this is the numerator of the fraction. For example: 5 in 5/2
element priceDen Float (?=.*\d)\d*(?:\.\d\d)? No When the odds are shown in vulgar fractions this is the denominator of the fraction. For example: 2 in 5/2
element priceFrac String (?=.*\d)\d*(?:\.\d\d)? No The price in fractional format
results
Object Name Type Constraints Optional Description
element result String - Yes The result of the outcome
element type String - Yes The type of the result
ResponsesExpand AllCollapse All
Status: 200 (Ok)
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <outcome id="830334129">
      <weight>63342</weight>
      <name>Juventus</name>
      <sport id="9"/>
      <event id="7366277">
         <tooltip>Juventus v Monaco -  Match Betting</tooltip>
         <market id="247083244">
            <sort>MR</sort>
            <name>#Match Betting</name>
            <availability>
               <eachWay>N</eachWay>
            </availability>
         </market>
      </event>
      <odds>
         <livePrice>
            <priceNum>1</priceNum>
            <priceDen>2</priceDen>
            <priceFrac>1/2</priceFrac>
         </livePrice>
      </odds>
      <results>
         <result>H</result>
      </results>
   </outcome>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions": {
      "outcome": {
         "id": "830334129",
         "weight": "63342",
         "name": "Juventus",
         "sport": { "-id": "9" },
         "event": {
            "id": "7366277",
            "tooltip": "Juventus v Monaco -  Match Betting",
            "market": {
               "id": "247083244",
               "sort": "MR",
               "name": "#Match Betting",
               "availability": { "eachWay": "N" }
            }
         },
         "odds": {
            "livePrice": {
               "priceNum": "1",
               "priceDen": "2",
               "priceFrac": "1/2"
            }
         },
         "results": { "result": "H" }
      }
   }
}
Status: 200 (Ok) - Fault 10070 - Missing sportId
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10070</faultCode>
         <faultString>Missing request parameter.</faultString>
         <faultName>sportId</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10070",
               "faultString":"Missing request parameter",
               "faultName":"sportId"
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10071 - Invalid sportId
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10071</faultCode>
         <faultString>Invalid request parameter.</faultString>
         <faultName>sportId</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10071",
               "faultString":"Invalid request parameter.",
               "faultName":"sportId"
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10071 - Invalid numOutcomes
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10071</faultCode>
         <faultString>Invalid request parameter.</faultString>
         <faultName>numOutcomes</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10071",
               "faultString":"Invalid request parameter.",
               "faultName":"numOutcomes"
            }
         ]
      }
   ]
}
getSuggestedOutcomesBySport()
Suggests outcomes from a single sport.
Request Example
POST /v1/competitions/sports/43/outcomes/suggestions?stake=100&numOutcomes=10&expectedReturns=1000 HTTP/1.1
Host: sandbox.whapi.com
Accept: application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
who-apiKey: l7xxa54460c573b5497c9b24b505xxxxxxxx
Payload:
<whoCompetitions>                 
   <suggestions>
      <outcome id="26190681" suggestion="exclude" />
      <outcome id="26190693" suggestion="exclude" />
      <outcome id="26190697" suggestion="held">                          
         <odds>
            <livePrice>
               <priceNum>16</priceNum>
               <priceDen>1</priceDen>
               <priceDec>17</priceDec>
            </livePrice>
         </odds>
      </outcome>                       
      <!-- MORE -->
   </suggestions>
</whoCompetitions>
Request Description
whoCompetitions
Object Name Type Constraints Optional Description
node suggestions - - No The suggestions node
suggestions
Object Name Type Constraints Optional Description
node outcome Node - No The outcome node
outcome
Object Name Type Constraints Optional Description
attribute id String - No The outcome identifier
attribute suggestion String - No The outcome suggestion
node odds Node - Yes The odds node
odds
Object Name Type Constraints Optional Description
node livePrice - - No The livePrice node
livePrice
>
Object Name Type Constraints Optional Description
element priceNum Float (?=.*\d)\d*(?:\.\d\d)? No When the odds are shown in vulgar fractions this is the numerator of the fraction. For example: 5 in 5/2
element priceDen Float (?=.*\d)\d*(?:\.\d\d)? No When the odds are shown in vulgar fractions this is the denominator of the fraction. For example: 2 in 5/2
element priceDec Float (?=.*\d)\d*(?:\.\d\d)? No The price in decimal format
Request Parameters
template parameters
NameTypeDescription
sportIdstring
(required)
The id of the requested sport.
header parameters
NameTypeDescription
who-apiKeystring
(required)
A unique identifier of your application that is generated by the API portal and presented in the header.
acceptstring
(required)
options:
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8, application/vnd.who.Sportsbook+json;v=1;charset=utf-8
The representation of the response.
query parameters
NameTypeDescription
stakestring
(required)
Enter a value for the stake parameter.
numOutcomesstring
(required)
Enter how many outcomes you want to be included in the response. The maximum number for the outcome is 100.
expectedReturnsstring
(required)
Enter the amount you want to make on your stake.
Response Description
whoCompetitions
Object Name Type Constraints Optional Description
element estimatedReturns Float (?=.*\d)\d*(?:\.\d\d)? No Estimated returns
node suggestions - - No Suggestions node
suggestions
Object Name Type Constraints Optional Description
node outcome - - No Outcome node
outcome
Object Name Type Constraints Optional Description
attribute id Integer [0-9]* No Id of the outcome
attribute suggestion String NEW|HELD|EXCLUDED No Type of the outcome
element name String - No Human-friendly name of the outcome
node odds Node - No Odds node
node sport Node - No The sport node
node type Node - No The type node
odds
Object Name Type Constraints Optional Description
node livePrice - - No The livePrice node
livePrice
Object Name Type Constraints Optional Description
element priceNum Float (?=.*\d)\d*(?:\.\d\d)? No When the odds are shown in vulgar fractions this is the numerator of the fraction. For example: 5 in 5/2
element priceDen Float (?=.*\d)\d*(?:\.\d\d)? No When the odds are shown in vulgar fractions this is the denominator of the fraction. For example: 2 in 5/2
element priceDec Float (?=.*\d)\d*(?:\.\d\d)? No The price in decimal format
element priceFrac String - No Odds for this outcome in fractional format
sport
Object Name Type Constraints Optional Description
attribute id Integer [0-9]* No Id of the sport
element name String - No Name of the sport
type
Object Name Type Constraints Optional Description
attribute id Integer [0-9]* No Id of the type
element name String - No Name of the Type
node event - - No Event node
event
Object Name Type Constraints Optional Description
attribute id Integer [0-9]* No Id of the event
element name String - No Name of the Event
node market - - No Market node
market
Object Name Type Constraints Optional Description
attribute id Integer [0-9]* No Id of the market
element name String - No Name of the Market
ResponsesExpand AllCollapse All
Status: 200 (Ok) - Success - Outcomes returned that match suggested criteria
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <estimatedReturns>12345.67</estimatedReturns>
   <suggestions>
      <outcome id="26190696" suggestion="new">                                      
         <name>Gold Gleam</name>
         <odds>
            <livePrice>
               <priceNum>4</priceNum>
               <priceDen>1</priceDen>
               <priceDec>5</priceDec>
               <priceFrac>4/1</priceFrac>
            </livePrice>
         </odds>
         <sport id="2">
            <name>Horse Racing</name>
         </sport>
         <type id="184">
            <name>Leicester</name>
            <event id="1135765">
               <name>8:00 Leicester</name>
               <market id="4811009">
                  <name>Win</name>
               </market>
            </event>
         </type>
      </outcome>
      <outcome id="26190697" suggestion="new">                                       
         <name>Koha</name>
         <odds>
            <livePrice>
               <priceNum>16</priceNum>
               <priceDen>1</priceDen>
               <priceDec>17</priceDec>
               <priceFrac>16/1</priceFrac>
            </livePrice>
         </odds>
         <sport id="2">
            <name>Horse Racing</name>
         </sport>
         <type id="185">
            <name>Windsor</name>
            <event id="1135781">
               <name>6:10 Windsor</name>
               <market id="4811025">
                  <name>Win</name>
               </market>
            </event>
         </type>
      </outcome>
   </suggestions>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
  "whoCompetitions": {
    "estimatedReturns": "12345.67",
    "suggestions": {
      "outcome": [
        {
          "id": "26190696",
          "suggestion": "new",
          "name": "Gold Gleam",
          "odds": {
            "livePrice": {
              "priceNum": "4",
              "priceDen": "1",
              "priceDec": "5",
              "priceFrac": "4/1"
            }
          },
          "sport": {
            "id": "2",
            "name": "Horse Racing"
          },
          "type": {
            "id": "184",
            "name": "Leicester",
            "event": {
              "id": "1135765",
              "name": "8:00 Leicester",
              "market": {
                "id": "4811009",
                "name": "Win"
              }
            }
          }
        },
        {
          "id": "26190697",
          "suggestion": "new",
          "name": "Koha",
          "odds": {
            "livePrice": {
              "priceNum": "16",
              "priceDen": "1",
              "priceDec": "17",
              "priceFrac": "16/1"
            }
          },
          "sport": {
            "id": "2",
            "name": "Horse Racing"
          },
          "type": {
            "id": "185",
            "name": "Windsor",
            "event": {
              "id": "1135781",
              "name": "6:10 Windsor",
              "market": {
                "id": "4811025",
                "name": "Win"
              }
            }
          }
        }
      ]
    }
  }
}
Status: 200 (Ok) - Fault 10070 - Missing sportId
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10070</faultCode>
         <faultString>Missing request parameter.</faultString>
         <faultName>sportId</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10070",
               "faultString":"Missing request parameter",
               "faultName":"sportId"
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10070 - No outcomes requested
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10070</faultCode>
         <faultString>Missing request parameter.</faultString>
         <faultName>numOutcomes</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10070",
               "faultString":"Missing request parameter",
               "faultName":"numOutcomes"
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10070 - No stake supplied
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10070</faultCode>
         <faultString>Missing request parameter.</faultString>
         <faultName>stake</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10070",
               "faultString":"Missing request parameter",
               "faultName":"stake"
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10070 - No estimatedReturns supplied
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10070</faultCode>
         <faultString>Missing request parameter.</faultString>
         <faultName>estimatedReturns</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10070",
               "faultString":"Missing request parameter",
               "faultName":"estimatedReturns"
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10070 - Missing outcome id
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10070</faultCode>
         <faultString>Missing request parameter.</faultString>
         <faultName>outcome.id</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10070",
               "faultString":"Missing request parameter",
               "faultName":"outcome.id"
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10070 - Missing outcome suggestion
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10070</faultCode>
         <faultString>Missing request parameter.</faultString>
         <faultName>outcome.suggestion</faultName>
         <solution><outcome id="26190697" /></solution>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10070",
               "faultString":"Missing request parameter",
               "faultName":"outcome.suggestion"
               "solution": {
          	      "outcome": { "id": "26190697" }
               }
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10070 - Missing priceNum
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10070</faultCode>
         <faultString>Missing request parameter.</faultString>
         <faultName>priceNum</faultName>
         <solution><outcome id="26190697" /></solution>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10070",
               "faultString":"Missing request parameter",
               "faultName":"priceNum"
               "solution": {
          	      "outcome": { "id": "26190697" }
               }
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10070 - Missing priceDen
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10070</faultCode>
         <faultString>Missing request parameter.</faultString>
         <faultName>priceDen</faultName>
         <solution><outcome id="26190697" /></solution>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10070",
               "faultString":"Missing request parameter",
               "faultName":"priceDen"
               "solution": {
          	      "outcome": { "id": "26190697" }
               }
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10070 - Missing priceDec
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10070</faultCode>
         <faultString>Missing request parameter.</faultString>
         <faultName>priceDec</faultName>
         <solution><outcome id="26190697" /></solution>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10070",
               "faultString":"Missing request parameter",
               "faultName":"priceDec"
               "solution": {
          	      "outcome": { "id": "26190697" }
               }
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10071 - Invalid sportId
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10071</faultCode>
         <faultString>Invalid request parameter.</faultString>
         <faultName>sportId</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10071",
               "faultString":"Invalid request parameter.",
               "faultName":"sportId"
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10071 - Invalid numOutcomes, should be an integer between 1 and 10
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10071</faultCode>
         <faultString>Invalid request parameter.</faultString>
         <faultName>numOutcomes</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10071",
               "faultString":"Invalid request parameter.",
               "faultName":"numOutcomes"
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10071 - Invalid stake, should be a GBP monetary amount
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10071</faultCode>
         <faultString>Invalid request parameter.</faultString>
         <faultName>stake</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10071",
               "faultString":"Invalid request parameter.",
               "faultName":"stake"
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10071 - Invalid estimatedReturns, should be a GBP monetary amount
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10071</faultCode>
         <faultString>Invalid request parameter.</faultString>
         <faultName>estimatedReturns</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10071",
               "faultString":"Invalid request parameter.",
               "faultName":"estimatedReturns"
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10071 - Invalid outcome id
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10071</faultCode>
         <faultString>Invalid request parameter.</faultString>
         <faultName>outcome.id</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10071",
               "faultString":"Invalid request parameter.",
               "faultName":"outcome.id"
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10071 - Invalid outcome suggestion
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10071</faultCode>
         <faultString>Invalid request parameter.</faultString>
         <faultName>outcome.suggestion</faultName>
         <solution><outcome id="26190697" /></solution>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10071",
               "faultString":"Invalid request parameter.",
               "faultName":"outcome.suggestion"
               "solution": {
          	      "outcome": { "id": "26190697" }
               }
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10071 - Invalid priceNum (not an integer)
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10071</faultCode>
         <faultString>Invalid request parameter.</faultString>
         <faultName>priceNum</faultName>
         <solution><outcome id="26190697" /></solution>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10071",
               "faultString":"Invalid request parameter.",
               "faultName":"priceNum"
               "solution": {
          	      "outcome": { "id": "26190697" }
               }
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10071 - Invalid priceDen (not an integer)
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10071</faultCode>
         <faultString>Invalid request parameter.</faultString>
         <faultName>priceDen</faultName>
         <solution><outcome id="26190697" /></solution>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10071",
               "faultString":"Invalid request parameter.",
               "faultName":"priceDen"
               "solution": {
          	      "outcome": { "id": "26190697" }
               }
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10071 - Invalid priceDec (not an integer)
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10071</faultCode>
         <faultString>Invalid request parameter.</faultString>
         <faultName>priceDec</faultName>
         <solution><outcome id="26190697" /></solution>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10071",
               "faultString":"Invalid request parameter.",
               "faultName":"priceDec"
               "solution": {
          	      "outcome": { "id": "26190697" }
               }
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 27010 - Not enough suggestions to support numOutcomes
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>27010</faultCode>
         <faultString>Too few outcomes available for a suggestion.</faultString>
         <faultName>numOutcomes</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"27010",
               "faultString":"Too few outcomes available for a suggestion.",
               "faultName":"numOutcomes"
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 27020 - stake and/or expectedReturns combination returns no results
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>27020</faultCode>
         <faultString>stake and/or expectedReturns combination returns no results.</faultString>
         <faultName>stake and/or expectedReturns</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"27020",
               "faultString":"stake and/or expectedReturns combination returns no results.",
               "faultName":"stake and/or expectedReturns"
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 27030 - Too few outcomes requested for a suggestion
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>27030</faultCode>
         <faultString>Too few outcomes requested for a suggestion.</faultString>
         <faultName>numOutcomes</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"27030",
               "faultString":"Too few outcomes requested for a suggestion.",
               "faultName":"numOutcomes"
            }
         ]
      }
   ]
}
getSuggestedOutcomesByEvent()
Suggests outcomes for a specific event.
Request Example
POST /v1/competitions/event/{eventId}/outcomes/suggestions?stake=100&numOutcomes=10&expectedReturns=1000 HTTP/1.1
Host: sandbox.whapi.com
Accept: application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
who-apiKey: l7xxa54460c573b5497c9b24b505xxxxxxxx
Payload:
<whoCompetitions>                 
   <suggestions>
      <outcome id="26190681" suggestion="exclude" />
      <outcome id="26190693" suggestion="exclude" />
      <outcome id="26190697" suggestion="held">                          
         <odds>
            <livePrice>
               <priceNum>16</priceNum>
               <priceDen>1</priceDen>
               <priceDec>17</priceDec>
            </livePrice>
         </odds>
      </outcome>                       
      <!-- MORE -->
   </suggestions>
</whoCompetitions>
Request Description
whoCompetitions
Object Name Type Constraints Optional Description
node suggestions - - No The suggestions node
suggestions
Object Name Type Constraints Optional Description
node outcome Node - No The outcome node
outcome
Object Name Type Constraints Optional Description
attribute id String - No The outcome identifier
attribute suggestion String - No The outcome suggestion
node odds Node - Yes The odds node
odds
Object Name Type Constraints Optional Description
node livePrice - - No The livePrice node
livePrice
>
Object Name Type Constraints Optional Description
element priceNum Float (?=.*\d)\d*(?:\.\d\d)? No When the odds are shown in vulgar fractions this is the numerator of the fraction. For example: 5 in 5/2
element priceDen Float (?=.*\d)\d*(?:\.\d\d)? No When the odds are shown in vulgar fractions this is the denominator of the fraction. For example: 2 in 5/2
element priceDec Float (?=.*\d)\d*(?:\.\d\d)? No The price in decimal format
Request Parameters
template parameters
NameTypeDescription
eventIdinteger
(required)
The id of the event to request information for.
header parameters
NameTypeDescription
who-apiKeystring
(required)
A unique identifier of your application that is generated by the API portal and presented in the header.
acceptstring
(required)
options:
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8, application/vnd.who.Sportsbook+json;v=1;charset=utf-8
The representation of the response.
query parameters
NameTypeDescription
stakestring
(required)
Enter a value for the stake parameter.
numOutcomesstring
(required)
Enter how many outcomes you want to be included in the response. The maximum number for the outcome is 100.
expectedReturnsstring
(required)
Enter the amount you want to make on your stake.
Response Description
whoCompetitions
Object Name Type Constraints Optional Description
element estimatedReturns Float (?=.*\d)\d*(?:\.\d\d)? No Estimated returns
node suggestions - - No Suggestions node
suggestions
Object Name Type Constraints Optional Description
node outcome - - No Outcome node
outcome
Object Name Type Constraints Optional Description
attribute id Integer [0-9]* No Id of the outcome
attribute suggestion String NEW|HELD|EXCLUDED No Type of the outcome
element name String - No Human-friendly name of the outcome
node odds Node - No Odds node
node sport Node - No The sport node
node type Node - No The type node
odds
Object Name Type Constraints Optional Description
node livePrice - - No The livePrice node
livePrice
Object Name Type Constraints Optional Description
element priceNum Float (?=.*\d)\d*(?:\.\d\d)? No When the odds are shown in vulgar fractions this is the numerator of the fraction. For example: 5 in 5/2
element priceDen Float (?=.*\d)\d*(?:\.\d\d)? No When the odds are shown in vulgar fractions this is the denominator of the fraction. For example: 2 in 5/2
element priceDec Float (?=.*\d)\d*(?:\.\d\d)? No The price in decimal format
element priceFrac String - No Odds for this outcome in fractional format
sport
Object Name Type Constraints Optional Description
attribute id Integer [0-9]* No Id of the sport
element name String - No Name of the sport
type
Object Name Type Constraints Optional Description
attribute id Integer [0-9]* No Id of the type
element name String - No Name of the Type
node event - - No Event node
event
Object Name Type Constraints Optional Description
attribute id Integer [0-9]* No Id of the event
element name String - No Name of the Event
node market - - No Market node
market
Object Name Type Constraints Optional Description
attribute id Integer [0-9]* No Id of the market
element name String - No Name of the Market
ResponsesExpand AllCollapse All
Status: 200 (Ok) - Success - Outcomes returned that match suggested criteria
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <estimatedReturns>12345.67</estimatedReturns>
   <suggestions>
      <outcome id="26190696" suggestion="new">                                      
         <name>Gold Gleam</name>
         <odds>
            <livePrice>
               <priceNum>4</priceNum>
               <priceDen>1</priceDen>
               <priceDec>5</priceDec>
               <priceFrac>4/1</priceFrac>
            </livePrice>
         </odds>
         <sport id="2">
            <name>Horse Racing</name>
         </sport>
         <type id="184">
            <name>Leicester</name>
            <event id="1135765">
               <name>8:00 Leicester</name>
               <market id="4811009">
                  <name>Win</name>
               </market>
            </event>
         </type>
      </outcome>
      <outcome id="26190697" suggestion="new">                                       
         <name>Koha</name>
         <odds>
            <livePrice>
               <priceNum>16</priceNum>
               <priceDen>1</priceDen>
               <priceDec>17</priceDec>
               <priceFrac>16/1</priceFrac>
            </livePrice>
         </odds>
         <sport id="2">
            <name>Horse Racing</name>
         </sport>
         <type id="185">
            <name>Windsor</name>
            <event id="1135781">
               <name>6:10 Windsor</name>
               <market id="4811025">
                  <name>Win</name>
               </market>
            </event>
         </type>
      </outcome>
   </suggestions>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
  "whoCompetitions": {
    "estimatedReturns": "12345.67",
    "suggestions": {
      "outcome": [
        {
          "id": "26190696",
          "suggestion": "new",
          "name": "Gold Gleam",
          "odds": {
            "livePrice": {
              "priceNum": "4",
              "priceDen": "1",
              "priceDec": "5",
              "priceFrac": "4/1"
            }
          },
          "sport": {
            "id": "2",
            "name": "Horse Racing"
          },
          "type": {
            "id": "184",
            "name": "Leicester",
            "event": {
              "id": "1135765",
              "name": "8:00 Leicester",
              "market": {
                "id": "4811009",
                "name": "Win"
              }
            }
          }
        },
        {
          "id": "26190697",
          "suggestion": "new",
          "name": "Koha",
          "odds": {
            "livePrice": {
              "priceNum": "16",
              "priceDen": "1",
              "priceDec": "17",
              "priceFrac": "16/1"
            }
          },
          "sport": {
            "id": "2",
            "name": "Horse Racing"
          },
          "type": {
            "id": "185",
            "name": "Windsor",
            "event": {
              "id": "1135781",
              "name": "6:10 Windsor",
              "market": {
                "id": "4811025",
                "name": "Win"
              }
            }
          }
        }
      ]
    }
  }
}
Status: 200 (Ok) - Fault 10070 - Missing eventId
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10070</faultCode>
         <faultString>Missing request parameter.</faultString>
         <faultName>eventId</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10070",
               "faultString":"Missing request parameter",
               "faultName":"eventId"
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10070 - No outcomes requested
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10070</faultCode>
         <faultString>Missing request parameter.</faultString>
         <faultName>numOutcomes</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10070",
               "faultString":"Missing request parameter",
               "faultName":"numOutcomes"
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10070 - No stake supplied
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10070</faultCode>
         <faultString>Missing request parameter.</faultString>
         <faultName>stake</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10070",
               "faultString":"Missing request parameter",
               "faultName":"stake"
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10070 - No estimatedReturns supplied
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10070</faultCode>
         <faultString>Missing request parameter.</faultString>
         <faultName>estimatedReturns</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10070",
               "faultString":"Missing request parameter",
               "faultName":"estimatedReturns"
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10070 - Missing outcome id
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10070</faultCode>
         <faultString>Missing request parameter.</faultString>
         <faultName>outcome.id</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10070",
               "faultString":"Missing request parameter",
               "faultName":"outcome.id"
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10070 - Missing outcome suggestion
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10070</faultCode>
         <faultString>Missing request parameter.</faultString>
         <faultName>outcome.suggestion</faultName>
         <solution><outcome id="26190697" /></solution>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10070",
               "faultString":"Missing request parameter",
               "faultName":"outcome.suggestion"
               "solution": {
          	      "outcome": { "id": "26190697" }
               }
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10070 - Missing priceNum
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10070</faultCode>
         <faultString>Missing request parameter.</faultString>
         <faultName>priceNum</faultName>
         <solution><outcome id="26190697" /></solution>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10070",
               "faultString":"Missing request parameter",
               "faultName":"priceNum"
               "solution": {
          	      "outcome": { "id": "26190697" }
               }
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10070 - Missing priceDen
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10070</faultCode>
         <faultString>Missing request parameter.</faultString>
         <faultName>priceDen</faultName>
         <solution><outcome id="26190697" /></solution>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10070",
               "faultString":"Missing request parameter",
               "faultName":"priceDen"
               "solution": {
          	      "outcome": { "id": "26190697" }
               }
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10070 - Missing priceDec
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10070</faultCode>
         <faultString>Missing request parameter.</faultString>
         <faultName>priceDec</faultName>
         <solution><outcome id="26190697" /></solution>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10070",
               "faultString":"Missing request parameter",
               "faultName":"priceDec"
               "solution": {
          	      "outcome": { "id": "26190697" }
               }
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10071 - Invalid eventId
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10071</faultCode>
         <faultString>Invalid request parameter.</faultString>
         <faultName>eventId</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10071",
               "faultString":"Invalid request parameter.",
               "faultName":"eventId"
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10071 - Invalid numOutcomes, should be an integer between 1 and 10
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10071</faultCode>
         <faultString>Invalid request parameter.</faultString>
         <faultName>numOutcomes</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10071",
               "faultString":"Invalid request parameter.",
               "faultName":"numOutcomes"
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10071 - Invalid stake, should be a GBP monetary amount
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10071</faultCode>
         <faultString>Invalid request parameter.</faultString>
         <faultName>stake</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10071",
               "faultString":"Invalid request parameter.",
               "faultName":"stake"
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10071 - Invalid estimatedReturns, should be a GBP monetary amount
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10071</faultCode>
         <faultString>Invalid request parameter.</faultString>
         <faultName>estimatedReturns</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10071",
               "faultString":"Invalid request parameter.",
               "faultName":"estimatedReturns"
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10071 - Invalid outcome id
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10071</faultCode>
         <faultString>Invalid request parameter.</faultString>
         <faultName>outcome.id</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10071",
               "faultString":"Invalid request parameter.",
               "faultName":"outcome.id"
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10071 - Invalid outcome suggestion
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10071</faultCode>
         <faultString>Invalid request parameter.</faultString>
         <faultName>outcome.suggestion</faultName>
         <solution><outcome id="26190697" /></solution>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10071",
               "faultString":"Invalid request parameter.",
               "faultName":"outcome.suggestion"
               "solution": {
          	      "outcome": { "id": "26190697" }
               }
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10071 - Invalid priceNum (not an integer)
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10071</faultCode>
         <faultString>Invalid request parameter.</faultString>
         <faultName>priceNum</faultName>
         <solution><outcome id="26190697" /></solution>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10071",
               "faultString":"Invalid request parameter.",
               "faultName":"priceNum"
               "solution": {
          	      "outcome": { "id": "26190697" }
               }
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10071 - Invalid priceDen (not an integer)
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10071</faultCode>
         <faultString>Invalid request parameter.</faultString>
         <faultName>priceDen</faultName>
         <solution><outcome id="26190697" /></solution>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10071",
               "faultString":"Invalid request parameter.",
               "faultName":"priceDen"
               "solution": {
          	      "outcome": { "id": "26190697" }
               }
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 10071 - Invalid priceDec (not an integer)
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>10071</faultCode>
         <faultString>Invalid request parameter.</faultString>
         <faultName>priceDec</faultName>
         <solution><outcome id="26190697" /></solution>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"10071",
               "faultString":"Invalid request parameter.",
               "faultName":"priceDec"
               "solution": {
          	      "outcome": { "id": "26190697" }
               }
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 27010 - Not enough suggestions to support numOutcomes
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>27010</faultCode>
         <faultString>Too few outcomes available for a suggestion.</faultString>
         <faultName>numOutcomes</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"27010",
               "faultString":"Too few outcomes available for a suggestion.",
               "faultName":"numOutcomes"
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 27020 - stake and/or expectedReturns combination returns no results
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>27020</faultCode>
         <faultString>stake and/or expectedReturns combination returns no results.</faultString>
         <faultName>stake and/or expectedReturns</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"27020",
               "faultString":"stake and/or expectedReturns combination returns no results.",
               "faultName":"stake and/or expectedReturns"
            }
         ]
      }
   ]
}
Status: 200 (Ok) - Fault 27030 - Too few outcomes requested for a suggestion
Representations
application/vnd.who.Sportsbook+xml;v=1;charset=utf-8
<whoCompetitions>
   <whoFaults>
      <fault>
         <faultCode>27030</faultCode>
         <faultString>Too few outcomes requested for a suggestion.</faultString>
         <faultName>numOutcomes</faultName>
      </fault>
   </whoFaults>
</whoCompetitions>
application/vnd.who.Sportsbook+json;v=1;charset=utf-8
{
   "whoCompetitions":[
      {
         "whoFaults":[
            {
               "faultCode":"27030",
               "faultString":"Too few outcomes requested for a suggestion.",
               "faultName":"numOutcomes"
            }
         ]
      }
   ]
}
Error Handling
General Error Structure
As an application developer, you will need to see a standard error response when the system generates an error. As well as supplying a standard HTTP status code, we also supply a unique William Hill fault code, fault string and fault name (in some cases) to help you identify and resolve any issues that you may be having with our API or your requests and code.

Where the elements can be defined as the following:
  • Fault code - A unique William Hill identifier for the error
  • Fault string - A unique William Hill text string to enable you to identify the error (in English only)
  • HTTP code - the standard HTTP status code for the error
  • HTTP response - the standard HTTP response for the error

Note: A Fault name may also be generated in order to pinpoint the exact parameter where a request has failed.

Available Response Formats

The error codes are supplied in the following representations:

  • XML
  • JSON
Error Response Body

The response body will contain the unique William Hill fault code and fault string appropriate to the corresponding error.

The response will be sent according to the representation type governed by the accept parameter within the original request. The default representation is for application/xml and this representation will be returned if either the accept header is absent or if the accept header is set to application/xml.

Generic William Hill Error Codes

Click here to view the complete list of William Hill error codes for the APIs.

API Specific Error Codes

Error codeFault stringHTTP codeHTTP response
27010 too few outcomes available for a suggestion 200 Ok
27020 stake and/or expectedReturns combination returns no results 200 Ok
27030 Too few outcomes requested for a suggestion 200 Ok
HTTP Status Codes

For more information about how William Hill uses HTTP status codes with their APIs, click here.