Skip to content

Stability

What the Betwatch Racing API promises during the beta, what can change, and how breaking changes are announced.

You are building software on top of this API. That software should not break without warning.

During the beta

The API is in beta. While it is, we fix design mistakes in place under /v2 rather than keep them forever: a field can be removed or renamed. Every such change bumps the contract’s minor version and is listed under Breaking in the changelog, with what to do instead, and we tell API customers before it ships. The Python SDK ships a matching release.

Everything else on this page holds during the beta too.

What will not change

Inside /v2, apart from changes listed under Breaking in the changelog, we will not:

  • remove a field, or change its type
  • move a field to a different place in the response
  • rename an endpoint, a query parameter, or a value in an enum you already receive
  • change the meaning of an existing error code
  • change a source id, an operation id, or the shape of an identifier prefix

What can change

The contract grows. Any of these can happen without notice, so your client should tolerate them:

  • New fields in existing responses.
  • New endpoints, new query parameters, new include values.
  • New enum values: a new event status, a new source kind, a new error code, a new stream frame.
  • New sources as we onboard bookmakers, totes, and exchanges.
  • Wording: title and detail on a problem document are prose and get clearer over time. code is what you branch on.

Two rules make all of that safe on your side:

  1. Ignore fields you do not recognise. Most JSON parsers do this already; some strict typed ones need to be told.
  2. Never exhaustively match an enum without a fallback. Treat an unknown value as its category — an unfamiliar status is “some other status”, an unfamiliar code is “an error of this HTTP class” — rather than throwing.

Identifiers are opaque

An id tells you its kind through its prefix (evt_, ent_, cmp_, ven_, mtg_, odd_). Everything after that is ours.

Do not parse, split, validate the length or character set of, or construct an id. Store it as a string of unbounded length and pass back exactly what we sent. Odds ids currently contain a .; that is an implementation detail of how they are derived and is not a promise about their shape.

The one guarantee: an id is stable for the thing it names, and passing it back always refers to the same thing.

When two records turn out to be one

Occasionally we discover that two records describe the same thing — the same horse under two spellings, the same race ingested twice — and merge them. When that happens:

  • Stored ids resolve. evt_, ent_, cmp_, ven_, and mtg_ ids for the merged-away record keep working and return the surviving one, with 200. You never receive a redirect; we follow it for you.
  • Derived odds ids do not. odd_ ids are derived from the race that owned them, so the surviving race has different ones and the old id returns 404. That is not data loss — re-read the event and take the new ids.

A live stream following a merged race, venue, or competitor receives a resync frame and should bootstrap again; see Resuming. Trainer, rider, and owner merges arrive as ordinary entrant frames instead. Treat a 404 on an id you were previously given as a signal to re-read rather than as an error.

After the beta

Once the API leaves beta, /v2 only grows. A breaking change would ship at a new path prefix — /v3 — alongside /v2, and /v2 would keep running, so you move when it suits you. We will never silently change a response under an unchanged path.

Versions

The contract carries its own version, currently 2.5.0, in the OpenAPI document’s info.version. It changes when the public contract changes, independently of platform deployments. During the beta a minor version can carry breaking changes; the changelog says which. Every version is listed in the changelog.

The OpenAPI document

The document is at /openapi.json on the API host. Servers is the API origin plus /v2; operation paths are /events and siblings — browse it through the interactive reference. Endpoints you may see referenced elsewhere and cannot find in it are internal to our own web app: unversioned, undocumented, and liable to change without warning. Please do not build on them — they are not an API, they are our furniture, and we rearrange it.

Getting help

Quote the requestId and traceId from a problem document and we can find your exact request. If something in this API is awkward to consume, tell us: the cost of fixing it now is far lower than the cost of you working around it forever.

Navigation

Type to search…

↑↓ navigate↵ selectEsc close