Skip to content

Stations ​

Returns the station catalogue. Without query parameters it returns departure stations; with departure set, it returns the arrival stations reachable from that departure station.

Endpoint ​

Method: GET

URL: /v1/stations

Request Headers ​

ParameterTypeRequiredDescription
AuthorizationStringYesBearer <token> from Login

Query Parameters ​

ParameterTypeRequiredDescription
departureStringNoDeparture station code; when present, returns the reachable arrival stations
countryStringNoISO country code filter
localeStringNoLanguage, refer to Locale List
limitIntegerNoMaximum number of stations to return in one page (1–5000, default 1000)
page_idStringNoOpaque keyset cursor from a prior response's next_page_id; omit on the first page

Pagination ​

The station catalogue may be very large, so results are paged with an opaque keyset cursor:

  1. Make the first request with no page_id (optionally setting limit).
  2. The response carries a next_page_id. Repeat the request with that value as page_id to fetch the next page.
  3. Keep going until next_page_id is null (or absent), which marks the last page.

WARNING

The page_id is opaque — pass it back verbatim and do not parse it. The departure, country, and locale filters must stay identical across all pages of one iteration.

Response Parameters ​

ParameterTypeRequiredDescription
└ stations[Object]YesList of stations
  └ codeStringYesStation code
  └ country_idStringNoCountry identifier
  └ katotthStringNoCodifier of administrative-territorial units (KATOTTH)
  └ koatuuStringNoClassifier of administrative-territorial units (KOATUU)
  └ namesLocalizedTextNoLocalized station names
  └ name_variantsLocalizedTextNoLocalized name variants
  └ statesLocalizedTextNoLocalized region/state names
  └ addressesLocalizedTextNoLocalized addresses
  └ latitudeNumberNoGeographic latitude
  └ longitudeNumberNoGeographic longitude
  └ time_zoneStringNoIANA timezone (e.g. Europe/Kyiv)
└ next_page_idStringNoCursor for the next page; null or absent when this is the last page

LocalizedText is a map of language code → text, e.g. { "en": "Kyiv", "uk": "Київ" }.

Response Example ​

json
{
  "stations": [
    {
      "code": "2200001",
      "country_id": "UA",
      "katotth": "UA80000000000093317",
      "koatuu": "8000000000",
      "names": { "en": "Kyiv", "uk": "Київ" },
      "name_variants": { "en": "Kiev" },
      "states": { "en": "Kyiv City", "uk": "м. Київ" },
      "addresses": { "en": "Central Bus Station", "uk": "Центральний автовокзал" },
      "latitude": 50.4501,
      "longitude": 30.5234,
      "time_zone": "Europe/Kyiv"
    }
  ],
  "next_page_id": "eyJsYXN0IjoiMjIwMDAwMSJ9"
}

Error Code List ​

codemessageDescription
UNAUTHORIZEDInvalid tokenThe bearer token is missing, invalid, or expired (401).

TTN Octo API documentation