NAV
shell go

Introduction

Welcome to the Ladbrokes Affiliate API!

The base URL is https://api.ladbrokes.com.au/affiliates/v1and further documentation may refer to this as BASE_URL.

Dates & times are returned in UTC using ISO 8601 unless otherwise specified.

Identification

Please include identifying Headers with all of your requests:

# With shell, you can just pass the correct header with each request
curl "api_endpoint_here" \
  -H "From: joe@blogs.com.au" \
  -H "X-Partner: Joe Blogs Pty Ltd"
package main

import (
    "fmt"
    "io/ioutil"
    "net/http"
    "time"
)

func main() {
    // Always use a http client with a timeout
    client := &http.Client{
        Timeout: time.Second * 30,
    }

    // Set an appropriate API endpoint URL
    req, err := http.NewRequest("GET", "api_endpoint_here", nil)
    if err != nil {
        panic(err)
    }

    // Remember to set your identifying values to avoid being blocked
    req.Header.Add("From", "joe@blogs.com.au")
    req.Header.Add("X-Partner", "Joe Blogs Pty Ltd")

    resp, err := client.Do(req)
    if err != nil {
        panic(err)
    }
    defer resp.Body.Close()

    body, err := ioutil.ReadAll(resp.Body)
    if err != nil {
        panic(err)
    }

    fmt.Println(string(body))
}

Make sure to provide values that identify you otherwise you may end up being rate limited, or blocked.

To avoid being blocked or inappropriately rate limited, please include Headers to identify who you are and provide a way to contact you if needed:

From: joe@blogs.com.au

X-Partner: Joe Blogs Pty Ltd

ID Fields

All ID fields that are UUIDs make use of the Version 4 format and conform to RFC 4122.

Response Formats

By default, responses are sent in JSON format. You may also request data formatted as XML or HTML.

You can use the enc GET parameter to control the encoding format.

JSON Format

The default for data payloads.

?enc=json

XML Format

Not all endpoints support XML.

?enc=xml

HTML Format

Useful mainly for debugging/navigating.

?enc=html

Help Format

Returns a short description of the available parameters for the requested endpoint.

?enc=help

Request Parameter Formats

Date Fields

Common parameter names:

Dates accept strings in the format YYYY-MM-DD as well as several keywords:

Keyword Description
now The current date and time
today The current day
week The start of the current week (where Monday is the start of the week)
month The start of the current month
all All available dates

Date ranges can be considered inclusive.

Parameters with Choices

Example response from a ?enc=help request.

Param: category        Default:    Choices: T,H,G, 

Param: category        Default:    Choices: T,H,G, 

The value of ?category=VALUE must be one of T, H, or G for the request to be valid.

If a parameter has a Choices set (as displayed in the ?enc=help response for that endpoint), then the input data must be one of the values shown.

Racing APIs

Available endpoints:

Racing Meetings

curl "https://api-affiliates.ladbrokes.com.au/affiliates/v1/racing/meetings" \
  -H "From: joe@blogs.com.au" \
  -H "X-Partner: Joe Blogs Pty Ltd"
package main

import (
    "encoding/json"
    "fmt"
    "net/http"
    "time"
)

type Response struct {
    Header     ResponseHeader `json:"header" xml:"header"`
    Parameters RequestParams  `json:"params" xml:"params"`
    Data       Data           `json:"data" xml:"data"`
}

type ResponseHeader struct {
    Title         string    `json:"title" xml:"title"`
    GeneratedTime time.Time `json:"generated_time" xml:"generated_time"`
    URL           string    `json:"url" xml:"url"`
    Error         string    `json:"error,omitempty" xml:"error,omitempty"`
}

type RequestParams struct {
    Encoding string    `json:"enc" xml:"Encoding"`
    ID       string    `json:"id" xml:"MeetingID"`
    DateFrom time.Time `json:"date_from" xml:"FromDate"`
    DateTo   time.Time `json:"date_to" xml:"ToDate"`
    Category string    `json:"type" xml:"Category"`
    Country  string    `json:"country" xml:"Country"`
    Limit    int       `json:"limit" xml:"Limit"`
    Offset   int       `json:"offset" xml:"Offset"`
}

type Data struct {
    Meetings []*Meeting `json:"meetings" xml:"meetings"`
}

type Meeting struct {
    Meeting      string    `json:"meeting" xml:"meeting"`
    Name         string    `json:"name" xml:"name"`
    Date         time.Time `json:"date" xml:"date"`
    Category     string    `json:"category" xml:"category"`
    CategoryName string    `json:"category_name" xml:"category_name"`
    Country      string    `json:"country" xml:"country"`
    State        string    `json:"state" xml:"state"`
    Races        []*Race   `json:"races" xml:"races"`
}

type Race struct {
    ID             string    `json:"id" xml:"id"`
    RaceNumber     uint32    `json:"race_number" xml:"race_number"`
    Name           string    `json:"name" xml:"name"`
    StartTime      time.Time `json:"start_time" xml:"start_time"`
    TrackCondition string    `json:"track_condition" xml:"track_condition"`
    Distance       uint32    `json:"distance" xml:"distance"`
    Weather        string    `json:"weather" xml:"weather"`
    Country        string    `json:"country" xml:"country"`
    State          string    `json:"state" xml:"state"`
}

