Skip to content

Cancelled Trip API (CAPI)

sheldonabrown edited this page Aug 19, 2022 · 1 revision

The Cancelled Trip API (CAPI) indicates a trip will not be served and should be suppressed from downstream systems. Not that a trip listed in CAPI may be removed at any time, indicating the trip has returned to service.

/api/cancelled-trips/list

Output:

[
    {
        "block": "MTABC_CPPC2-CP_C2-Weekday-03_6483589",
        "trip": "MTABC_33902842-CPPC2-CP_C2-Weekday-03",
        "status": "canceled",
        "timestamp": 1660931239000,
        "scheduledPullOut": "2022-08-19T13:31:00",
        "humanReadableTimestamp": "2022-08-19T13:47:19",
        "serviceDate": "2022-08-19",
        "route": "Q23",
        "runId": "427",
        "routeId": "MTABC_Q66",
        "firstStopId": "MTA_503845",
        "firstStopDepartureTime": "13:46:00",
     }
]

Elements:

Item Description
block GTFS block id this trip belongs to
trip GTFS trip id identifying cancelled trip
status the impacted status; currently only canceled is supported
timestamp the last update to this record
scheduledPullOut Depot Pull-out time
humanReadableTimestamp last update to this record in a friendly readable format
serviceDate date this trip is relative to
route Friendly route name
runId MTA run id
routeId GTFS route id
firstStopId GTFS stop id of the terminal departure
firstStopDepartureTime scheduled time of the terminal departure
Clone this wiki locally