GET stops/{stopId}/predictions

Retrieve vehicle predictions for a particular stop.

Request Information

URI Parameters

NameDescriptionTypeAdditional information
stopId

The stop whose predictions should be retrieved.

integer

Required

Body Parameters

None.

Response Information

Resource Description

Collection of Prediction
NameDescriptionTypeAdditional 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

Sample:
[
  {
    "StopId": 1,
    "TripId": 2,
    "VehicleId": 3,
    "RouteName": "sample string 4",
    "PredictedDelayInSeconds": 5,
    "PredictedDeparture": "2022-06-28T08:44:57.6611416-07:00",
    "PredictionDateTime": "2022-06-28T08:44:57.6611416-07:00"
  },
  {
    "StopId": 1,
    "TripId": 2,
    "VehicleId": 3,
    "RouteName": "sample string 4",
    "PredictedDelayInSeconds": 5,
    "PredictedDeparture": "2022-06-28T08:44:57.6611416-07:00",
    "PredictionDateTime": "2022-06-28T08:44:57.6611416-07:00"
  }
]

text/html

Sample:
[{"StopId":1,"TripId":2,"VehicleId":3,"RouteName":"sample string 4","PredictedDelayInSeconds":5,"PredictedDeparture":"2022-06-28T08:44:57.6611416-07:00","PredictionDateTime":"2022-06-28T08:44:57.6611416-07:00"},{"StopId":1,"TripId":2,"VehicleId":3,"RouteName":"sample string 4","PredictedDelayInSeconds":5,"PredictedDeparture":"2022-06-28T08:44:57.6611416-07:00","PredictionDateTime":"2022-06-28T08:44:57.6611416-07:00"}]

application/xml, text/xml

Sample:
<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>2022-06-28T08:44:57.6611416-07:00</PredictedDeparture>
    <PredictionDateTime>2022-06-28T08:44:57.6611416-07:00</PredictionDateTime>
    <RouteName>sample string 4</RouteName>
    <StopId>1</StopId>
    <TripId>2</TripId>
    <VehicleId>3</VehicleId>
  </Prediction>
  <Prediction>
    <PredictedDelayInSeconds>5</PredictedDelayInSeconds>
    <PredictedDeparture>2022-06-28T08:44:57.6611416-07:00</PredictedDeparture>
    <PredictionDateTime>2022-06-28T08:44:57.6611416-07:00</PredictionDateTime>
    <RouteName>sample string 4</RouteName>
    <StopId>1</StopId>
    <TripId>2</TripId>
    <VehicleId>3</VehicleId>
  </Prediction>
</ArrayOfPrediction>