func main() {
    // Always use a http client with a timeout
    client := &http.Client{
        Timeout: time.Second * 30,
    }

    req, err := http.NewRequest("GET", "https://api-affiliates.ladbrokes.com.au/affiliates/v1/racing/meetings", nil)
    if err != nil {
        panic(err)
    }

    // Remember to set your identifying values to avoid being blocked
    req.Header.Add("From", "joe@blogs.com.au")
    req.Header.Add("X-Partner", "Joe Blogs Pty Ltd")

    r, err := client.Do(req)
    if err != nil {
        panic(err)
    }
    defer r.Body.Close()

    var response Response
    err = json.NewDecoder(r.Body).Decode(&response)
    if err != nil {
        panic(err)
    }

    fmt.Printf("%s Retrieved %d meetings.", response.Header.GeneratedTime, len(response.Data.Meetings))
}

Example JSON response:

{
  "header": {
    "title": "Race Meetings",
    "generated_time": "2020-12-10T08:19:47.069943716Z",
    "url": "/affiliates/v1/racing/meetings"
  },
  "params": {
    "enc": "json",
    "id": "",
    "date_from": "2020-12-10T08:19:47.06993608Z",
    "date_to": "2020-12-10T08:19:47.069938012Z",
    "type": " ",
    "country": " ",
    "limit": 100,
    "offset": 0
  },
  "data": {
    "meetings": [
      {
        "meeting": "7e09a407-d61e-407b-94b3-fe5d293cbfde",
        "name": "Queanbeyan",
        "date": "2020-12-10T00:00:00Z",
        "category": "T",
        "category_name": "Thoroughbred Horse Racing",
        "country": "AUS",
        "state": "NSW",
        "races": [
          {
            "id": "2b936876-7524-40f5-be6a-3b1d8cc844af",
            "race_number": 0,
            "name": "Jockey Challenge - Queanbeyan",
            "start_time": "2020-12-10T02:15:00Z",
            "track_condition": "",
            "distance": 0,
            "weather": "",
            "country": "",
            "state": ""
          },
          {
            "id": "7ab0527f-0746-415b-82cd-968e14629aaa",
            "race_number": 1,
            "name": "Skyview Windows Mdn Plate",
            "start_time": "2020-12-10T02:15:00Z",
            "track_condition": "",
            "distance": 0,
            "weather": "",
            "country": "",
            "state": ""
          }
        ]
      }
    ]
  }
}

This endpoint retrieves all meetings.

HTTP Request

GET https://api-affiliates.ladbrokes.com.au/affiliates/v1/racing/meetings

Meeting Request Parameters

Parameter Default Choices Description
enc json json,xml,html,help The response encoding format.
id If provided, get the requested meeting by its ID.
date_from week See date formats.
date_to now See date formats.
category T,H,G Allows limiting the response to one of Thoroughbred, Harness or Greyhound meetings.
country AUS,ARG,CA,CHI,DEU,FR,... Allows limiting the response to only the requested country. See the help encoding for a full list.
limit 100 Limit the number of items included in the response. Max of 200.
offset 0 Skip the first offset responses.

Response Schema

MeetingsResponse

Get a Specific Meeting

curl "https://api-affiliates.ladbrokes.com.au/affiliates/v1/racing/meetings/1f2d507d-e4b7-4d14-8463-17842301684b" \
  -H "From: joe@blogs.com.au" \
  -H "X-Partner: Joe Blogs Pty Ltd"
package main

import (
    "encoding/json"
    "fmt"
    "net/http"
    "time"
)

type Response struct {
    Header     ResponseHeader `json:"header" xml:"header"`
    Parameters RequestParams  `json:"params" xml:"params"`
    Data       Data           `json:"data" xml:"data"`
}

type ResponseHeader struct {
    Title         string    `json:"title" xml:"title"`
    GeneratedTime time.Time `json:"generated_time" xml:"generated_time"`
    URL           string    `json:"url" xml:"url"`
    Error         string    `json:"error,omitempty" xml:"error,omitempty"`
}

type RequestParams struct {
    Encoding string    `json:"enc" xml:"Encoding"`
    ID       string    `json:"id" xml:"MeetingID"`
    DateFrom time.Time `json:"date_from" xml:"FromDate"`
    DateTo   time.Time `json:"date_to" xml:"ToDate"`
    Category string    `json:"type" xml:"Category"`
    Country  string    `json:"country" xml:"Country"`
    Limit    int       `json:"limit" xml:"Limit"`
    Offset   int       `json:"offset" xml:"Offset"`
}

type Data struct {
    Meetings []*Meeting `json:"meetings" xml:"meetings"`
}

type Meeting struct {
    Meeting      string    `json:"meeting" xml:"meeting"`
    Name         string    `json:"name" xml:"name"`
    Date         time.Time `json:"date" xml:"date"`
    Category     string    `json:"category" xml:"category"`
    CategoryName string    `json:"category_name" xml:"category_name"`
    Country      string    `json:"country" xml:"country"`
    State        string    `json:"state" xml:"state"`
    Races        []*Race   `json:"races" xml:"races"`
}

