SmartGare
API referenceEndpoints

What the station already knows of a route's legs

For the stations of a route being entered, in calling order, answers each leg's km and minutes on the most recently saved current route that calls at the two stations one after the other, and names that route; a leg no such route knows has no figure. It only suggests: nothing is saved. **Required permission:** `referential.itinerary:read`

GET/referential/v1/itineraries/known-legs

For the stations of a route being entered, in calling order, answers each leg's km and minutes on the most recently saved current route that calls at the two stations one after the other, and names that route; a leg no such route knows has no figure. It only suggests: nothing is saved.

Required permission: referential.itinerary:read

AuthorizationBearer <token>

In: header

Query Parameters

station_ids*array<>

The stations in calling order, at least two and at most fifty.

Items2 <= items <= 50

Response Body

*/*

*/*

*/*

curl -X GET "https://example.com/referential/v1/itineraries/known-legs?station_ids=string&station_ids=string"
{  "legs": [    {      "distance_meters": 0,      "from_station_id": "string",      "source": {        "itinerary_code": "string",        "itinerary_id": "string",        "line_code": "string",        "line_id": "string",        "saved_at": "2019-08-24T14:15:22Z",        "version": 0      },      "time_minutes": 0,      "to_station_id": "string"    }  ]}