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;
One call does it
Section titled “One call does 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.
The full flow
Section titled “The full flow”- Spectator scans the QR → opens your page with the court id.
- Your page calls
GET /live/courts/{courtId}. - Got a match? Render it, then subscribe over WebSocket for live updates.
- No match? Show a friendly “nothing playing here right now.”