type Race struct {
    ID             string    `json:"id" xml:"id"`
    RaceNumber     uint32    `json:"race_number" xml:"race_number"`
    Name           string    `json:"name" xml:"name"`
    StartTime      time.Time `json:"start_time" xml:"start_time"`
    TrackCondition string    `json:"track_condition" xml:"track_condition"`
    Distance       uint32    `json:"distance" xml:"distance"`
    Weather        string    `json:"weather" xml:"weather"`
    Country        string    `json:"country" xml:"country"`
    State          string    `json:"state" xml:"state"`
}

func main() {
    // Always use a http client with a timeout
    client := &http.Client{
        Timeout: time.Second * 30,
    }

    req, err := http.NewRequest("GET", "https://api-affiliates.ladbrokes.com.au/affiliates/v1/racing/meetings/1f2d507d-e4b7-4d14-8463-17842301684b", nil)
    if err != nil {
        panic(err)
    }

    // Remember to set your identifying values to avoid being blocked
    req.Header.Add("From", "joe@blogs.com.au")
    req.Header.Add("X-Partner", "Joe Blogs Pty Ltd")

    r, err := client.Do(req)
    if err != nil {
        panic(err)
    }
    defer r.Body.Close()

    var response Response
    err = json.NewDecoder(r.Body).Decode(&response)
    if err != nil {
        panic(err)
    }

    fmt.Printf("%s Retrieved %d meetings.", response.Header.GeneratedTime, len(response.Data.Meetings))
}

Example JSON response:

{
  "header": {
    "title": "Race Meetings",
    "generated_time": "2020-12-10T08:19:47.069943716Z",
    "url": "/affiliates/v1/racing/meetings"
  },
  "params": {
    "enc": "json",
    "id": "",
    "date_from": "2020-12-10T08:19:47.06993608Z",
    "date_to": "2020-12-10T08:19:47.069938012Z",
    "type": " ",
    "country": " ",
    "limit": 100,
    "offset": 0
  },
  "data": {
    "meetings": [
      {
        "meeting": "7e09a407-d61e-407b-94b3-fe5d293cbfde",
        "name": "Queanbeyan",
        "date": "2020-12-10T00:00:00Z",
        "category": "T",
        "category_name": "Thoroughbred Horse Racing",
        "country": "AUS",
        "state": "NSW",
        "races": [
          {
            "id": "2b936876-7524-40f5-be6a-3b1d8cc844af",
            "race_number": 0,
            "name": "Jockey Challenge - Queanbeyan",
            "start_time": "2020-12-10T02:15:00Z",
            "track_condition": "",
            "distance": 0,
            "weather": "",
            "country": "",
            "state": ""
          },
          {
            "id": "7ab0527f-0746-415b-82cd-968e14629aaa",
            "race_number": 1,
            "name": "Skyview Windows Mdn Plate",
            "start_time": "2020-12-10T02:15:00Z",
            "track_condition": "",
            "distance": 0,
            "weather": "",
            "country": "",
            "state": ""
          }
        ]
      }
    ]
  }
}

This endpoint retrieves a specific meeting.

HTTP Request

GET https://api-affiliates.ladbrokes.com.au/affiliates/v1/racing/meetings/<ID>

Meeting Request Parameters

Parameter Default Choices Description
enc json json,xml,html,help The response encoding format.
id The ID of the meeting to retrieve.

Response Schema

MeetingsResponse

Get a Specific Race

curl "https://api-affiliates.ladbrokes.com.au/affiliates/v1/racing/events/ad76bf91-684d-4a49-bf04-b4284237e65d" \
  -H "From: joe@blogs.com.au" \
  -H "X-Partner: Joe Blogs Pty Ltd"
package main

import (
    "encoding/json"
    "fmt"
    "net/http"
    "time"
)

type Response struct {
    Header     ResponseHeader `json:"header" xml:"header"`
    Parameters RequestParams  `json:"params" xml:"params"`
    Data       Data           `json:"data" xml:"data"`
}

type ResponseHeader struct {
    Title         string    `json:"title" xml:"title"`
    GeneratedTime time.Time `json:"generated_time" xml:"generated_time"`
    URL           string    `json:"url" xml:"url"`
    Error         string    `json:"error,omitempty" xml:"error,omitempty"`
}

type RequestParams struct {
    Encoding string    `json:"enc" xml:"Encoding"`
    ID       string    `json:"id" xml:"EventID"`
    DateFrom time.Time `json:"date_from" xml:"FromDate"`
    DateTo   time.Time `json:"date_to" xml:"ToDate"`
    Category string    `json:"type" xml:"Category"`
    Country  string    `json:"country" xml:"Country"`
    Limit    int       `json:"limit" xml:"Limit"`
    Offset   int       `json:"offset" xml:"Offset"`
}

type Data struct {
    Race        Race        `json:"race"`
    Results     []*Result   `json:"results,omitempty"`
    Dividends   []*Dividend `json:"dividends,omitempty"`
    Favourite   Entrant     `json:"favourite"`
    Runners     []*Runner   `json:"runners"`
    Derivatives []*Runner   `json:"derivatives"`
    Mover       Entrant     `json:"mover"`
    Error       string      `json:"error"`
}

