Station Lookup by Code

stationByCode(stationCode: string)

Description

Resolve a station code to its name and coordinates.

Parameters

NameInTypeRequiredDescription
stationCodePATHstringYESStation code such as NDLS or HWH

Code Example

javascript
const result = await fetch("/api/station/NDLS").then((res) => res.json());

if (result.success) {
  console.log(result.data.code, result.data.name);
}

Response Example

JSON response
200JSON