Skip to main content
GET
Get Live Transit Line

Authorizations

Authorization
string
header
required

An API key, sent as Authorization: Bearer <key>. Create one in the SWITCH Copilot under Settings → API keys (needs the API keys permission in your company), or with POST /auth/api-keys. The key is shown once, at creation.

Path Parameters

route_id
string
required

GTFS route_id of the line, as in vehicles[].route_id of the live transit status, e.g. R90.

Required string length: 1 - 64

Query Parameters

location
string
required

Transit network location, e.g. milan: one of the locations configured for your company's live transit.

Minimum string length: 1

Response

Line retrieved. Directions with stops and shapes.

route_id
string
required
route_short_name
string | null
required
route_long_name
string | null
required
route_color
string | null
required
directions
TransitLineDirection · object[]
required