type Race struct {
    EventID               string `json:"event_id"`
    MeetingName           string `json:"meeting_name"`
    MeetingID             string `json:"meeting_id"`
    Status                string `json:"status"`
    Description           string `json:"description"`
    AdvertisedStart       int64  `json:"advertised_start"`
    ActualStart           int64  `json:"actual_start"`
    AdvertisedStartString string `json:"advertised_start_string"`
    ActualStartString     string `json:"actual_start_string"`
    RaceNumber            uint32 `json:"race_number"`
    Type                  string `json:"type"`
    Country               string `json:"country"`
    State                 string `json:"state"`
    Distance              uint32 `json:"distance"`
    Weather               string `json:"weather"`
    FormGuide             string `json:"form_guide"`
    Comment               string `json:"comment"`
    SilkBaseURL           string `json:"silk_base_url"`
    TrackCondition        string `json:"track_condition"`
    SilkURL               string `json:"silk_url"`
}

type Result struct {
    Position     uint32  `json:"position"`
    Name         string  `json:"name"`
    Barrier      uint32  `json:"barrier"`
    RunnerNumber uint32  `json:"runner_number"`
    MarginLength float32 `json:"margin_length"`
}

type Dividend struct {
    ID          string      `json:"id"`
    Tote        string      `json:"tote"`
    ProductName string      `json:"product_name"`
    Status      string      `json:"status"`
    Dividend    float32     `json:"dividend"`
    PoolSize    float32     `json:"pool_size"`
    JackpotSize float32     `json:"jackpot_size"`
    Positions   []*Position `json:"positions"`
}

type Position struct {
    RunnerNumber uint32 `json:"runner_number"`
    Position     uint32 `json:"position"`
}

type Entrant struct {
    EntrantID     string `json:"-"`
    MarketName    string `json:"market_name"`
    PrimaryMarket bool   `json:"primary_market"`
    Name          string `json:"name"`
    IsScratched   bool   `json:"is_scratched"`
    ScratchTime   int64  `json:"scratch_time"`
    Barrier       uint32 `json:"barrier"`
    RunnerNumber  int    `json:"runner_number"`
    PrizeMoney    string `json:"prize_money"`
    Age           int    `json:"age"`
    Sex           string `json:"sex"`
    Colour        string `json:"colour"`
    SilkColours   string `json:"silk_colours"`
    FormComment   string `json:"form_comment"`
    ClassLevel    string `json:"class_level"`
    Jockey        string `json:"jockey"`
    Country       string `json:"country"`
    TrainerName   string `json:"trainer_name"`
    Weight        struct {
        Allocated string `json:"allocated"`
        Total     string `json:"total"`
    } `json:"weight"`
    Favourite bool `json:"favourite"`
    Mover     bool `json:"mover"`
}

type Runner struct {
    Entrant
    Meta               map[string]string `json:"meta" xml:"-"`
    Flucs              []float64         `json:"flucs" xml:"-"`
    Odds               Odds              `json:"odds"`
    ScrTime            *time.Time        `json:"scr_time"`
    CompetitorID       string            `json:"competitor_id"`
    RideGuideExists    bool              `json:"ride_guide_exists"`
    RideGuideThumbnail string            `json:"ride_guide_thumbnail"`
    RideGuideFile      string            `json:"ride_guide_file"`
    Trainer            string            `json:"trainer"`
}

type Odds struct {
    FixedWin   float64 `json:"fixed_win"`
    FixedPlace float64 `json:"fixed_place"`
}

func main() {
    // Always use a http client with a timeout
    client := &http.Client{
        Timeout: time.Second * 30,
    }

    req, err := http.NewRequest("GET", "https://api-affiliates.ladbrokes.com.au/affiliates/v1/racing/events/ad76bf91-684d-4a49-bf04-b4284237e65d", nil)
    if err != nil {
        panic(err)
    }

    // Remember to set your identifying values to avoid being blocked
    req.Header.Add("From", "joe@blogs.com.au")
    req.Header.Add("X-Partner", "Joe Blogs Pty Ltd")

    r, err := client.Do(req)
    if err != nil {
        panic(err)
    }
    defer r.Body.Close()

    var response Response
    err = json.NewDecoder(r.Body).Decode(&response)
    if err != nil {
        panic(err)
    }

    fmt.Printf("%s Retrieved %s", response.Header.GeneratedTime, response.Data.Race.Description)
}

Example JSON response:

