Getting vehicle raw positions from a GTFS feed

This API publishes the vehicle positions similarly to the original GTFS-RT feed.

For details, see GTFS-RT feed information.

The position information in the response body is provided in GTFS format as FeedEntity.VehiclePosition.

Important:  Optima handles GTFS input packets compliant with either GTFS 1.0 and 2.0. The output is compliant with GTFS 1.0, without any data losses with respect to GTFS 2.0.

Every part of the feed that has been discarded - in accordance with the "GTFS feed acceptance criteria" -, is not represented. The endpoint publishes the received positions without modifications only for validated data.

For each unique vehicle, only the most recent received position is available in the output. Vehicles are identified by their ID or by their trip ID. Two vehicle positions refer to the same vehicle if the vehicle positions’ vehicle ID or trip ID is the same.

The endpoint returns only data that is reasonably recent and considered still valid. The configuration parameter TimeToConsiderRealVehicles (given in seconds) provides the validity of the received positions. The endpoint returns only vehicle positions whose timestamp attribute is greater than now() − TimeToConsiderRealVehicles.

If no timestamp is provided for a vehicle position, the timestamp defaults to the timestamp provided in the feed header. If the feed header has no timestamp either, the timestamp defaults to the instant when the data is received (according to the time of the server that receives the information).

Authentication phase

Before using the endpoint, you must run the authentication phase (→ Login).

After the authentication, a session opens and a valid session token persists until: