Skip to content

OJPTripInfoRequest

OJPTripInfoRequest

Further details about a trip can be requested with TripInfoRequest.

Request

The main information for a TripInfoRequest is a ojp:JourneyRef with ojp:OperatingDayRef – i.e. a reference to a very specific journey on a calendar day. The JourneyRef must be read out of the response to another request (e.g. TripRequest or StopEventRequest).

Element Cardinality Description Example
RequestTimestamp 1:1  Timestamp of the request. Preferably in UTC.
MessageIdentifier 0:1 The identifier of the message. Incrementally increasing numbers preferred.
JourneyRef 0:1 Reference to the journey.

Use TripRequest or StopEventRequest to obtain the reference.

 

OperatingDayRef 0:1 Format YYYY-MM-DD

 

siri:VehicleRef 0:1 n/a

This feature is not available.

n/a
TimeOfOperation 0:1 n/a

This feature is not available.

n/a
Params 0:1 Further request parameters
Params/UseTimetableDataOnly 0:1 Ignore real-time data? Default is false.
Params/IncludeCalls 0:1 Include calls (intermediate stops)? Default is true.
Params/IncludePosition 0:1 Include the current position of the train?

This feature is not available.

n/a
Params/IncludeService 0:1 Include the service details (LineRef, Mode, OperatorRef, etc.)? Default is true.
Params/IncludeTrackSections 0:1 Include geographical details of the route? The default value is false.
Params/IncludeTrackProjection 0:1 Send coordinate projections too?

This feature is under consideration.

Response

TripInfoResponseContext is supplied at the top (before the actual content), and contains mainly information on the “places” specified – see more detailed description in OJPTripRequest

TripInfoResult

Please note: Depending on the parameters that are set, the elements listed below will be included or excluded from the response. It may therefore be useful to check the parameters in the request to include/exclude specific elements.

Example of a complete response: TripInfoRequest_example_response

The context is followed by information about the journey itself; starting with all the stops in PreviousCalls (previous stops) and OnwardCalls (stops after the destination). It may contain more stops than the TripRequest that was used to establish the JourneyRef because the TripInfoRequest returns the entire journey.

If real-time was not excluded with UseTimetableDataOnly=true in the request, real-time data (if available) is included (EstimatedTime, EstimatedQuay) in addition to the scheduled departure and arrival times and platforms (TimetabledTime, Planned Quay).

Example: In a TripRequest from Bern to Zurich, the TripInfoRequest could return a trip from Geneva to St. Gallen of which the Bern-Zurich section is a subset.

Next are the details of the service: LineRef, Mode (transport type), OperatorRef, etc.

This is followed by JourneyTrack (request parameter: IncludeTrackSections) with geographical details of the journey.

Lastly, the extension currently only shows one item of information, the published number. In the example below it is “319” because it is the EC 319).