{
  "header": {
    "title": "Event Details: ad76bf91-684d-4a49-bf04-b4284237e65d",
    "generated_time": "2020-12-10T08:44:53.024562314Z",
    "url": "/affiliates/v1/racing/events?id=ad76bf91-684d-4a49-bf04-b4284237e65d"
  },
  "params": {
    "enc": "json",
    "id": "ad76bf91-684d-4a49-bf04-b4284237e65d",
    "limit": 200,
    "offset": 0,
    "country": " ",
    "type": "T",
    "date_from": "0001-01-01T00:00:00Z",
    "date_to": "0001-01-01T00:00:00Z"
  },
  "data": {
    "race": {
      "event_id": "ad76bf91-684d-4a49-bf04-b4284237e65d",
      "meeting_name": "Palm Beach",
      "meeting_id": "1f2d507d-e4b7-4d14-8463-17842301684b",
      "status": "Final",
      "description": "Race 5",
      "advertised_start": 1566151560,
      "actual_start": 1566151560,
      "advertised_start_string": "2019-08-18 18:06:00 +0000 UTC",
      "actual_start_string": "2019-08-18 18:06:00 +0000 UTC",
      "race_number": 5,
      "type": "G",
      "country": "USA",
      "state": "FL",
      "distance": 0,
      "weather": "",
      "form_guide": "",
      "comment": "",
      "silk_base_url": "",
      "track_condition": ""
    },
    "results": [
      {
        "position": 1,
        "name": "Hot Dog Safari",
        "barrier": 4,
        "runner_number": 4,
        "margin_length": 0
      },
      {
        "position": 2,
        "name": "Megan Rapinoe",
        "barrier": 7,
        "runner_number": 7,
        "margin_length": 0
      },
      {
        "position": 3,
        "name": "Pj Smoke Out",
        "barrier": 3,
        "runner_number": 3,
        "margin_length": 0
      }
    ],
    "dividends": [
      {
        "id": "0fdd0e77-e219-4d01-8f21-dd17427f8af6",
        "tote": "UNKNOWN",
        "product_name": "Trifecta",
        "status": "Final",
        "dividend": 133.71,
        "pool_size": 0,
        "jackpot_size": 0,
        "positions": [
          {
            "runner_number": 4,
            "position": 1
          },
          {
            "runner_number": 7,
            "position": 2
          },
          {
            "runner_number": 3,
            "position": 3
          }
        ]
      },
      {
        "id": "25168e14-f1d6-4664-9ced-0233aa1df8d8",
        "tote": "UNKNOWN",
        "product_name": "Exacta",
        "status": "Final",
        "dividend": 30.5,
        "pool_size": 0,
        "jackpot_size": 0,
        "positions": [
          {
            "runner_number": 4,
            "position": 1
          },
          {
            "runner_number": 7,
            "position": 2
          }
        ]
      }
    ],
    "favourite": {
      "market_name": "Final Field",
      "primary_market": true,
      "name": "Atascocita Leadn",
      "is_scratched": false,
      "scratch_time": 0,
      "barrier": 6,
      "runner_number": 6,
      "prize_money": "",
      "age": 0,
      "sex": "",
      "colour": "",
      "silk_colours": "",
      "form_comment": "",
      "class_level": "",
      "jockey": "",
      "country": "",
      "trainer_name": "",
      "weight": {
        "allocated": "",
        "total": ""
      },
      "favourite": false,
      "mover": false
    },
    "runners": [
      {
        "market_name": "Final Field",
        "primary_market": true,
        "name": "Kissa",
        "is_scratched": false,
        "scratch_time": 0,
        "barrier": 1,
        "runner_number": 1,
        "prize_money": "",
        "age": 0,
        "sex": "",
        "colour": "",
        "silk_colours": "",
        "form_comment": "",
        "class_level": "",
        "jockey": "",
        "country": "",
        "trainer_name": "",
        "weight": {
          "allocated": "",
          "total": ""
        },
        "favourite": false,
        "mover": false,
        "meta": null,
        "flucs": [
          4.6,
          4.8
        ],
        "odds": {
          "fixed_win": 4.8,
          "fixed_place": 1.75
        },
        "scr_time": null,
        "competitor_id": "",
        "ride_guide_exists": false,
        "ride_guide_thumbnail": "",
        "ride_guide_file": "",
        "trainer": ""
      },
      {
        "market_name": "Final Field",
        "primary_market": true,
        "name": "Arkans Canberra",
        "is_scratched": false,
        "scratch_time": 0,
        "barrier": 2,
        "runner_number": 2,
        "prize_money": "",
        "age": 0,
        "sex": "",
        "colour": "",
        "silk_colours": "",
        "form_comment": "",
        "class_level": "",
        "jockey": "",
        "country": "",
        "trainer_name": "",
        "weight": {
          "allocated": "",
          "total": ""
        },
        "favourite": false,
        "mover": false,
        "meta": null,
        "flucs": [
          11,
          12
        ],
        "odds": {
          "fixed_win": 12,
          "fixed_place": 3.2
        },
        "scr_time": null,
        "competitor_id": "",
        "ride_guide_exists": false,
        "ride_guide_thumbnail": "",
        "ride_guide_file": "",
        "trainer": ""
      }
    ],
    "derivatives": null,
    "mover": {
      "market_name": "Final Field",
      "primary_market": true,
      "name": "Hot Dog Safari",
      "is_scratched": false,
      "scratch_time": 0,
      "barrier": 4,
      "runner_number": 4,
      "prize_money": "",
      "age": 0,
      "sex": "",
      "colour": "",
      "silk_colours": "",
      "form_comment": "",
      "class_level": "",
      "jockey": "",
      "country": "",
      "trainer_name": "",
      "weight": {
        "allocated": "",
        "total": ""
      },
      "favourite": false,
      "mover": false
    },
    "error": ""
  }
}

