Skip to main content
GET
Get Transit Service Delivery

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.

Query Parameters

location
string
required

Transit network location, e.g. milan: one of the locations configured for this transit analysis in your company.

Minimum string length: 1
start_date
string<date>
required

First service day, ISO 8601 date, e.g. 2026-10-01.

end_date
string<date>
required

Last service day, included (ISO 8601 date, e.g. 2026-10-31). Not before start_date; at most 31 days in all.

lines
string[]

Line names to keep, case-insensitive, e.g. lines=1&lines=12; a name covers every route that carries it. Combined with route_ids as a union. Empty = all lines.

Maximum array length: 40
route_ids
string[]

Exact GTFS route_ids to keep, e.g. route_ids=R90. Combined with lines as a union. Empty = all lines.

Maximum array length: 40
direction
integer | null

GTFS direction_id to keep (0 or 1). Omit for both.

Required range: 0 <= x <= 1
hour_from
integer
default:0

First hour of the day to include (0-23, local time of the network), by scheduled time.

Required range: 0 <= x <= 23
hour_to
integer
default:23

Last hour of the day to include (0-23, local time), not before hour_from.

Required range: 0 <= x <= 23
day_type
enum<string>
default:all

Days to keep: all, weekday (Monday to Friday), saturday or sunday.

Available options:
all,
weekday,
saturday,
sunday

Response

Service delivery computed. Summary, breakdowns, coverage.

Scheduled vs operated trips.

Service days with zero realtime observations for the whole feed scope (no vehicle position trip and no trip-update event for that service date) are excluded from every scheduled-trip denominator and aggregate; they are listed in coverage.days_without_data and flagged by the days_without_realtime_data_excluded caveat.

On partial realtime days (coverage.partial_days, caveat partial_realtime_days) every scheduled trip starting before the first or after the last realtime observation of that day (trip updates or vehicle positions) is excluded from every denominator, observed or not, so a feed outage is neither reported as missed service nor inflates operated %. Trips without stop times (no known start) stay on partial days only when observed. Gaps inside the observed window (flagged by the low trip share rule) cannot be told apart from missed trips and still count as missing.

A scheduled trip that was not operated is cancelled when its trip update says CANCELED, otherwise it is counted in missing_trips: not observed (no realtime data), not necessarily cancelled. Only some feeds send cancellations; for the others cancelled_trips is 0.

summary
ServiceDeliverySummary · object
required
by_line
DeliveryLine · object[]
required
by_day
DeliveryDay · object[]
required
active_fleet_by_hour
FleetHour · object[]
required
missing_trips
MissingTrip · object[]
required
coverage
Coverage · object
required

Requested days vs days with realtime data.

partial_days are days with data whose realtime feed covers only part of the timetable (see _partial_days); they are also days with data. The trip-share part of that rule is relative to the requested range: it compares each day with the median day of the same request, so a range made only of equally thin days is not flagged by it.

definition
Definition · object
required
caveats
string[]
required
missing_trips_by_hour
MissingTripsHour · object[]
missing_trips_by_time_band
Missing Trips By Time Band · object
missing_trips_by_line_and_band
MissingTripsLine · object[]