#AutoTranslate
Brief Description
More details about a trip can be requested with TripInfoRequest. The ‘journey’ always refers to the entire journey from where the connection starts to its final destination, regardless of which part of the journey is really of interest. A common scenario for TripInfoRequest is if you are on a journey and then change to another connection at a stop in order to check your connection options from your next journey and to request information about any delays or timetable changes. Of course, this option can also be used for the current journey to check whether the desired connection is still possible and how much time remains for the transfer.
Technical Description
API Explorer
You can customize requests according to your own wishes and try out the templates in the Open API – direct link to API Explorer.
TripInfoRequest
The key information for sending a TripInfoRequest is the JourneyRef and the OperatingDayRef – a reference to a very specific journey on a calendar day. The JourneyRef must be read from the response from another request (e.g. TripRequest or StopEventRequest). For further details on the structure of a TripInfoRequest, see the description of OJPTripInfoRequestStructure at VDV available. Here’s an example of TripInfoRequest:
<OJP xmlns="http://www.vdv.de/ojp" xmlns:siri="http://www.siri.org.uk/siri" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xsi:schemaLocation="http://www.vdv.de/ojp" version="2.0">
<OJPRequest>
<siri:ServiceRequest>
<siri:ServiceRequestContext>
<siri:Language>de</siri:Language>
</siri:ServiceRequestContext>
<siri:RequestTimestamp>2025-02-18T15:41:28.717Z</siri:RequestTimestamp>
<siri:RequestorRef>SKIPlus</siri:RequestorRef>
<OJPTripInfoRequest>
<siri:RequestTimestamp>2025-02-18T15:41:28.717Z</siri:RequestTimestamp>
<span class="crayon-r "> <siri:MessageIdentifier></span><span class="crayon-i ">SER-1a</span><span class="crayon-r "></siri:MessageIdentifier></span>
<JourneyRef>ch:1:sjyid:100001:975-001</JourneyRef>
<OperatingDayRef>2025-02-18</OperatingDayRef>
<Params>
<UseRealtimeData>explanatory</UseRealtimeData>
<IncludeCalls>true</IncludeCalls>
<IncludeService>true</IncludeService>
</Params>
</OJPTripInfoRequest>
</siri:ServiceRequest>
</OJPRequest>
</OJP>Description of the parameters
The elements of the OJPTripInfoRequestStructure and TripInfoParamStructure:
| Item | Cardinality | Description | Example |
|---|---|---|---|
siri:RequestTimestamp | 1:1 | The timestamp of the request. Preferably in UTC time. |
<siri:RequestTimestamp>2025-02-18T15:41:28.717Z</siri:RequestTimestamp> |
siri:MessageIdentifier | 0:1 | The identifier of the message. Increasingly increasing number preferred. |
<siri:MessageIdentifier>SER-1a</siri:MessageIdentifier> |
JourneyRef | -1:1 | Reference to the journey. Use TripRequest or StopEventRequest to obtain the reference. |
<JourneyRef>ch:1:sjyid:100001:975-001</JourneyRef>
|
OperatingDayRef | -1:1 | In the format YYYY-MM-DD |
<OperatingDayRef>2026-06-23</OperatingDayRef> |
TrainNumber | -1:1 | This feature is not available, but will be delivered if available. |
n/a |
OperatorRef | -1:1 | This feature is not available, but will be delivered if available. |
n/a |
siri:VehicleRef | -1:1 | This feature is not available. | n/a |
TimeOfOperation | -1:1 | This feature is not available. | n/a |
Params | 0:1 | Additional parameters for the request | |
Params/UseRealTimeData | 0:1 | Determines how real-time is taken into account, full = everything; explanatory = also late and cancelled Connections (most detailed variant); none = only according to Timetable. |
<UseRealtimeData>explanatory</UseRealtimeData> |
Params/IncludeCalls | 0:1 | Include calls (intermediate stops)? Default is true. |
<IncludeCalls>true</IncludeCalls> |
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.)? The default is true. |
<IncludeService>false</IncludeService> |
Params/IncludeTrackSections | 0:1 | Include geographic information of the route? Default is false. |
<IncludeTrackSections>true</IncludeTrackSections> |
Params/IncludeTrackProjection | 0:1 | Should this include the geographical projection (coordinates) of this vehicle journey? |
<IncludeTrackProjection>true</IncludeTrackProjection> |
Params/IncludePlacesContext | 0:1 | Whether the location context is required. If the requester already has this information, the response can be leaner if set to false. Default is true.This feature is under consideration. | n/a |
Params/IncludeFormation | 0:1 | Whether the formation should be included. For ‘simple,’ only VehicleFeature is used. ‘full’ can release the full power of the SIRI formation model (for trains especially). The OJP specification document provides guidance on how to limit yourself to the most important aspects as a server. The default is none.This feature is under consideration. | n/a |
Params/IncludeSituationsContext | 0:1 | Whether the context of the situation is required. If the requester has this information in some other way or cannot process it, the response can be streamlined by setting it to false. Default is true. | n/a |
TripInfoResponse
The details of the individual parameters can be found in the descriptions of the StopEventRequest can be removed.
TripInfoResponseContext
At the top of the OJPTripInfoDeliveryStructure the TripResponseContext is ResponseContextStructure provided. Detailed information on the ‘places’ used can be found in the corresponding description in OJPTripRequest included.
<TripInfoResponseContext>
<Places>
<Place>
<StopPlace>
<StopPlaceRef>ch:1:sloid:10</StopPlaceRef>
<StopPlaceName>
<Text xml:lang="de">Basel SBB</Text>
</StopPlaceName>
<TopographicPlaceRef>23005701:2</TopographicPlaceRef>
</StopPlace>
<Name>
<Text xml:lang="de">Basel SBB</Text>
</Name>
<GeoPosition>
<siri:Longitude>7.59009</siri:Longitude>
<siri:Latitude>47.54672</siri:Latitude>
</GeoPosition>
</Place>
<Place>
<!-- ... -->
</Place>
</Places>
<Situations>
<PtSituation>
<siri:CreationTime>2025-03-13T11:17:00Z</siri:CreationTime>
<siri:ParticipantRef>ski-ddip-out-sx_prod</siri:ParticipantRef>
<siri:SituationNumber>ch:1:sstid:100001:ski-oct_sip2-sx_prod-TT958987-0</siri:SituationNumber>
<siri:Version>1</siri:Version>
<siri:Source>
<siri:SourceType>directReport</siri:SourceType>
</siri:Source>
<siri:ValidityPeriod>
<siri:StartTime>2025-03-13T11:17:00Z</siri:StartTime>
<siri:EndTime>2025-03-14T21:00:00Z</siri:EndTime>
</siri:ValidityPeriod>
<siri:AlertCause>unknown</siri:AlertCause>
<siri:Priority>3</siri:Priority>
<siri:ScopeType>stopPoint</siri:ScopeType>
<siri:Language>de</siri:Language>
<siri:PublishingActions>
<siri:PublishingAction>
<siri:PublishAtScope>
<siri:ScopeType>stopPoint</siri:ScopeType>
<siri:Affects/>
</siri:PublishAtScope>
<siri:PassengerInformationAction>
<siri:ActionRef/>
<siri:RecordedAtTime>2025-03-13T11:17:00Z</siri:RecordedAtTime>
<siri:Perspective>stopPoint</siri:Perspective>
<siri:TextualContent>
<siri:SummaryContent>
<siri:SummaryText xml:lang="de">Der stufenfreie Zugang zum Bahnhof Basel SBB ist für Reisende mit Mobilitätseinschränkung nicht mehr garantiert.</siri:SummaryText>
<!-- ... -->
</siri:TextualContent>
</siri:PassengerInformationAction>
</siri:PublishingAction>
</siri:PublishingActions>
</PtSituation>
</Situations>
</TripInfoResponseContext>TripInfoResult
The context is followed by the journey itself; starting with all stops Previous call (previous stops) and Onward calls (stops below). This may contain more stops than the TripRequest that was used to determine the JourneyRef because the TripInfoRequest returns the entire journey. Example: In a TripRequest from Bern to Zurich, the TripInfoRequest could return a trip from Geneva to St. Gallen of which the Bern to Zurich section is a subset.
Depending on the parameters in the query, more or less details are included in the response. Especially for real-time, we recommend querying ‘UseRealtimeData’ with ‘explanatory’ to receive all real-time details, so that cancelled journeys are still displayed.
<TripInfoResult>
<PreviousCall>
<siri:StopPointRef>ch:1:sloid:10:4:8</siri:StopPointRef>
<StopPointName>
<Text xml:lang="de">Basel SBB</Text>
</StopPointName>
<NameSuffix>
<Text xml:lang="de">PLATFORM_ACCESS_WITHOUT_ASSISTANCE</Text>
</NameSuffix>
<PlannedQuay>
<Text xml:lang="de">8</Text>
</PlannedQuay>
<ServiceDeparture>
<TimetabledTime>2025-03-14T13:56:00Z</TimetabledTime>
<EstimatedTime>2025-03-14T14:02:00Z</EstimatedTime>
</ServiceDeparture>
<Order>1</Order>
</PreviousCall>
<!-- ... -->
<PreviousCall>
<siri:StopPointRef>ch:1:sloid:7483:0:954324</siri:StopPointRef>
<StopPointName>
<Text xml:lang="de">Spiez</Text>
</StopPointName>
<NameSuffix>
<Text xml:lang="de">PLATFORM_ACCESS_WITHOUT_ASSISTANCE</Text>
</NameSuffix>
<PlannedQuay>
<Text xml:lang="de">3</Text>
</PlannedQuay>
<ServiceArrival>
<TimetabledTime>2025-03-14T15:37:00Z</TimetabledTime>
<EstimatedTime>2025-03-14T15:36:36Z</EstimatedTime>
</ServiceArrival>
<ServiceDeparture>
<TimetabledTime>2025-03-14T15:38:00Z</TimetabledTime>
<EstimatedTime>2025-03-14T15:39:12Z</EstimatedTime>
</ServiceDeparture>
<Order>6</Order>
</PreviousCall>
<OnwardCall>
<siri:StopPointRef>ch:1:sloid:1605:4:7</siri:StopPointRef>
<StopPointName>
<Text xml:lang="de">Visp</Text>
</StopPointName>
<NameSuffix>
<Text xml:lang="de">PLATFORM_ACCESS_WITHOUT_ASSISTANCE</Text>
</NameSuffix>
<PlannedQuay>
<Text xml:lang="de">7</Text>
</PlannedQuay>
<ServiceArrival>
<TimetabledTime>2025-03-14T16:04:00Z</TimetabledTime>
<EstimatedTime>2025-03-14T16:03:12Z</EstimatedTime>
</ServiceArrival>
<ServiceDeparture>
<TimetabledTime>2025-03-14T16:06:00Z</TimetabledTime>
<EstimatedTime>2025-03-14T16:06:42Z</EstimatedTime>
</ServiceDeparture>
<Order>7</Order>
</OnwardCall>
<!-- ... -->
</TripInfoResult>Service
The information about the section Service in detail: LineRef, Mode (transport type), OperatorRef, PublishedServiceName, TrainNumber, etc.
<TripInfoResult>
<!-- ... -->
<Service>
<OperatingDayRef>2025-03-14</OperatingDayRef>
<JourneyRef>ch:1:sjyid:100001:975-001</JourneyRef>
<siri:LineRef>ojp:91006:H</siri:LineRef>
<siri:DirectionRef>R</siri:DirectionRef>
<Mode>
<PtMode>rail</PtMode>
<siri:RailSubmode>interregionalRail</siri:RailSubmode>
<Name>
<Text xml:lang="de">Zug</Text>
</Name>
<ShortName>
<Text xml:lang="de">IC</Text>
</ShortName>
</Mode>
<ProductCategory>
<Name>
<Text xml:lang="de">Zug</Text>
</Name>
<ShortName>
<Text xml:lang="de">IC</Text>
</ShortName>
<ProductCategoryRef>23</ProductCategoryRef>
</ProductCategory>
<PublishedServiceName>
<Text xml:lang="de">IC6</Text>
</PublishedServiceName>
<TrainNumber>975</TrainNumber>
<OriginText>
<Text xml:lang="de">n/a</Text>
</OriginText>
<siri:OperatorRef>11</siri:OperatorRef>
<DestinationStopPointRef>ch:1:sloid:1609:2:3</DestinationStopPointRef>
<DestinationText>
<Text xml:lang="de">Brig</Text>
</DestinationText>
<SituationFullRefs>
<SituationFullRef>
<siri:ParticipantRef>ski-ddip-out-sx_prod</siri:ParticipantRef>
<siri:SituationNumber>ch:1:sstid:100001:ski-oct_sip2-sx_prod-TT958987-0</siri:SituationNumber>
</SituationFullRef>
</SituationFullRefs>
</Service>
</TripInfoResult>JourneyTrack and LinkProjection
Subsequently, JourneyTrack and LinkProjection (Request parameter = true: IncludeTrackSections and IncludeLinkProjection) provides geographical information about the journey.
<ojp:TripInfoResult>
<!-- ... -->
<JourneyTrack>
<TrackSection>
<TrackSectionStart>
<siri:StopPointRef>ch:1:sloid:10</siri:StopPointRef>
<Name>
<Text xml:lang="de">Basel SBB</Text>
</Name>
</TrackSectionStart>
<TrackSectionEnd>
<siri:StopPointRef>8501609</siri:StopPointRef>
<Name>
<Text xml:lang="de">Brig</Text>
</Name>
</TrackSectionEnd>
<LinkProjection>
<Position>
<siri:Longitude>7.59235</siri:Longitude>
<siri:Latitude>47.54587</siri:Latitude>
</Position>
<Position>
<siri:Longitude>7.59256</siri:Longitude>
<siri:Latitude>47.54579</siri:Latitude>
</Position>
<!-- ... -->
<Position>
<siri:Longitude>7.59273</siri:Longitude>
<siri:Latitude>47.54575</siri:Latitude>
</Position>
<Position>
<siri:Longitude>7.98536</siri:Longitude>
<siri:Latitude>46.31967</siri:Latitude>
</Position>
<Position>
<siri:Longitude>7.98575</siri:Longitude>
<siri:Latitude>46.31969</siri:Latitude>
</Position>
</LinkProjection>
<Duration>PT2H13M</Duration>
<Length>0</Length>
</TrackSection>
</JourneyTrack>
</ojp:TripInfoResult>