This endpoint retrieves a specific race.

HTTP Request

GET https://api-affiliates.ladbrokes.com.au/affiliates/v1/racing/events/{id}

Race Request Parameters

Parameter Default Choices Description
enc json json,xml,html,help The response encoding format.
id The ID of the race to retrieve.

Response Schema

RacesResponse

Sports API

Deep Links

Racing Bets

Available for: iOS and Android Mobile Application

Available from: Version 8.69.0

Currently we support adding bets within our platform from external sources via deep linking. URL format must follow the appropriate syntax to be recognised:

/racing/<meetingName>/<raceId>/<entrantId>/<dividendCode>

Where:

Parameter Type Description Example
meetingName string The name of the meeting (name). See Meeting. Geelong
raceId string UUIDv4 representing the race (event_id). See Race. d3c7c5f8-5e4a-40e6-a1e7-69d6d9fd722d
entrantId string UUIDv4 representing the entrant (entrant_id). See Entrant. 12dbd4e3-0f0d-45f8-b1b2-1b2bf8747554
dividendCode string Code representing the price. Derived from below list. fw

List of available dividendCodes:

Code Associated Product
bob Best of the Best
btsp Best Tote or Starting Price
btp Best Tote Place
fp Fixed Place
fw Fixed Win
mtsp Mid Tote or Starting Price
mtp Mid Tote Place
mtw Mid Tote Win
spg Starting Price Guarantee
tf Top Fluc
tp Tote Place
tw Tote Win

When constructed correctly, the URL used to access our platform should match a format similar to:

https://www.ladbrokes.com.au/racing/bunbury/d3c7c5f8-5e4a-40e6-a1e7-69d6d9fd722d/12dbd4e3-0f0d-45f8-b1b2-1b2bf8747554/fw

Routes will land a user within Betslip, with their bet added, and also route them to the associated racecard for the provided raceId following happy path. There are a variety of conditions that can invalidate a route, which we handle differently depending on condition:

Error Case Description Result
Existing Errored Bets User contains errored bets in Betslip. User routed to Home, no bet added, user notified via toast.
Existing Processing Bets User contains processing bets in Betslip. User routed to Home, no bet added, user notified via toast.
Network Error Unable to fetch data required. User routed to Home, no bet added, user notified via toast.
Race Not Found Race doesn't exist on platform. User routed to Home, no bet added, user notified via toast.
Meeting Not Found Meeting doesn't exist on platform. User routed to Home, no bet added, user notified via toast.
Price Unavailable Price is no longer available on race. User routed to Race, no bet added, user notified via toast.
Market Unavailable Market is no longer available on race. User routed to Race, no bet added, user notified via toast.
Race Unavailable Race is no longer available. User routed to Race, no bet added, user notified via toast.
Entrant Unavailable Entrant is no longer available on race. User routed to Race, no bet added, user notified via toast.
Market Controlled Market is controlled due to Punter Assist condition. User routed to Race, no bet added, user notified via toast, Market Control condition displayed.

Schemas

ResponseHeader

{
  "title": "",
  "generated_time": "",
  "url": ""
}
Name Type Description
title string The title of this response.
generated_time datetime The date and time this response was generated. In ISO 8601 format.
url string The relative URL representing this response.
error string (Optional) The details of any error that occurred while servicing the request.

MeetingsResponse

{
  "header": {...},
  "params": {...},
  "data": {...}
}
Name Type Description
header ResponseHeader Meta data describing the response.
params MeetingsRequestParams The parameters sent in this request.
data MeetingsData The meeting data.

MeetingsRequestParams

{
  "enc": "json",
  "id": "",
  "date_from": "",
  "date_to": "",
  "type": " ",
  "country": " ",
  "limit": 100,
  "offset": 0
}

See Meeting Request Parameters.

Name Type Description
enc string The encoding format for the response.
id string UUIDv4 of the meeting requested, if applicable.
date_from datetime The date and time to request meetings after. In ISO 8601 format.
date_to datetime The date and time to request meetings until. In ISO 8601 format.
category string Limit the response to the requested category, if applicable.
country string Limit the response to the requested country, if applicable.
limit int Limit the number of items in the response to the requested number.
offset int Offset the items by the requested number. Use in conjunction with limit to support pagination.

MeetingsData

{
  "meetings": [
    {...},
    {...}
  ]
}
Name Type Description
meetings []Meeting Array of Meetings.

Meeting

{
  "meeting": "",
  "name": "",
  "date": "YYYY-MM-DDT00:00:00Z",
  "category": "",
  "category_name": "",
  "country": "",
  "state": "",
  "races": [
    {...},
    {...}
  ]
}
Name Type Description
meeting string UUIDv4 id of the meeting.
name string The name of the meeting location.
date date The date that the meeting occurs on.
category string One of T, G, or H.
category_name string One of Thoroughbred Horse Racing, Greyhound Racing or Harness Horse Racing.
country string The country that the meeting occurs in, if available.
State string The state that the meeting occurs in within the country, if available.
Races []MeetingRace Array of Races.

