Train order
The train order endpoint returns the sequence in which trains are expected at each platform of a station.
Endpoint
Section titled “Endpoint”GET /v1/train-orders/{station_id}The {station_id} parameter accepts a station CRS code.
Response shape
Section titled “Response shape”The response groups trains by platform. Each platform lists up to three upcoming trains in order:
{ "station": "KGX", "platforms": [ { "platform": "1", "trains": [ { "position": 1, "rid": "202605141A45", "train_id": "1A45", "public_departure": "10:03", "working_departure": "10:02:30" }, { "position": 2, "rid": "202605141B50", ... } ] } ]}Filtering by platform
Section titled “Filtering by platform”Use the platform query parameter to return only a single platform:
GET /v1/train-orders/KGX?platform=1Train order vs departure boards
Section titled “Train order vs departure boards”Station boards and train order answer different questions:
| Departure board | Train order | |
|---|---|---|
| Scope | All platforms | Per-platform |
| Ordering | By scheduled time | By expected platform sequence |
| Depth | Configurable (up to 100) | Up to 3 trains per platform |
| Filters | TOC, destination, calling point | Platform only |
Use departure boards for passenger-facing “what’s leaving next?” views. Use train order when display position at a specific platform matters — for example, platform indicator screens or operational displays.
When train order is unavailable
Section titled “When train order is unavailable”Not all stations have train order data. If no train order exists for a station, the endpoint returns a 404 with error code HEADCODE.TRAIN_ORDERS.NOT_FOUND. Design your application to fall back to the departure board filtered by platform when train order is not available.