GET stops/{stopId}/predictions
Retrieve vehicle predictions for a particular stop.
Request Information
URI Parameters
Name | Description | Type | Additional information |
---|---|---|---|
stopId |
The stop whose predictions should be retrieved. |
integer |
Required |
Body Parameters
None.
Response Information
Resource Description
Collection of PredictionName | Description | Type | Additional information |
---|---|---|---|
StopId | integer |
None. |
|
TripId | integer |
None. |
|
VehicleId | integer |
None. |
|
RouteName | string |
None. |
|
PredictedDelayInSeconds |
The estimated number of seconds delayed from the scheduled time. |
integer |
None. |
PredictedDeparture |
The estimated arrival time for the stop. The accuracy of this prediction is closely tied to the PredictionDateTime. The closer PredictionDateTime is to the current time, the more accurate this will be. NOTE: Our current AVL system rounds predictions to the nearest minute. This means that a vehicle may be expected to arrive 30 seconds after it actually arrives (think of a person walking to the bus stop as the bus is leaving.) Please keep this in mind when using our predictions. |
date |
None. |
PredictionDateTime |
The timestamp which the vehicle reported its deviation. Prediction accuracy will diminish as this value gets further in the past. |
date |
None. |
Response Formats
application/json, text/json
[ { "StopId": 1, "TripId": 2, "VehicleId": 3, "RouteName": "sample string 4", "PredictedDelayInSeconds": 5, "PredictedDeparture": "2023-12-06T23:11:27.8208831-08:00", "PredictionDateTime": "2023-12-06T23:11:27.8208831-08:00" }, { "StopId": 1, "TripId": 2, "VehicleId": 3, "RouteName": "sample string 4", "PredictedDelayInSeconds": 5, "PredictedDeparture": "2023-12-06T23:11:27.8208831-08:00", "PredictionDateTime": "2023-12-06T23:11:27.8208831-08:00" } ]
text/html
[{"StopId":1,"TripId":2,"VehicleId":3,"RouteName":"sample string 4","PredictedDelayInSeconds":5,"PredictedDeparture":"2023-12-06T23:11:27.8208831-08:00","PredictionDateTime":"2023-12-06T23:11:27.8208831-08:00"},{"StopId":1,"TripId":2,"VehicleId":3,"RouteName":"sample string 4","PredictedDelayInSeconds":5,"PredictedDeparture":"2023-12-06T23:11:27.8208831-08:00","PredictionDateTime":"2023-12-06T23:11:27.8208831-08:00"}]
application/xml, text/xml
<ArrayOfPrediction xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ACTransit.Transit.Domain.Models"> <Prediction> <PredictedDelayInSeconds>5</PredictedDelayInSeconds> <PredictedDeparture>2023-12-06T23:11:27.8208831-08:00</PredictedDeparture> <PredictionDateTime>2023-12-06T23:11:27.8208831-08:00</PredictionDateTime> <RouteName>sample string 4</RouteName> <StopId>1</StopId> <TripId>2</TripId> <VehicleId>3</VehicleId> </Prediction> <Prediction> <PredictedDelayInSeconds>5</PredictedDelayInSeconds> <PredictedDeparture>2023-12-06T23:11:27.8208831-08:00</PredictedDeparture> <PredictionDateTime>2023-12-06T23:11:27.8208831-08:00</PredictionDateTime> <RouteName>sample string 4</RouteName> <StopId>1</StopId> <TripId>2</TripId> <VehicleId>3</VehicleId> </Prediction> </ArrayOfPrediction>