MeetingRace

{
  "id": "",
  "race_number": 0,
  "name": "",
  "start_time": "",
  "track_condition": "",
  "distance": 0,
  "weather": "",
  "country": "",
  "state": ""
}
Name Type Description
id string UUIDv4 id of the race.
race_number int The race number within the meeting. 0 is used for special races.
name string The name of the race.
start_time datetime The scheduled start time of the race. In ISO 8601 format.
track_condition string The condition of the track, if available.
distance int The distance of the track, if available.
weather string The weather at the track, if available.
country string The country that the meeting occurs in, if available.
state string The state that the meeting occurs in within the country, if available.

RacesResponse

{
  "header": {...},
  "params": {...},
  "data": {...}
}
Name Type Description
header ResponseHeader Meta data describing the response.
params RacesRequestParams The parameters sent in this request.
data RacesData The races data.

RacesRequestParams

{
  "enc": "json",
  "id": ""
}

See Race Request Parameters.

Name Type Description
enc string The encoding format for the response.
id string UUIDv4 of the race requested.

RacesData

{
  "race": {...},
  "results": [
    {...},
    {...}
  ],
  "dividends": [
    {...},
    {...}
  ],
  "favourite": {...},
  "runners": [
    {...},
    {...}
  ],
  "derivatives": null,
  "mover": {...}
}
Name Type Description
race Race The race data.
results []RaceResult The race results, if available. Note: omitted if empty.
dividends []RaceDividend The race dividends, if available. Note: omitted if emtpy.
favourite RaceEntrant The favourite entrant in the race.
runners []RaceRunner The runners in the race.
derivatives []RaceRunner The derivative runners in the race.
mover RaceEntrant The market mover in the race.

Race

{
  "event_id": "97df766c-cdde-4aeb-b72a-95776d2e59b0",
  "meeting_name": "Orange",
  "meeting_id": "4cdf2c76-229d-4cb8-a930-e3a2fe173b62",
  "status": "Final",
  "description": "Epiroc Mdn Plate",
  "advertised_start": 1607915100,
  "actual_start": 1607915100,
  "advertised_start_string": "2020-12-14 03:05:00 +0000 UTC",
  "actual_start_string": "2020-12-14 03:05:00 +0000 UTC",
  "race_number": 1,
  "type": "T",
  "country": "AUS",
  "state": "NSW",
  "distance": 1400,
  "weather": "Overcast",
  "form_guide": "",
  "comment": "ZOUNATE (5) resumes from a spell. He's been an enigma with eight placings from eleven starts. He's been competitive at a much higher level. Two trials back have been solid and surely today is he day. DAWN FLIGHT (9) had his chance when fourth here on debut behind Grazie. She's sure to improve from the race experience and should be kept safe. HOT BAHAMA (2) is making his stable debut for James Ponsonby. Hard to get a gauge on his two runs in Queensland but he must be respected. Blinkers are on. TWICE ON SUNDAY (11) best of the rest.",
  "silk_base_url": "drr38safykj6s.cloudfront.net",
  "track_condition": "Good3",
  "silk_url": "drr38safykj6s.cloudfront.net/182561_1_SPRITE_64x64.png"
}
Name Type Description
event_id string UUIDv4 of the race.
meeting_name string The name of the meeting location.
meeting_id string UUIDv4 of the meeting this race belongs to.
status string The status of the race. One of: Open, Closed, Abandoned, Live, Interim, Final.
description string The name of the race.
advertised_start int The Unix Time that the race is scheduled to start.
actual_start int The Unix Time that the race actually started. Note that this will be the same as the advertised_start until the race has started.
advertised_start_string string A textual representation of the advertised_start in the YYYY-MM-DD HH:MM:SS +hh:mm TZD format.
actual_start_string string A textual representation of the actual_start in the YYYY-MM-DD HH:MM:SS +hh:mm TZD format.
race_number int The number of the race within the meeting. Note that 0 is used for special races within a meeting.
type string One of T (Thoroughbred), G (Greyhound) or H (Harness).
country string The country this race is in, if available.
state string The state within the country this race is in, if available.
distance int The distance of the race in metres, if available.
weather string The weather for this race, if available.
form_guide string A description of the form guide for this race, if available.
comment string The racing comment, if available.
silk_base_url string The base URL to use for generating silks, if available.
track_condition string The track condition for this race, if available.
silk_url string The image URL containing 64x64 silks ordered by the runner number, if available.

RaceResult

{
  "position": 2,
  "name": "Dawn Flight",
  "barrier": 5,
  "runner_number": 9,
  "margin_length": 0.37
}
Name Type Description
position int The position this entrant came in. Typically up to the first 4 positions are given, if available.
name string The name of the entrant in this position.
barrier int The barrier the entrant ran from.
runner_number int The number/saddle/box of the entrant in this position.
margin_length float How many lengths behind first place this position came, if available.

RaceDividend

