swagger: "2.0"
schemes:
  - https
host: sandbox.whapi.com
basePath: /v2/sportsdata
info:
  contact:
    name: William Hill Labs
    url: http://developer.williamhill.com
    x-twitter: WilliamHill
  description: The William Hill SportsData REST API is a collection of GET methods to provide William Hill product data such as sport, competition, event, market and selection data (including prices).
  title: SportsData API
  version: "2"
  x-apisguru-categories:
    - entertainment
  x-logo:
    url: https://twitter.com/WillHillHelp/profile_image?size=original
  x-origin:
    - format: swagger
      url: https://developer.williamhill.com/wh-docs/docs-sdks/sportsdata/swagger/docs
      version: "2.0"
  x-providerName: whapi.com
  x-serviceName: sportsdata
consumes:
  - application/json
produces:
  - application/json
parameters:
  param_active:
    default: yes
    description: Specify whether only active entities should be returned, according to the William Hill definition of active
    in: query
    name: isPublished
    pattern: (yes|no|all|YES|NO|ALL)
    required: false
    type: string
    x-eg: yes
  param_apiKey:
    description: Your API Key available from your developer portal
    in: header
    name: apiKey
    pattern: ^[a-zA-Z0-9]{19,50}$
    required: true
    type: string
    x-eg: l7xxa54460c573b5497c9b24b505xxxxxxxx
  param_channel:
    description: Specify a channel filter and only results from that channel will be returned
    in: query
    name: channel
    pattern: ^[A-Z]{1}$
    required: false
    type: string
    x-eg: I
  param_classId:
    description: The class id to retrieve information for.
    in: path
    name: classId
    pattern: ^(OB_CL\d{1,7})$
    required: true
    type: string
    x-eg: OB_CL1
  param_competitionId:
    description: The competition id to retrieve information for.
    in: path
    name: competitionId
    pattern: ^(OB_TY\d{1,7})$
    required: true
    type: string
    x-eg: OB_TY1
  param_competitionIds:
    collectionFormat: csv
    description: A comma-separated list of competitionIds for which to retrieve topBets for
    in: query
    items:
      pattern: ^(OB_TY\d+)$
      type: string
    maxItems: 10
    minItems: 1
    name: competitionIds
    required: false
    type: array
    x-eg: OB_TY1, OB_TY2
  param_culture:
    description: Code used to return responses in language other than English, acceptable values are en-GB|de-DE|es-ES|fr-FR|nn-NO|fi-FI|ru-RU|pt-PT|hu-HU|sl-SL|ga-IE|en-CA|sr-Latn|sv-SE|el=GR|zh-CHS|it-IT|zh-CHT|cs-CZ|de-AT|ja-JP|pl-PL|da-DK|ro-RO|nl-NL|tr-TR
    in: query
    name: culture
    required: false
    type: string
    x-eg: de-DE
  param_date:
    description: Return only events for the specified date (yyyy-MM-dd).
    in: query
    name: date
    pattern: ^(\\d{4})-(\\d{2})-(\\d{2})$
    required: false
    type: string
    x-eg: 2015-10-10
  param_dateFrom:
    description: The UTC datetime from the events to be returned. (yyyy-MM-ddTHH:mm:ss)
    in: query
    name: dateFrom
    pattern: ^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2})$
    required: false
    type: string
    x-eg: 2015-10-10T13:13:01
  param_dateTo:
    description: The UTC datetime TO the events to be returned. (yyyy-MM-ddTHH:mm:ss)
    in: query
    name: dateTo
    pattern: ^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2})$
    required: false
    type: string
    x-eg: 2015-10-10T13:20:01
  param_displayed:
    default: yes
    description: Specify whether to return displayed entities or not
    in: query
    name: displayed
    pattern: (yes|no|all|YES|NO|ALL)
    required: false
    type: string
    x-eg: yes
  param_eventId:
    description: The event ID to retrieve information for.
    in: path
    name: eventId
    pattern: ^(OB_EV\d{1,7})$
    required: true
    type: string
    x-eg: OB_EV1
  param_eventSort:
    description: Filter event by event sort
    in: query
    name: eventSort
    required: false
    type: string
    x-eg: MTCH
  param_exclude:
    collectionFormat: csv
    description: Specify fields from the default to exclude (Comma-Separated List)
    in: query
    items:
      type: string
    name: exclude
    required: false
    type: array
    x-eg: order
  param_fields:
    collectionFormat: csv
    description: Specify an absolute field list to return (Comma-Separated List)
    in: query
    items:
      type: string
    name: fields
    required: false
    type: array
    x-eg: id,name,status
  param_headlinesummary:
    default: false
    description: Return only headline markets (Markets with the lowest display order) Either 1 InPlay and 1 Pre-Match, or the amount specified in marketCount, if available. Markets and Outcomes will be returned.
    in: query
    name: headlineSummary
    required: false
    type: boolean
    x-eg: "true"
  param_ids:
    collectionFormat: csv
    description: A comma-separated list of selectionIds
    in: query
    items:
      pattern: ^(OB_OU\d{1,7})$
      type: string
    maxItems: 200
    minItems: 1
    name: ids
    required: false
    type: array
    x-eg: OB_OU1,OB_OU2
  param_include:
    collectionFormat: csv
    description: Specify fields in addition to the default to return (Comma-Separated List)
    in: query
    items:
      type: string
    name: include
    required: false
    type: array
    x-eg: channels
  param_includeAllDescendants:
    default: false
    description: Include every descendant in the below heirarchy
    in: query
    name: includeAllDescendants
    required: false
    type: boolean
    x-eg: "true"
  param_includeEmpty:
    default: true
    description: When declared as false it should exclude markets and events that have no selections / markets
    in: query
    name: includeEmpty
    required: false
    type: boolean
    x-eg: "true"
  param_isInPlay:
    description: Show only events that are in-play
    in: query
    name: isInPlay
    required: false
    type: boolean
    x-eg: "true"
  param_limit:
    default: 100
    description: Specify the number of results to return
    in: query
    name: limit
    required: false
    type: integer
    x-eg: "20"
  param_locale:
    description: Code used to select a set of top bets settings, default is "whapi" which allows events set in far future to be included, setting the value to "en-GB" will activate english sportsbook settings, mirroring top bets on the website, which restricts events returned to those taking place in next 36 hours. Acceptable values (not all heve their own settings - if none currently available for that locale - en-GB will be used) are de-DE|whapi|en-GB|es-ES|fr-FR|nn-NO|fi-FI|ru-RU|pt-PT|hu-HU|sl-SL|ga-IE|en-CA|sr-Latn|sv-SE|el=GR|zh-CHS|it-IT|zh-CHT|cs-CZ|de-AT|ja-JP|pl-PL|da-DK|ro-RO|nl-NL|tr-TR
    in: query
    name: Locale
    required: false
    type: string
    x-eg: de-DE
  param_marketChannel:
    description: Specify a channel filter and only results from that channel will be returned
    in: query
    name: marketChannel
    pattern: ^[A-Z]{1}$
    required: false
    type: string
    x-eg: I
  param_marketCount:
    default: 1
    description: Specify the number of markets to return when requesting headlineSummary. This count of InPlay and Pre-Match markets will be returned.For example, when specifying 1, 1 In Play and 1 Pre Match market will be returned.
    in: query
    maximum: 3
    minimum: 1
    name: marketCount
    required: false
    type: integer
    x-eg: "10"
  param_marketDisplayed:
    default: yes
    description: Specify whether to return displayed entities or not
    in: query
    name: marketDisplayed
    pattern: (yes|no|all|YES|NO|ALL)
    required: false
    type: string
    x-eg: yes
  param_marketEW:
    description: Specify whether to return markets with each way betting or those without
    in: query
    name: marketEW
    pattern: (yes|no|Yes|No)
    required: false
    type: string
    x-eg: yes
  param_marketGroupId:
    description: Filter by marketGroupId (e.g. OB_MG1276585).
    in: query
    name: marketGroupId
    required: false
    type: string
    x-eg: OB_MG123
  param_marketGroupId2:
    description: Filter by marketGroupId (e.g. OB_MG1276585).
    in: query
    name: marketGroupId
    required: true
    type: string
    x-eg: OB_MG123
  param_marketId:
    description: The market id to retrieve information for
    in: path
    name: marketId
    pattern: ^(OB_MA\d{1,7})$
    required: true
    type: string
    x-eg: OB_MA1
  param_marketIds:
    collectionFormat: csv
    description: Comma-seaerated list of market IDs to filter by
    in: query
    items:
      pattern: ^(OB_MA\d{1,7})$
      type: string
    name: marketIds
    required: false
    type: array
    x-eg: OB_MA1, OB_MA2
  param_marketPublished:
    default: yes
    description: Specify whether only active entities should be returned, according to the William Hill definition of active
    in: query
    name: marketPublished
    pattern: (yes|no|all|YES|NO|ALL)
    required: false
    type: string
    x-eg: yes
  param_marketSort:
    description: Filter by market sort (e.g. MR (match result) -- (Outright)).
    in: query
    name: marketSort
    required: false
    type: string
    x-eg: MR
  param_marketSort2:
    description: Filter by market sort (e.g. MR (match result) -- (Outright)).
    in: query
    name: marketSort
    required: true
    type: string
    x-eg: MR
  param_marketStatus:
    description: Specify a status to filter results by. This is currently A (active) or S (suspended)
    in: query
    name: marketStatus
    pattern: (A|S)
    required: false
    type: string
    x-eg: A
  param_offset:
    default: 0
    description: Skip over a number of elements by specifying a start value for the query
    in: query
    name: offset
    required: false
    type: integer
    x-eg: "10"
  param_selectionChannel:
    description: Specify a channel filter and only results from that channel will be returned
    in: query
    name: selectionChannel
    pattern: ^[A-Z]{1}$
    required: false
    type: string
    x-eg: I
  param_selectionPublished:
    default: yes
    description: Specify whether only active entities should be returned, according to the William Hill definition of active
    in: query
    name: selectionPublished
    pattern: (yes|no|all)
    required: false
    type: string
    x-eg: yes
  param_selectionStatus:
    description: Specify a status to filter results by. This is currently A (active) or S (suspended)
    in: query
    name: selectionStatus
    pattern: (A|S)
    required: false
    type: string
    x-eg: A
  param_settled:
    description: Specify wether only settled entities should be returned
    in: query
    name: settled
    required: false
    type: boolean
    x-eg: "true"
  param_sort:
    default: id,asc
    description: "The field to order the response by, followed by the order. For example: name,desc"
    in: query
    name: sort
    required: false
    type: string
    x-eg: name,desc
  param_sortName:
    description: The market sort code used to further filter event results. Please note this can only be used with event id(s).
    in: query
    name: sortName
    required: false
    type: string
    x-eg: MR
  param_sportId:
    description: The sport id to retrieve information for.
    in: path
    name: sportId
    pattern: ^(OB_SP\d{1,7})$
    required: true
    type: string
    x-eg: OB_SP9
  param_sportIds:
    collectionFormat: csv
    description: A comma-separated list of sportsIds for which to retrieve topBets for
    in: query
    items:
      pattern: ^(OB_SP\d+)(,OB_SP\d+)*$
      type: string
    maxItems: 10
    minItems: 1
    name: sportIds
    required: false
    type: array
    x-eg: OB_SP1, OB_SP2
  param_status:
    description: Specify a status to filter results by. This is currently A (active) or S (suspended)
    in: query
    name: status
    pattern: (A|S)
    required: false
    type: string
    x-eg: A
  param_topBetEventId:
    description: The event ID to retrieve top bet information for. Multiple events up to 5 may be used
    in: query
    name: param_topBetEventId
    pattern: ^(OB_EV\d{1,7})$
    required: false
    type: string
    x-eg: OB_EV1, OB_EV1,OB_EV2
