Skip to content

By the court (QR)

Picture a little QR sticker on the net post. A spectator scans it and instantly sees the score for that court — without anyone knowing the match id ahead of time. Here’s how that works.

flowchart LR S([📷 Scan QR<br/>on the net post]) --> G[GET /live/courts/:courtId] G --> D{Match on<br/>this court?} D -->|yes| R([Show score +<br/>subscribe for live updates]) D -->|no| E([“Nothing playing<br/>on this court”]) classDef ok fill:#16a34a,stroke:#16a34a,color:#fff; class R ok;
The QR points at a court; one call resolves whatever match is on it.

The QR encodes a court id. Resolve the current match with a single public request:

GET https://api.myscore.live/api/v1/live/courts/crt_centre

(That court id is an example — use a real one and you’ll get its current match, or an empty result if the court is idle.) The shape matches /live/matches, so you can reuse the same rendering code.

  1. Spectator scans the QR → opens your page with the court id.
  2. Your page calls GET /live/courts/{courtId}.
  3. Got a match? Render it, then subscribe over WebSocket for live updates.
  4. No match? Show a friendly “nothing playing here right now.”