{
  "id": "3c16a3c1-3b29-4962-aad5-942b41cfb812",
  "tote": "QLD",
  "product_name": "Exacta",
  "status": "Final",
  "dividend": 37,
  "pool_size": 1210.6,
  "jackpot_size": 0,
  "positions": [
    {
      "runner_number": 2,
      "position": 1
    },
    {
      "runner_number": 9,
      "position": 2
    }
  ]
}
Name Type Description
id string UUIDv4 of the dividend.
tote string Which tote this dividend belongs to (e.g. VIC, NSW, QLD, UNKNOWN).
product_name string Which product this dividend belongs to.
status string The status of this dividend. One of Interim or Final.
dividend float The value of this dividend.
pool_size float The size of the pool, if available.
jackpot_size float The size of the jackpot, if available.
positions []RacePosition The positions making up this dividend.

RacePosition

{
  "runner_number": 4,
  "position": 1
}
Name Type Description
runner_number int The number/saddle/box of the entrant in this position.
position int The position that this entrant came.

RaceEntrant

{
  "market_name": "Final Field",
  "primary_market": true,
  "name": "Halvoya",
  "is_scratched": true,
  "scratch_time": 1607904547,
  "barrier": 6,
  "runner_number": 3,
  "prize_money": "2380",
  "age": 3,
  "sex": "F",
  "colour": "ch",
  "silk_colours": "Red, White And Black Diagonal Stripes, White Cap",
  "form_comment": "",
  "class_level": "",
  "jockey": "Will Price",
  "country": "AUS",
  "trainer_name": "R \u0026 M Griffiths \u0026 De Kock",
  "weight": {
    "allocated": "56",
    "total": "56"
  },
  "favourite": false,
  "mover": false
}
Name Type Description
entrant_id string UUIDv4 of the entrant.
market_name string The name of the market this entrant belongs to. This will usually be Final Field for the primary market of the race.
primary_market boolean Whether this entrant is part of the primary market of the race.
name string The name of this entrant.
is_scratched boolean Whether this entrant has been scratched.
barrier int Which barrier/box this entrant runs from.
runner_number int The runner/saddle/box number of this entrant.
prize_money string The life time prize money this entrant has earned, if available.
age int The age of this entrant, if available.
sex string The sex of this entrant, if available.
colour string The colour of this entrant, if available.
silk_colours string The colours of the silk this entrant is wearing, if available.
form_comment string A comment describing this entrants form, if available.
class_level string The class level of this entrant, if available.
jockey string The jockey riding this entrant, if available.
country string The country of origin of this entrant, if available.
trainer_name string The trainer name of this entrant, if available.
weight RunnerWeight The weight of this entrant, if available.
favourite boolean Whether this entrant is the favourite.
mover boolean Whether this entrant is the market mover.

RunnerWeight

{
  "allocated": "56",
  "total": "56"
}
Name Type Description
allocated string The allocated weight of this runner, if available.
total string The total weight of this runner, if available.

RaceRunner

{
  "market_name": "Final Field",
  "primary_market": true,
  "name": "Halvoya",
  "is_scratched": true,
  "scratch_time": 1607904547,
  "barrier": 6,
  "runner_number": 3,
  "prize_money": "2380",
  "age": 3,
  "sex": "F",
  "colour": "ch",
  "silk_colours": "Red, White And Black Diagonal Stripes, White Cap",
  "form_comment": "",
  "class_level": "",
  "jockey": "Will Price",
  "country": "AUS",
  "trainer_name": "R \u0026 M Griffiths \u0026 De Kock",
  "weight": {
    "allocated": "56",
    "total": "56"
  },
  "favourite": false,
  "mover": false,
  "meta": null,
  "flucs": [
    9.5
  ],
  "odds": {
    "fixed_win": 9.5,
    "fixed_place": 2.25
  },
  "scr_time": "2020-12-14T00:09:07Z",
  "competitor_id": "",
  "ride_guide_exists": false,
  "ride_guide_thumbnail": "",
  "ride_guide_file": "",
  "trainer": ""
}

Note: A RaceRunner expands on the RaceEntrant fields, meaning that all fields in the RaceEntrant schema are part of the RaceRunner schema, along with the following fields.

Name Type Description
meta object A key-value (string-string) object of additional metadata relating to the runner, if available.
flucs []float An ordered array of Fixed Win price fluctuations this runner has had, if available.
odds Odds The current odds of this runner.
scr_time string The date and time the runner was scratched. In ISO 8601 format.
competitor_id string Unused.
ride_guide_exists bool Whether a ride guide exists.
ride_guide_thumbnail string The thumbnail URL for the ride guide, if available.
ride_guide_file string The URL to the ride guide, if available.
trainer string Unused. See trainer_name.

Odds

{
  "fixed_win": 9.5,
  "fixed_place": 2.25
}
Name Type Description
fixed_win float The fixed win price.
fixed_place float The fixed place price, if available.

Errors

The API uses the following error codes:

Error Code Meaning
400 Bad Request -- Your request is invalid.
404 Not Found -- The specified item could not be found.
429 Too Many Requests -- You're requesting data too fast! Make sure you have set your identification headers and contact us.
500 Internal Server Error -- We had a problem with our server. Try again later.
503 Service Unavailable -- We're temporarily offline for maintenance. Please try again later.