paths:
  "/classes/{classId}/competitions/":
    get:
      description: Retrieves a list of competitions for a given class id.
      operationId: getCompetitionsForClass
      parameters:
        - $ref: "#/parameters/param_apiKey"
        - $ref: "#/parameters/param_classId"
        - $ref: "#/parameters/param_active"
        - $ref: "#/parameters/param_fields"
        - $ref: "#/parameters/param_include"
        - $ref: "#/parameters/param_exclude"
        - $ref: "#/parameters/param_displayed"
        - $ref: "#/parameters/param_channel"
        - $ref: "#/parameters/param_status"
        - $ref: "#/parameters/param_sort"
        - $ref: "#/parameters/param_offset"
        - $ref: "#/parameters/param_limit"
        - $ref: "#/parameters/param_culture"
      responses:
        "200":
          description: Success
          examples:
            application/json: |
              {
               "competitions": [
               {
               "id": "OB_TY1733",
               "name": "Manchester Senior Cup",
               "status": "A"
               }
               ]
              }
          schema:
            $ref: "#/definitions/competitionsWrapper"
        "400":
          description: Incorrect or Missing Parameter
          examples:
            application/json: |
              {
               "errors" : [
               {
               "code":"10070",
               "message":"Missing Parameter",
               "field":"apiKey"
               }
               ]
              }
          schema:
            $ref: "#/definitions/errorsWrapper"
        "404":
          description: No data found for request
          examples:
            application/json: |
              {
               "errors" : [
               {
               "code":"10003",
               "message":"Resource Not Found"
               }
               ]
              }
          schema:
            $ref: "#/definitions/errorsWrapper"
      summary: Retrieves a list of competitions for a given class id.
      tags:
        - sportsdata
      x-canReturnErrors:
        - 0
  "/classes/{classId}/events/":
    get:
      description: Retrieves a list of events for a given class id. 'includeAllDescendants' parameter should be accompanied with 'date' filter or one of 'dateFrom' and 'dateTo' filters.
      operationId: getEventsForClass
      parameters:
        - $ref: "#/parameters/param_apiKey"
        - $ref: "#/parameters/param_classId"
        - $ref: "#/parameters/param_active"
        - $ref: "#/parameters/param_fields"
        - $ref: "#/parameters/param_include"
        - $ref: "#/parameters/param_exclude"
        - $ref: "#/parameters/param_displayed"
        - $ref: "#/parameters/param_channel"
        - $ref: "#/parameters/param_settled"
        - $ref: "#/parameters/param_includeEmpty"
        - $ref: "#/parameters/param_status"
        - $ref: "#/parameters/param_sort"
        - $ref: "#/parameters/param_offset"
        - $ref: "#/parameters/param_limit"
        - $ref: "#/parameters/param_headlinesummary"
        - $ref: "#/parameters/param_includeAllDescendants"
        - $ref: "#/parameters/param_isInPlay"
        - $ref: "#/parameters/param_marketCount"
        - $ref: "#/parameters/param_date"
        - $ref: "#/parameters/param_dateFrom"
        - $ref: "#/parameters/param_dateTo"
        - $ref: "#/parameters/param_eventSort"
        - $ref: "#/parameters/param_culture"
        - $ref: "#/parameters/param_marketPublished"
        - $ref: "#/parameters/param_marketStatus"
        - $ref: "#/parameters/param_marketDisplayed"
        - $ref: "#/parameters/param_marketChannel"
        - $ref: "#/parameters/param_marketSort"
        - $ref: "#/parameters/param_marketEW"
        - $ref: "#/parameters/param_selectionStatus"
        - $ref: "#/parameters/param_selectionChannel"
        - $ref: "#/parameters/param_selectionPublished"
      responses:
        "200":
          description: Success
          examples:
            application/json: |
              {
              "events": [
               {
               "id": "OB_EV2828",
               "name": "Forest Green Vs Liverpool",
               "status": "A",
               "startDateTime": "2016-01-29T20:00:00"
               },
               {
               "id": "OB_EV2829",
               "name": "XXXMan Utd Vs Man City",
               "status": "A",
               "startDateTime": "2016-01-07T11:00:00"
               },
               {
               "id": "OB_EV2849",
               "name": "Manchester Senior Cup - Winners 2015-16",
               "status": "A",
               "startDateTime": "2016-01-01T00:00:00"
               }
              ]
              }
          schema:
            $ref: "#/definitions/eventsWrapper"
        "400":
          description: Incorrect or Missing Parameter
          examples:
            application/json: |
              {
               "errors" : [
               {
               "code":"10070",
               "message":"Missing Parameter",
               "field":"apiKey"
               }
               ]
              }
          schema:
            $ref: "#/definitions/errorsWrapper"
        "404":
          description: No data found for request
          examples:
            application/json: |
              {
               "errors" : [
               {
               "code":"10003",
               "message":"Resource Not Found"
               }
               ]
              }
          schema:
            $ref: "#/definitions/errorsWrapper"
      summary: Retrieves a list of events for a given class id.
      tags:
        - sportsdata
      x-canReturnErrors:
        - 0
  "/competitions/{competitionId}":
    get:
      description: Retrieves a specific competition
      operationId: getCompetition
      parameters:
        - $ref: "#/parameters/param_apiKey"
        - $ref: "#/parameters/param_competitionId"
        - $ref: "#/parameters/param_fields"
        - $ref: "#/parameters/param_include"
        - $ref: "#/parameters/param_exclude"
        - $ref: "#/parameters/param_culture"
      responses:
        "200":
          description: Success
          examples:
            application/json: |
              {
               "id": "OB_TY1733",
               "name": "Manchester Senior Cup",
               "status": "A"
              }
          schema:
            $ref: "#/definitions/competition"
        "400":
          description: Incorrect or Missing Parameter
          examples:
            application/json: |
              {
               "errors" : [
               {
               "code":"10070",
               "message":"Missing Parameter",
               "field":"apiKey"
               }
               ]
              }
          schema:
            $ref: "#/definitions/errorsWrapper"
        "404":
          description: No data found for request
          examples:
            application/json: |
              {
               "errors" : [
               {
               "code":"10003",
               "message":"Resource Not Found"
               }
               ]
              }
          schema:
            $ref: "#/definitions/errorsWrapper"
      summary: Retrieves a specific competition
      tags:
        - sportsdata
      x-canReturnErrors:
        - 0
  "/competitions/{competitionId}/events/":
    get:
      description: Retrieves a list of events for a given competition id. 'headlineSummary' and includeAllDescendants parameters should be accompanied with 'date' filter or one of 'dateFrom' and 'dateTo' filters.
      operationId: getEventsForCompetition
      parameters:
        - $ref: "#/parameters/param_apiKey"
        - $ref: "#/parameters/param_competitionId"
        - $ref: "#/parameters/param_active"
        - $ref: "#/parameters/param_fields"
        - $ref: "#/parameters/param_include"
        - $ref: "#/parameters/param_exclude"
        - $ref: "#/parameters/param_displayed"
        - $ref: "#/parameters/param_channel"
        - $ref: "#/parameters/param_settled"
        - $ref: "#/parameters/param_includeEmpty"
        - $ref: "#/parameters/param_status"
        - $ref: "#/parameters/param_sort"
        - $ref: "#/parameters/param_offset"
        - $ref: "#/parameters/param_limit"
        - $ref: "#/parameters/param_headlinesummary"
        - $ref: "#/parameters/param_includeAllDescendants"
        - $ref: "#/parameters/param_isInPlay"
        - $ref: "#/parameters/param_marketCount"
        - $ref: "#/parameters/param_date"
        - $ref: "#/parameters/param_dateFrom"
        - $ref: "#/parameters/param_dateTo"
        - $ref: "#/parameters/param_marketGroupId"
        - $ref: "#/parameters/param_eventSort"
        - $ref: "#/parameters/param_culture"
        - $ref: "#/parameters/param_marketPublished"
        - $ref: "#/parameters/param_marketStatus"
        - $ref: "#/parameters/param_marketDisplayed"
        - $ref: "#/parameters/param_marketChannel"
        - $ref: "#/parameters/param_marketSort"
        - $ref: "#/parameters/param_marketEW"
        - $ref: "#/parameters/param_selectionStatus"
        - $ref: "#/parameters/param_selectionChannel"
        - $ref: "#/parameters/param_selectionPublished"
      responses:
        "200":
          description: Success
          examples:
            application/json: |
              {
              "events": [
               {
               "id": "OB_EV2828",
               "name": "Forest Green Vs Liverpool",
               "status": "A",
               "startDateTime": "2016-01-29T20:00:00"
               },
               {
               "id": "OB_EV2829",
               "name": "XXXMan Utd Vs Man City",
               "status": "A",
               "startDateTime": "2016-01-07T11:00:00"
               },
               {
               "id": "OB_EV2849",
               "name": "Manchester Senior Cup - Winners 2015-16",
               "status": "A",
               "startDateTime": "2016-01-01T00:00:00"
               }
              ]
              }
          schema:
            $ref: "#/definitions/eventsWrapper"
        "400":
          description: Incorrect or Missing Parameter
          examples:
            application/json: |
              {
               "errors" : [
               {
               "code":"10070",
               "message":"Missing Parameter",
               "field":"apiKey"
               }
               ]
              }
          schema:
            $ref: "#/definitions/errorsWrapper"
        "404":
          description: No data found for request
          examples:
            application/json: |
              {
               "errors" : [
               {
               "code":"10003",
               "message":"Resource Not Found"
               }
               ]
              }
          schema:
            $ref: "#/definitions/errorsWrapper"
      summary: Retrieves a list of events for a given competition id.
      tags:
        - sportsdata
      x-canReturnErrors:
        - 0
  "/competitions/{competitionId}/marketgroups/":
    get:
      description: Retrieves a list of market groups for a given competition id
      operationId: getMarketGroupsForCompetition
      parameters:
        - $ref: "#/parameters/param_apiKey"
        - $ref: "#/parameters/param_competitionId"
        - $ref: "#/parameters/param_fields"
        - $ref: "#/parameters/param_include"
        - $ref: "#/parameters/param_exclude"
        - $ref: "#/parameters/param_sort"
        - $ref: "#/parameters/param_offset"
        - $ref: "#/parameters/param_limit"
        - $ref: "#/parameters/param_culture"
        - description: Filter by market group name
          in: query
          name: name
          required: false
          type: string
          x-eg: MARKETGROUP1
      responses:
        "200":
          description: Success
          examples:
            application/json: |
              {
               "marketgroups": [
               {
               "id": "OB_MG36963",
               "name": "90 Minutes"
               },
               {
               "id": "OB_MG36964",
               "name": "Correct Score"
               },
               {
               "id": "OB_MG36966",
               "name": "First Goalscorer"
               },
               {
               "id": "OB_MG37004",
               "name": "Match Betting Live"
               },
               {
               "id": "OB_MG37043",
               "name": "Outright"
               }
               ]
              }
          schema:
            $ref: "#/definitions/marketGroupsWrapper"
        "400":
          description: Incorrect or Missing Parameter
          examples:
            application/json: |
              {
               "errors" : [
               {
               "code":"10070",
               "message":"Missing Parameter",
               "field":"apiKey"
               }
               ]
              }
          schema:
            $ref: "#/definitions/errorsWrapper"
        "404":
          description: No data found for request
          examples:
            application/json: |
              {
               "errors" : [
               {
               "code":"10003",
               "message":"Resource Not Found"
               }
               ]
              }
          schema:
            $ref: "#/definitions/errorsWrapper"
      summary: Retrieves a list of market groups for a given competition id
      tags:
        - sportsdata
      x-canReturnErrors:
        - 0
  "/competitions/{competitionId}/marketsByGroupid":
    get:
      description: Retrieves a list of events/markets/selections where markets within said event match selected sort/groupId
      operationId: getMarketsByGroupId
      parameters:
        - $ref: "#/parameters/param_apiKey"
        - $ref: "#/parameters/param_competitionId"
        - $ref: "#/parameters/param_fields"
        - $ref: "#/parameters/param_include"
        - $ref: "#/parameters/param_exclude"
        - $ref: "#/parameters/param_marketSort2"
        - $ref: "#/parameters/param_marketGroupId2"
      responses:
        "200":
          description: Success
          examples:
            application/json: |
              {
               "events": [

               {
               "id": "OB_EV123",
               "name": "ManU v City",
               "markets": {
               "id": "OB_MA1234",
               "name": "90 Minutes"
               "selections": {
               "id": "OB_OU12345",
               "fractionalOdds": "2/1"
               
               }
               }
               }
               ]
              }
          schema:
            $ref: "#/definitions/marketGroupsWrapper"
        "400":
          description: Incorrect or Missing Parameter
          examples:
            application/json: |
              {
               "errors" : [
               {
               "code":"10070",
               "message":"Missing Parameter",
               "field":"apiKey"
               }
               ]
              }
          schema:
            $ref: "#/definitions/errorsWrapper"
        "404":
          description: No data found for request
          examples:
            application/json: |
              {
               "errors" : [
               {
               "code":"10003",
               "message":"Resource Not Found"
               }
               ]
              }
          schema:
            $ref: "#/definitions/errorsWrapper"
      summary: Retrieves a list of events/markets/selections where markets within said event match selected sort/groupId
      tags:
        - sportsdata
      x-canReturnErrors:
        - 0
  /events/:
    get:
      description: Retrieves a list of events for the provided IDs.
      operationId: getEvents
      parameters:
        - $ref: "#/parameters/param_apiKey"
        - $ref: "#/parameters/param_ids"
        - $ref: "#/parameters/param_active"
        - $ref: "#/parameters/param_includeAllDescendants"
        - $ref: "#/parameters/param_fields"
        - $ref: "#/parameters/param_include"
        - $ref: "#/parameters/param_exclude"
        - $ref: "#/parameters/param_channel"
        - $ref: "#/parameters/param_settled"
        - $ref: "#/parameters/param_includeEmpty"
        - $ref: "#/parameters/param_headlinesummary"
        - $ref: "#/parameters/param_marketCount"
        - $ref: "#/parameters/param_sort"
        - $ref: "#/parameters/param_offset"
        - $ref: "#/parameters/param_limit"
        - $ref: "#/parameters/param_marketIds"
        - $ref: "#/parameters/param_culture"
        - $ref: "#/parameters/param_marketPublished"
        - $ref: "#/parameters/param_marketStatus"
        - $ref: "#/parameters/param_marketDisplayed"
        - $ref: "#/parameters/param_marketChannel"
        - $ref: "#/parameters/param_marketSort"
        - $ref: "#/parameters/param_marketEW"
        - $ref: "#/parameters/param_selectionStatus"
        - $ref: "#/parameters/param_selectionChannel"
        - $ref: "#/parameters/param_selectionPublished"
      responses:
        "200":
          description: Success
          examples:
            application/json: |
              {
               "events": [
               {
               "id": "OB_EV2828",
               "name": "Forest Green Vs Liverpool",
               "status": "A",
               "startDateTime": "2016-01-29T20:00:00",
               "markets": [
               {
               "id": "OB_MA2559",
               "name": "Correct Score",
               "status": "A",
               "selections": [
               {
               "id": "OB_OU3863",
               "currentPriceNum": 14,
               "currentPriceDen": 1,
               "name": "Liverpool 2-1",
               "status": "A"
               }
               ]
               }
               ]
               }
               ]
              }
          schema:
            $ref: "#/definitions/eventsWrapper"
        "400":
          description: Incorrect or Missing Parameter
          examples:
            application/json: |
              {
               "errors" : [
               {
               "code":"10070",
               "message":"Missing Parameter",
               "field":"apiKey"
               }
               ]
              }
          schema:
            $ref: "#/definitions/errorsWrapper"
        "404":
          description: No data found for request
          examples:
            application/json: |
              {
               "errors" : [
               {
               "code":"10003",
               "message":"Resource Not Found"
               }
               ]
              }
          schema:
            $ref: "#/definitions/errorsWrapper"
      summary: Retrieves a list of events for the provided IDs.
      tags:
        - sportsdata
      x-canReturnErrors:
        - 0
  "/events/{eventId}":
    get:
      description: Retrieves a single event by ID.
      operationId: getEvent
      parameters:
        - $ref: "#/parameters/param_apiKey"
        - $ref: "#/parameters/param_eventId"
        - $ref: "#/parameters/param_includeAllDescendants"
        - $ref: "#/parameters/param_fields"
        - $ref: "#/parameters/param_include"
        - $ref: "#/parameters/param_exclude"
        - $ref: "#/parameters/param_headlinesummary"
        - $ref: "#/parameters/param_marketCount"
        - $ref: "#/parameters/param_marketIds"
        - $ref: "#/parameters/param_includeEmpty"
        - $ref: "#/parameters/param_culture"
        - $ref: "#/parameters/param_marketPublished"
        - $ref: "#/parameters/param_marketStatus"
        - $ref: "#/parameters/param_marketDisplayed"
        - $ref: "#/parameters/param_marketChannel"
        - $ref: "#/parameters/param_marketSort"
        - $ref: "#/parameters/param_marketEW"
        - $ref: "#/parameters/param_selectionStatus"
        - $ref: "#/parameters/param_selectionChannel"
        - $ref: "#/parameters/param_selectionPublished"
      responses:
        "200":
          description: Success
          examples:
            application/json: |
              {
               "events": [
               {
               "id": "OB_EV2828",
               "name": "Forest Green Vs Liverpool",
               "status": "A",
               "startDateTime": "2016-01-29T20:00:00",
               "markets": [
               {
               "id": "OB_MA2559",
               "name": "Correct Score",
               "status": "A",
               "selections": [
               {
               "id": "OB_OU3863",
               "currentPriceNum": 14,
               "currentPriceDen": 1,
               "name": "Liverpool 2-1",
               "status": "A"
               }
               ]
               }
               ]
               }
               ]
              }
          schema:
            $ref: "#/definitions/eventsWrapper"
        "400":
          description: Incorrect or Missing Parameter
          examples:
            application/json: |
              {
               "errors" : [
               {
               "code":"10070",
               "message":"Missing Parameter",
               "field":"apiKey"
               }
               ]
              }
          schema:
            $ref: "#/definitions/errorsWrapper"
        "404":
          description: No data found for request
          examples:
            application/json: |
              {
               "errors" : [
               {
               "code":"10003",
               "message":"Resource Not Found"
               }
               ]
              }
          schema:
            $ref: "#/definitions/errorsWrapper"
      summary: Retrieves a single event by ID.
      tags:
        - sportsdata
      x-canReturnErrors:
        - 0
  "/events/{eventId}/competitors":
    get:
      description: Retrieves competitors for a single event by ID.
      operationId: getEventCompetitors
      parameters:
        - $ref: "#/parameters/param_apiKey"
        - $ref: "#/parameters/param_eventId"
        - $ref: "#/parameters/param_fields"
        - $ref: "#/parameters/param_include"
        - $ref: "#/parameters/param_exclude"
      responses:
        "200":
          description: Success
          examples:
            application/json: |
              {
               "competitors": 
               [
               {
               "id": "1",
               "name": "Springer Dinger",
               "age": "3",
               "drawNumber": "4",
               "jockeyName": "Atzeni, A",
               "weightPounds": "134",
               "silkImageUrl": "http://whdn.williamhill.com/content/sportsbook/silks/55336.gif",
               "trainerName": "Varian, R",
               "ownerName": "Sheikh Mohammed Obaid Al Maktoum"
               "colour": "grey",
               "sex": "Male",
               "formGuide": "4-2711",
               "rating": "27",
               "overview":
               {
               "runner":"Good pedigree; took him five times to click but won his Lingfield novice nicely in the end and duly confirmed himself progressive by following up at Newmarket, again over 7f (good ground); pace was true there so form looks okay and rates a danger to all off 6lb higher."
               "sire":"top-class 2yo over 6-7f inc Phoenix S. Lagardere; sire of Group winners; good record with fillies",
               }
               ]
              }
          schema:
            $ref: "#/definitions/eventCompetitorsWrapper"
        "400":
          description: Incorrect or Missing Parameter
          examples:
            application/json: |
              {
               "errors" : [
               {
               "code":"10070",
               "message":"Missing Parameter",
               "field":"apiKey"
               }
               ]
              }
          schema:
            $ref: "#/definitions/errorsWrapper"
        "404":
          description: No data found for request
          examples:
            application/json: |
              {
               "errors" : [
               {
               "code":"10003",
               "message":"Resource Not Found"
               }
               ]
              }
          schema:
            $ref: "#/definitions/errorsWrapper"
      summary: Retrieves competitors for a single event by ID.
      tags:
        - competitors
      x-canReturnErrors:
        - 0
  "/events/{eventId}/markets/":
    get:
      description: Retrieves one or more specific markets. Markets with Live at the end are always In-Play markets. However, not ALL In-Play markets have Live at the end of the market name.
      operationId: getMarkets
      parameters:
        - $ref: "#/parameters/param_apiKey"
        - $ref: "#/parameters/param_eventId"
        - $ref: "#/parameters/param_ids"
        - $ref: "#/parameters/param_includeAllDescendants"
        - $ref: "#/parameters/param_fields"
        - $ref: "#/parameters/param_include"
        - $ref: "#/parameters/param_exclude"
        - $ref: "#/parameters/param_includeEmpty"
        - $ref: "#/parameters/param_culture"
        - $ref: "#/parameters/param_marketPublished"
        - $ref: "#/parameters/param_marketStatus"
        - $ref: "#/parameters/param_marketDisplayed"
        - $ref: "#/parameters/param_marketChannel"
        - $ref: "#/parameters/param_marketSort"
        - $ref: "#/parameters/param_marketEW"
        - $ref: "#/parameters/param_selectionStatus"
        - $ref: "#/parameters/param_selectionChannel"
        - $ref: "#/parameters/param_selectionPublished"
      responses:
        "200":
          description: Success
          examples:
            application/json: |
              {
               "markets": [
               {
               "id": "OB_MA2493",
               "name": "90 Minutes",
               "status": "A"
               },
               {
               "id": "OB_MA2559",
               "name": "Correct Score",
               "status": "A"
               }
               ]
              }
          schema:
            $ref: "#/definitions/marketsWrapper"
        "400":
          description: Incorrect or Missing Parameter
          examples:
            application/json: |
              {
               "errors" : [
               {
               "code":"10070",
               "message":"Missing Parameter",
               "field":"apiKey"
               }
               ]
              }
          schema:
            $ref: "#/definitions/errorsWrapper"
        "404":
          description: No data found for request
          examples:
            application/json: |
              {
               "errors" : [
               {
               "code":"10003",
               "message":"Resource Not Found"
               }
               ]
              }
          schema:
            $ref: "#/definitions/errorsWrapper"
      summary: Gets one or more specific markets
      tags:
        - sportsdata
      x-canReturnErrors:
        - 0
  "/events/{eventId}/markets/{marketId}/selections/":
    get:
      description: Retrieves one or more selections for a market
      operationId: getSelections
      parameters:
        - $ref: "#/parameters/param_apiKey"
        - $ref: "#/parameters/param_eventId"
        - $ref: "#/parameters/param_marketId"
        - $ref: "#/parameters/param_ids"
        - $ref: "#/parameters/param_fields"
        - $ref: "#/parameters/param_include"
        - $ref: "#/parameters/param_exclude"
        - $ref: "#/parameters/param_culture"
        - $ref: "#/parameters/param_selectionStatus"
        - $ref: "#/parameters/param_selectionChannel"
        - $ref: "#/parameters/param_selectionPublished"
      responses:
        "200":
          description: Success
          examples:
            application/json: |
              {
               "selections": [
               {
               "id": "OB_OU3863",
               "currentPriceNum": 14,
               "currentPriceDen": 1,
               "name": "Liverpool 2-1",
               "status": "A"
               },
               {
               "id": "OB_OU3846",
               "currentPriceNum": 11,
               "currentPriceDen": 2,
               "name": "Forest Green 1-0",
               "status": "A"
               }
              }
          schema:
            $ref: "#/definitions/selectionsWrapper"
        "400":
          description: Incorrect or Missing Parameter
          examples:
            application/json: |
              {
               "errors" : [
               {
               "code":"10070",
               "message":"Missing Parameter",
               "field":"apiKey"
               }
               ]
              }
          schema:
            $ref: "#/definitions/errorsWrapper"
        "404":
          description: No data found for request
          examples:
            application/json: |
              {
               "errors" : [
               {
               "code":"10003",
               "message":"Resource Not Found"
               }
               ]
              }
          schema:
            $ref: "#/definitions/errorsWrapper"
      summary: Gets one or more selections for a market
      tags:
        - sportsdata
      x-canReturnErrors:
        - 0
  /sports/:
    get:
      description: Gets a list of all sports
      operationId: getSports
      parameters:
        - $ref: "#/parameters/param_apiKey"
        - $ref: "#/parameters/param_sort"
        - $ref: "#/parameters/param_offset"
        - $ref: "#/parameters/param_active"
        - $ref: "#/parameters/param_limit"
        - $ref: "#/parameters/param_fields"
        - $ref: "#/parameters/param_include"
        - $ref: "#/parameters/param_exclude"
        - $ref: "#/parameters/param_culture"
      responses:
        "200":
          description: Success
          examples:
            application/json: |
              {
               "sports": [
               {
               "id": "OB_SP43",
               "name": "Horse Racing"
               },
               {
               "id": "OB_SP9",
               "name": "Football"
               }
               ]
              }
          schema:
            $ref: "#/definitions/sportsWrapper"
        "400":
          description: Incorrect or Missing Parameter
          examples:
            application/json: |
              {
               "errors" : [
               {
               "code":"000000",
               "message":"Error Message Text",
               "field":"aparam"
               }
               ]
              }
          schema:
            $ref: "#/definitions/errorsWrapper"
        "404":
          description: No data found for request
          examples:
            application/json: |
              {
               "errors" : [
               {
               "code":"10003",
               "message":"Resource Not Found"
               }
               ]
              }
          schema:
            $ref: "#/definitions/errorsWrapper"
      summary: Gets a list of all sports
      tags:
        - sportsdata
      x-canReturnErrors:
        - 0
  "/sports/{sportId}/classes/":
    get:
      description: Retrieves a list of classes for a given sport id.
      operationId: getClassesForSport
      parameters:
        - $ref: "#/parameters/param_apiKey"
        - $ref: "#/parameters/param_sportId"
        - $ref: "#/parameters/param_active"
        - $ref: "#/parameters/param_fields"
        - $ref: "#/parameters/param_include"
        - $ref: "#/parameters/param_exclude"
        - $ref: "#/parameters/param_displayed"
        - $ref: "#/parameters/param_channel"
        - $ref: "#/parameters/param_status"
        - $ref: "#/parameters/param_sort"
        - $ref: "#/parameters/param_offset"
        - $ref: "#/parameters/param_limit"
        - $ref: "#/parameters/param_culture"
      responses:
        "200":
          description: Success
          examples:
            application/json: |
              {
               "classes": [
               {
               "id": "OB_CL1",
               "name": "UK Football",
               "status": "A"
               }
               ]
              }
          schema:
            $ref: "#/definitions/classesWrapper"
        "400":
          description: Incorrect or Missing Parameter
          examples:
            application/json: |
              {
               "errors" : [
               {
               "code":"10070",
               "message":"Missing Parameter",
               "field":"apiKey"
               }
               ]
              }
          schema:
            $ref: "#/definitions/errorsWrapper"
        "404":
          description: No data found for request
          examples:
            application/json: |
              {
               "errors" : [
               {
               "code":"10003",
               "message":"Resource Not Found"
               }
               ]
              }
          schema:
            $ref: "#/definitions/errorsWrapper"
      summary: Retrieves a list of classes for a given sport id.
      tags:
        - sportsdata
      x-canReturnErrors:
        - 0
  "/sports/{sportId}/competitions/":
    get:
      description: Retrieves a list of competitions for a given sport id.
      operationId: getCompetitionsForSport
      parameters:
        - $ref: "#/parameters/param_apiKey"
        - $ref: "#/parameters/param_sportId"
        - $ref: "#/parameters/param_active"
        - $ref: "#/parameters/param_fields"
        - $ref: "#/parameters/param_include"
        - $ref: "#/parameters/param_exclude"
        - $ref: "#/parameters/param_displayed"
        - $ref: "#/parameters/param_channel"
        - $ref: "#/parameters/param_status"
        - $ref: "#/parameters/param_sort"
        - $ref: "#/parameters/param_offset"
        - $ref: "#/parameters/param_limit"
        - $ref: "#/parameters/param_culture"
      responses:
        "200":
          description: Success
          examples:
            application/json: |
              {
               "competitions": [
               {
               "id": "OB_TY1733",
               "name": "Manchester Senior Cup",
               "status": "A"
               }
               ]
              }
          schema:
            $ref: "#/definitions/competitionsWrapper"
        "400":
          description: Incorrect or Missing Parameter
          examples:
            application/json: |
              {
               "errors" : [
               {
               "code":"10070",
               "message":"Missing Parameter",
               "field":"apiKey"
               }
               ]
              }
          schema:
            $ref: "#/definitions/errorsWrapper"
        "404":
          description: No data found for request
          examples:
            application/json: |
              {
               "errors" : [
               {
               "code":"10003",
               "message":"Resource Not Found"
               }
               ]
              }
          schema:
            $ref: "#/definitions/errorsWrapper"
      summary: Retrieves a list of competitions for a given sport id.
      tags:
        - sportsdata
      x-canReturnErrors:
        - 0
  /topbets/:
    get:
      description: Retrieves a weighted list of Selections.
      operationId: getTopBets
      parameters:
        - $ref: "#/parameters/param_apiKey"
        - $ref: "#/parameters/param_sportIds"
        - $ref: "#/parameters/param_competitionIds"
        - $ref: "#/parameters/param_limit"
        - $ref: "#/parameters/param_fields"
        - $ref: "#/parameters/param_include"
        - $ref: "#/parameters/param_exclude"
        - $ref: "#/parameters/param_topBetEventId"
        - $ref: "#/parameters/param_sortName"
        - $ref: "#/parameters/param_culture"
        - $ref: "#/parameters/param_locale"
      responses:
        "200":
          description: Success
          examples:
            application/json: |
              {
               bets:
               {
               weight: "",
               sports:
               {
               isPublished:true,
               id: "",
               name: ""
               },
               competitions:
               {
               isPublished: true,
               parentIds: ["",""],
               betInRunningDelay:9
               description:"The description of the competition"
               cashinAvailable:true,
               channels:["",""],
               displayed:true,
               flags:["",""],
               id:"",
               name:"",
               order: 1,
               status:"A"
               },
               events:
               {
               isPublished: true,
               parentIds:["",""],
               bettingStatus:"",
               betInRunningDelay:5,
               description:"The description of the event",
               cashinAvailable: true,
               channels:["",""],
               country: "",
               displayed: true, 
               flags: ["",""], 
               hasInPlayMarkets:true,
               hasLivePrices:true,
               id: "",
               isInPlay:true,
               marketCountActiveInPlay:2, 
               marketCountActivePreMatch: 3,
               marketCountActiveTotal:9,
               marketCountInPlay:6,
               marketCountPreMatch:2,
               name:"6:10 Windsor",
               order:4, 
               raceNum:"", 
               settled: true,
               eventSort:"",
               startDateTime:"",
               status:"A",
               markets:
               [ 
               {
               isPublished:true,
               parentIds:["",""],
               antepostMarket:true,
               betInRunningDelay:4,
               description:"Additional market information",
               channels:"",
               displayed:true,
               eachWay: true,
               eachWayFactorDen:5, 
               eachWayFactorNum:1,
               eachWayPlaces:3,
               earlyPriceAvailable:true,
               firstFourAvailable:true,
               firstPriceAvailable:true,
               flags:"",
               bestOddsGuaranteed:true,
               isInPlayMarket: true,
               hcapMakeup:5,
               hcapValue: 5,
               id:"OB_MA1",
               livePriceAvailable:true,
               marketGroupCollectionId:"",
               marketGroupId:"",
               marketGroupName:"",
               name:"",
               order:"5",
               quinellaAvailable:true,
               settled:true,
               marketSort:"",
               startingPriceAvailable:true,
               status:"A",
               selections:
               [
               {
               parentIds:["",""],
               isPublished:true,
               description:"",
               cashinPriceNum:5,
               cashinPriceDen:4,
               channels:["",""],
               csAway:5,
               csHome:5,
               currentPriceNum:5,
               currentPriceDen:5,
               displayed:true,
               resultType:"",
               id:"",
               name:"",
               order:5,
               result:"",
               runnerNum:5,
               settled:true,
               status:"A",
               oddsDecimal:1.1,
               resultType:"",
               priceFormatted:
               {
               fractional:"EVS",
               decimal:2,
               american:"+100"
               } 
               }
               ]
               }
               ],
               markets:
               {
               isPublished:true,
               parentIds:["",""],
               antepostMarket:true,
               betInRunningDelay:4,
               description:"Additional market information",
               channels:"",
               displayed:true,
               eachWay: true,
               eachWayFactorDen:5, 
               eachWayFactorNum:1,
               eachWayPlaces:3,
               earlyPriceAvailable:true,
               firstFourAvailable:true,
               firstPriceAvailable:true,
               flags:"",
               bestOddsGuaranteed:true,
               isInPlayMarket: true,
               hcapMakeup:5,
               hcapValue: 5,
               id:"OB_MA1",
               livePriceAvailable:true,
               marketGroupCollectionId:"",
               marketGroupId:"",
               marketGroupName:"",
               name:"",
               order:"5",
               quinellaAvailable:true,
               settled:true,
               marketSort:"",
               startingPriceAvailable:true,
               status:"A",
               selections:
               [
               {
               parentIds:["",""],
               isPublished:true,
               description:"",
               cashinPriceNum:5,
               cashinPriceDen:4,
               channels:["",""],
               csAway:5,
               csHome:5,
               currentPriceNum:5,
               currentPriceDen:5,
               displayed:true,
               resultType:"",
               id:"",
               name:"",
               order:5,
               result:"",
               runnerNum:5,
               settled:true,
               status:"A",
               oddsDecimal:1.1,
               priceFormatted:
               {
               fractional:"EVS",
               decimal:2,
               american:"+100"
               } 
               }
               ]
               },
               selections:
               {
               parentIds:["",""],
               isPublished:true,
               description:"",
               cashinPriceNum:5,
               cashinPriceDen:4,
               channels:["",""],
               csAway:5,
               csHome:5,
               currentPriceNum:5,
               currentPriceDen:5,
               displayed:true,
               resultType:"",
               id:"",
               name:"",
               order:5,
               result:"",
               runnerNum:5,
               settled:true,
               status:"A",
               oddsDecimal:1.1,
               resultType:"",
               priceFormatted:
               {
               fractional:"EVS",
               decimal:2,
               american:"+100"
               } 
               }
               }
              }
          schema:
            $ref: "#/definitions/topBetsWrapper"
        "500":
          description: "Server Error: Something went wrong"
          examples:
            application/json: |
              {
               "errors" : 
               [
               {
               "code":"10000",
               "message":"Server Error", 
               }
               ]
              }
          schema:
            $ref: "#/definitions/errorsWrapper"
      summary: Retrieves a weighted list of Selections.
      tags:
        - sportsdata
      x-canReturnErrors:
        - 0
definitions:
  class:
    properties:
      id:
        description: The Id of the Class
        type: string
      isPublished:
        description: Indicates if the item is published
        type: boolean
      name:
        description: The description of the Class
        type: string
      status:
        description: Indicates if the class is (A)ctive or (S)uspended
        type: string
    required:
      - id
      - name
  classesWrapper:
    properties:
      classes:
        items:
          $ref: "#/definitions/class"
        type: array
    type: object
  competition:
    properties:
      betInRunningDelay:
        description: Delay in seconds between bet being sent and bet being placed
        format: integer
        type: number
      cashinAvailable:
        description: Indicates whether cashin is available on the events of this competition
        type: boolean
      channels:
        description: A list of channels that apply to this competition
        items:
          type: string
        type: array
      description:
        description: The description of the competition
        type: string
      displayed:
        description: Whether the competition should be displayed or not
        type: boolean
      flags:
        description: A list of flags that apply to this competition
        items:
          type: string
        type: array
      id:
        description: The Id of the Competition
        type: string
      isPublished:
        description: Indicates if the item is published or not
        type: boolean
      name:
        description: The name of the competition
        type: string
      order:
        description: The display order of the competition
        format: integer
        type: integer
      parentIds:
        description: A list of IDs of parent entities
        items:
          type: string
        type: array
      status:
        description: The status of the competition (A for Active, S for Suspended)
        type: string
    required:
      - id
      - name
      - status
  competitionsWrapper:
    properties:
      competitions:
        items:
          $ref: "#/definitions/competition"
        type: array
    type: object
  competitor:
    properties:
      age:
        description: The age of the horse
        type: number
        x-eg: "3"
      colour:
        description: The colour of the horse (There are 5 colours. b = Bay. bl = Black. br = Brown. ch = Chestnut. gr = Grey)
        type: string
        x-eg: bl
      drawNumber:
        description: The stall number that the horse is allocated and will start from
        type: number
        x-eg: "4"
      formGuide:
        description: "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."
        type: string
        x-eg: 4-2711
      id:
        description: Unique identifier of the competitor in the event
        type: number
        x-eg: "1"
      jockeyName:
        description: The name of the Jockey who's riding the horse
        type: string
        x-eg: Atzeni, A
      name:
        description: The name of competitor that the information is being given for
        type: string
        x-eg: Springer Dinger
      overview:
        description: Additional information about the horse's performance
        type: string
        x-eg: Good pedigree; took him five times to click but won his Lingfield novice nicely in the end and duly confirmed himself progressive by following up at Newmarket, again over 7f (good ground); pace was true there so form looks okay and rates a danger to all off 6lb higher.
      ownerName:
        description: The name of the horses owner(s)
        type: string
        x-eg: Sheikh Mohammed Obaid Al Maktoum
      rating:
        description: 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)
        type: string
        x-eg: "98"
      sex:
        description: The sex of the horse (F|M)
        type: string
        x-eg: M
      silkImageUrl:
        description: The URL for the image that represents the 'silk' (Coathing pattern) worn by the jockey.
        type: string
        x-eg: http://whdn.williamhill.com/content/sportsbook/silks/55336.gif
      trainerName:
        description: The name of the horses trainer
        type: string
        x-eg: Varian, R
      weightPounds:
        description: The rider weight (in pounds)
        type: string
        x-eg: "134"
    required:
      - id
      - silkImageUrl
  error:
    properties:
      code:
        description: The William Hill API Error Code
        type: string
      field:
        description: Optional field to point to the field with an error
        type: string
      message:
        description: A String describing the error
        type: string
  errorsWrapper:
    properties:
      errors:
        items:
          $ref: "#/definitions/error"
        type: array
    type: object
  event:
    properties:
      betInRunningDelay:
        description: Delay in seconds between bet being sent and bet being placed
        format: integer
        type: number
      bettingStatus:
        description: Betting status of the event
        type: string
      cashinAvailable:
        description: Whether cashin is available on this event
        type: boolean
      channels:
        description: A list of channels that apply to this event
        items:
          type: string
        type: array
      country:
        description: A string indicating the country code of this event if available
        type: string
      description:
        description: The description of the event
        type: string
      displayed:
        description: whether the event should be displayed or not
        type: boolean
      eventSort:
        description: What type of event is this? (e.g. MTCH, TRNMT)
        type: string
      flags:
        description: A list of flags that apply to this event
        items:
          type: string
        type: array
      hasInPlayMarkets:
        description: Whether this event has inplay markets
        type: boolean
      hasLivePrices:
        description: Whether this event has Live Prices
        type: boolean
      id:
        description: The Id of the event
        type: string
      isInPlay:
        description: Whether this event has started and therefore is inplay
        type: boolean
      isPublished:
        description: Indicates if the item is published
        type: boolean
      marketCountActiveInPlay:
        description: Count of active markets in play
        format: integer
        type: number
      marketCountActivePreMatch:
        description: count of active market pre-match
        format: integer
        type: number
      marketCountActiveTotal:
        description: Total market count
        format: integer
        type: number
      marketCountInPlay:
        description: Total inplay markets
        format: integer
        type: number
      marketCountPreMatch:
        description: Total prematch markets
        format: integer
        type: number
      markets:
        description: A list of markets belonging to this event
        items:
          $ref: "#/definitions/market"
        type: array
      name:
        description: The name of the event
        type: string
      order:
        description: Display order of the event
        format: integer
        type: number
      parentIds:
        description: A list of IDs of parent entities
        items:
          type: string
        type: array
      raceNum:
        description: Race number for race events
        type: string
      settled:
        description: Whether the event has been settled
        type: boolean
      startDateTime:
        description: The start date and time of the event
        type: string
      status:
        description: Status of the event (A for Active, S for Suspended)
        type: string
    required:
      - id
      - name
      - startDateTime
      - status
  eventCompetitorsWrapper:
    properties:
      competitors:
        items:
          $ref: "#/definitions/competitor"
        type: array
    type: object
  eventsWrapper:
    properties:
      events:
        items:
          $ref: "#/definitions/event"
        type: array
    type: object
  market:
    properties:
      antepostMarket:
        description: Antepost Market
        type: boolean
      bestOddsGuaranteed:
        description: BOG Available
        type: boolean
      betInRunningDelay:
        format: integer
        type: number
      channels:
        description: A channel indicates where an entry can be accessed. Its made up of a string containing a number of characters
        type: string
      description:
        description: Additional market information
        type: string
      displayed:
        description: Indicates if the item should be displayed
        type: boolean
      eachWay:
        description: Indicates if each way betting is available
        type: boolean
      eachWayFactorDen:
        description: |-
          Where each way terms are stored with the bet, this holds the denominator for the each way
          factor. For example, if the each way terms are: 5 places pay ¼, this value will be 4
        format: integer
        type: number
      eachWayFactorNum:
        description: |-
          Where each way terms are stored with the bet, this holds the numerator for the each way
          factor. For example, if the each way terms are: 5 places pay ¼, this value will be 1
        format: integer
        type: number
      eachWayPlaces:
        description: |-
          Where each way terms are stored with the bet, this holds the number of places paid. For
          example, if the each way terms are: 5 places pay ¼, this value will be 5
        format: integer
        type: number
      earlyPriceAvailable:
        description: Early Pricing Active
        type: boolean
      fcAvailable:
        description: Is tricast betting available
        type: boolean
      firstFourAvailable:
        description: Is firstFour betting available
        type: boolean
      firstPriceAvailable:
        description: Is firstPrice betting available
        type: boolean
      flags:
        description: Flags for the market
        type: string
      hcapMakeup:
        description: Handicap score
        format: integer
        type: number
      hcapValue:
        description: This value indicates the current handicap set on the Event Market, assuming it has a handicap type.
        format: integer
        type: number
      id:
        description: ID (e.g. OB_MA{id} (e.g. OB_MA1), OB_SP (Sport), OB_CL (Class), OB_TY (Competition / type), OB_EV (event) OB_MA (Market), OB_OU (Selection / outcome)
        type: string
      isInPlayMarket:
        description: Is this an in-play market
        type: boolean
      isPublished:
        description: Indicates if the item is published
        type: boolean
      livePriceAvailable:
        description: Live Price
        type: boolean
      marketGroupCollectionId:
        description: The collectionId of the Market Group inherited from
        type: string
      marketGroupId:
        description: The group id the market was inherited from
        type: string
      marketGroupName:
        description: The group name the market was inherited from
        type: string
      marketSort:
        description: The sort defines the market template
        type: string
      name:
        description: Human-friendly name of the market
        type: string
      order:
        description: Display order of the items (Ascending)
        format: integer
        type: number
      parentIds:
        description: A list of IDs of parent entities
        items:
          type: string
        type: array
      quinellaAvailable:
        description: Is firstFour betting available
        type: boolean
      selections:
        description: A list of selections belonging to the market
        items:
          $ref: "#/definitions/selection"
        type: array
      settled:
        description: Whether the market is settled or not
        type: boolean
      startingPriceAvailable:
        description: Starting Price Available
        type: boolean
      status:
        description: Indicates the status of the Market (A = Active/S = Suspended)
        type: string
      tcAvailable:
        description: Is forecast betting available
        type: boolean
    required:
      - id
      - name
      - status
  marketGroupsWrapper:
    properties:
      marketGroups:
        items:
          $ref: "#/definitions/marketgroup"
        type: array
    type: object
  marketgroup:
    properties:
      collectionId:
        description: The collectionId of the Market Group, If it has one
        type: string
      competitionId:
        description: The CompetitionId of the Market Group
        type: string
      id:
        description: The Id of the Market Group
        type: string
      marketSort:
        description: The market sort of this group
        type: string
      name:
        description: The Name of the Market Group
        type: string
    required:
      - id
      - name
  marketsWrapper:
    properties:
      markets:
        items:
          $ref: "#/definitions/market"
        type: array
    type: object
  priceFormatted:
    properties:
      american:
        description: The price in American format
        type: string
      decimal:
        description: The decimal format of the price
        format: double
        type: number
      fractional:
        description: The fractional format of the price or EVS when the price evens.
        type: string
    type: object
  selection:
    properties:
      cashinPriceDen:
        description: The cashin price denominator
        format: integer
        type: number
      cashinPriceNum:
        description: The cashin price numerator
        format: integer
        type: number
      channels:
        description: A list of channels that applies to this selection
        items:
          type: string
        type: array
      csAway:
        description: The away score in a correct score event
        format: integer
        type: number
      csHome:
        description: The home score in a correct score event
        format: integer
        type: number
      currentPriceDen:
        description: Denominator of the price
        format: integer
        type: number
      currentPriceNum:
        description: Numerator of the price
        format: integer
        type: number
      description:
        description: The description of the selection
        type: string
      displayed:
        description: Wether this selection should be displayed or not
        type: boolean
      id:
        description: The Id of the selection
        type: string
      isPublished:
        description: Indicates if the item is published
        type: boolean
      name:
        description: The name of the selection
        type: string
      oddsDecimal:
        description: The selection price, in decimal format
        format: decimal
        type: number
      oddsFractional:
        description: The selection price, in fractional format
        format: fraction
        type: number
      order:
        description: The display order of the selection
        format: integer
        type: number
      parentIds:
        description: A list of IDs of parent entities
        items:
          type: string
        type: array
      priceFormatted:
        $ref: "#/definitions/priceFormatted"
      result:
        description: The result of this selection
        type: string
      resultType:
        description: football Result
        type: string
      runnerNum:
        description: The runner number in race events
        format: integer
        type: number
      settled:
        description: Wether this selection has been settled or not
        type: boolean
      status:
        description: The status of the selection (A for Active or S for Suspended)
        type: string
    required:
      - oddsDecimal
      - oddsFractional
      - id
      - name
      - status
  selectionsWrapper:
    properties:
      selections:
        items:
          $ref: "#/definitions/selection"
        type: array
    type: object
  sport:
    properties:
      id:
        description: The Id of the Sport
        type: string
      isPublished:
        description: Indicates if the item is published
        type: boolean
      name:
        description: The description of the Sport
        type: string
    required:
      - id
      - name
  sportsWrapper:
    properties:
      sports:
        items:
          $ref: "#/definitions/sport"
        type: array
    type: object
  topBet:
    properties:
      competition:
        $ref: "#/definitions/competition"
      event:
        $ref: "#/definitions/event"
      market:
        $ref: "#/definitions/market"
      selection:
        $ref: "#/definitions/selection"
      sport:
        $ref: "#/definitions/sport"
      weight:
        description: The weighting of the bet in the Top bets ranking
        type: string
  topBetsWrapper:
    properties:
      bets:
        items:
          $ref: "#/definitions/topBet"
        type: array
    type: object
x-customerrors:
  - code: 20101
    message: Cannot have includeAllDescendants active without the headlineSummary parameter. Too much data to be returned.
    status: 400
  - code: 20102
    message: headlineSummary parameter must be accompanied with 'date' filter or one of 'dateFrom' and 'dateTo' filters.
    status: 400
x-docchapters:
  - fieldSelection
  - apiSummary
  - headAndOptions
  - docsAndSdks
  - errorHandling
  - statusCodes
