Important: To cancel or suspend multiple related trips, such as “Cancel all the services for a day,” refer to Cancel trips with alerts.
To cancel a trip in realtime, select a trip with the TripDescriptor. After the trip is selected, it can be canceled with either a ServiceAlerts or TripUpdates message.
Cancel with a service alert
service_alert message with a TripDescriptor that matches the affected trip and effect
NO_SERVICE. If TripDescriptor is provided in an Alert
schedule_relationship field is ignored. ServiceAlerts messages with effect value different from
NO_SERVICE are only annotated with the alert information.
Trips canceled through service alerts are displayed in the disrupted services section of the results UI.
The recommended way to cancel a non-frequency based trip through an alert is to provide a descriptor that specifies both a
start_date. To avoid ambiguity, it’s strongly discouraged to provide a
trip_id without a
start_date. If you only provide the
trip_id, the trip field may only resolve a single trip, which may be different from what you expected.
Service alert examples
Cancel with a trip update
trip_update with TripDescriptor that matches the affected trip, and provide the
CANCELED. The trip is then removed from search results. After the trip is removed, any updates for the trip must show that it’s canceled so that the search results remain accurate. Learn How data gaps affect realtime feeds.
Configure ServiceAlerts & TripUpdates
You can’t cancel a trip with the
vehicle_position feed because a canceled trip can’t send vehicle position data for the vehicle on that trip. If you use the VehiclePosition feed to provide vehicle updates, then the ServiceAlerts or TripUpdate feed can be configured to provide only the cancellations. If you plan to use the TripUpdates feed to only provide cancellations, then reach out to the support team to set up a TripUpdates feed.