SmartGare
API referenceEndpoints

Search departures

A line's, a carrier's, a day's or a window's departures, or an operational view of them (sellable, assignable, displayable), in stable pages, with the day the schedule is known complete through. Each departure names its carrier and its bay with how firmly it is known: confirmed, provisional, planned, none, or could not be read — the bay committed now for today and later, the one recorded for past days. **Required permission:** `traffic.departure:read`

GET/traffic/v1/departures

A line's, a carrier's, a day's or a window's departures, or an operational view of them (sellable, assignable, displayable), in stable pages, with the day the schedule is known complete through. Each departure names its carrier and its bay with how firmly it is known: confirmed, provisional, planned, none, or could not be read — the bay committed now for today and later, the one recorded for past days.

Required permission: traffic.departure:read

AuthorizationBearer <token>

In: header

Query Parameters

line_id?string
schedule_id?string
status?string
station_operational_date?string
Formatdate
from?string
Formatdate-time
to?string
Formatdate-time
page?integer

Zero-based page index, at most 10000.

Formatint32
Range0 <= value <= 10000
size?integer

Page size, at most 200.

Formatint32
Range0 <= value <= 200
view?string

An operational view: SELLABLE, ASSIGNABLE or DISPLAYABLE — the departures still scheduled, not closed and not withdrawn. Any narrower window is the owning module's.

carrier_id?string

A carrier: the departures it runs — those whose timetable names an authorization it holds that day, and those one of its coaches is committed to.

Response Body

*/*

curl -X GET "https://example.com/traffic/v1/departures"
{  "complete_through": "2019-08-24",  "data": [    {      "bay": {        "basis": "CURRENT",        "bay_code": "string",        "bay_id": "string",        "standing": "CONFIRMED"      },      "carrier": {        "id": "string",        "name": "string"      },      "closed_at": "2019-08-24T14:15:22Z",      "created_at": "2019-08-24T14:15:22Z",      "delay_minutes": 0,      "departure_at": "2019-08-24T14:15:22Z",      "generation_source": "SCHEDULE",      "id": "string",      "itinerary_id": "string",      "line_id": "string",      "planned_departure_at": "2019-08-24T14:15:22Z",      "planned_station_call_local_datetime": "2019-08-24T14:15:22Z",      "schedule_id": "string",      "station_call_local_datetime": "2019-08-24T14:15:22Z",      "station_operational_date": "2019-08-24",      "status": "SCHEDULED",      "timetable_service_date": "2019-08-24",      "updated_at": "2019-08-24T14:15:22Z"    }  ],  "page": 0,  "size": 0,  "total": 0}