#AutoTranslate
Brief Description
The StopEvent service is used to construct a departure or arrival monitor. All journeys from a stop and its assigned stop stops are included. However, unlike with the router, no neighbouring stops are returned if no results are available for the requested stop.
Technical Description
API Explorer
You can try out your own requests – direct link to API Explorer.
Request
The request is made with a OJPStopEventRequest, which contains various parameters for the query, here’s an example from Bern:
<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-11T14:11:26.795Z</siri:RequestTimestamp>
<siri:RequestorRef>SKIPlus</siri:RequestorRef>
<OJPStopEventRequest>
<siri:RequestTimestamp>2025-02-11T14:11:26.795Z</siri:RequestTimestamp>
<siri:MessageIdentifier>SER_1</siri:MessageIdentifier>
<Location>
<PlaceRef>
<siri:StopPointRef>ch:1:sloid:07000</siri:StopPointRef>
<Name>
<Text>Bern</Text>
</Name>
</PlaceRef>
<DepArrTime>2025-02-11T14:11:21.539Z</DepArrTime>
</Location>
<Params>
<NumberOfResults>10</NumberOfResults>
<StopEventType>departure</StopEventType>
<IncludePreviousCalls>true</IncludePreviousCalls>
<IncludeOnwardCalls>true</IncludeOnwardCalls>
<UseRealtimeData>full</UseRealtimeData>
</Params>
</OJPStopEventRequest>
</siri:ServiceRequest>
</OJPRequest>
</OJP>
The following are the parameters of the OJPStopEventRequestStructure:
| Item | Cardinality | Description | Example |
|---|---|---|---|
RequestTimestamp |
1:1 | The timestamp of the request. Preferably in UTC time. |
<siri:RequestTimestamp>2025-02-11T14:11:26.795Z</siri:RequestTimestamp> |
MessageIdentifier |
0:1 | The identifier of the message. Can be selected by the user. Can be useful in case of support. This is returned in the response, if available. |
<siri:MessageIdentifier>SER_1</siri:MessageIdentifier> |
Location/PlaceRef |
0:1 | It is best to use a StopPlaceRef. Location Name is ignored.Please note: Both Didok and SLOID may occur. More Information. |
<PlaceRef> |
Location/DepArrTime |
0:1 | The time to be used. Zulu-Time’Z’ is best used in Zulu-Time (i.e. independent of any time zone). For Z, the seconds must also be specified. If the format is not correct or if there is no Z, the system tries to interpret the time as local time. |
<DepArrTime>2025-02-11T14:11:21.539Z</DepArrTime> |
Location/TimeAllowance |
0:1 | Additional time required to reach/leave this location (e.g. B. max. 5 minutes on foot, but 10 minutes by bike). xs:Duration. |
<Location> |
Params |
0:1 | the parameters |
<Params> |
Params of the StopEventDataFilters
| Item | Cardinality | Description | Example |
|---|---|---|---|
ModeFilter |
0:1 | Filter by mode. The Exclude element indicates whether the modes are to be included or excluded. 1:* modes can be added. Only ‘PtMode’ is supported, ‘PersonalMode’ not. | <ModeFilter>
|
LineFilter |
0:1 | Filter by line. The Exclude element indicates whether the lines are to be included or excluded. 1:* Line can be added.
|
<LineFilter> |
OperatorFilter |
0:1 | Filter by operator. The Exclude element indicates whether the operators are to be included or excluded. 1:* OperatorRef can be added. |
<OperatorFilter> |
NumberOfResults |
0:1 | Number of results |
<NumberOfResults>10</NumberOfResults> |
StopEventType |
0:1 | Type of StopEvents:
|
<StopEventType>both</StopEventType> |
IncludePreviousCalls |
0:1 | Show the previous stops for the individual trips as well? |
<IncludePreviousCalls>true</IncludePreviousCalls> |
IncludeOnwardCalls |
0:1 | Show the subsequent stops for the individual trips as well? |
<IncludeOnwardCalls>true</IncludeOnwardCalls> |
IncludeOperatingDays |
0:1 | Include operating day information for this StopEvent as well? |
<IncludeOperatingDays>true</IncludeOperatingDays> |
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> |
Response
The received result is a OJPStopEventDelivery Incident consisting of the TripResponseContext and the various TripResults and looks like this:
<OJP xmlns:siri="http://www.siri.org.uk/siri" xmlns="http://www.vdv.de/ojp" version="2.0">
<OJPResponse>
<siri:ServiceDelivery>
<siri:ResponseTimestamp>2025-02-14T18:03:51.3185811+01:00</siri:ResponseTimestamp>
<siri:ProducerRef>MENTZ</siri:ProducerRef>
<OJPStopEventDelivery>
<siri:ResponseTimestamp>2025-02-14T18:03:51.3185821+01:00</siri:ResponseTimestamp>
<siri:RequestMessageRef>c5c59047-5c59-4ade-b635-9c942a0125ec</siri:RequestMessageRef>
<siri:DefaultLanguage>de</siri:DefaultLanguage>
<CalcTime>42</CalcTime>
<StopEventResponseContext>
<Places>
<Place>
<StopPlace>
<StopPlaceRef>ch:1:sloid:91178</StopPlaceRef>
<StopPlaceName>
<Text xml:lang="de">Zürich, Hardturm</Text>
</StopPlaceName>
<TopographicPlaceRef>23026261:27</TopographicPlaceRef>
</StopPlace>
<Name>
<Text xml:lang="de">Zürich, Hardturm</Text>
</Name>
<GeoPosition>
<siri:Longitude>8.50455</siri:Longitude>
<siri:Latitude>47.39415</siri:Latitude>
</GeoPosition>
</Place>
<Place>
<StopPoint>
<siri:StopPointRef>ch:1:sloid:91178::0</siri:StopPointRef>
<StopPointName>
<Text xml:lang="de">Zürich, Hardturm</Text>
</StopPointName>
<ParentRef>ch:1:sloid:91178</ParentRef>
<TopographicPlaceRef>23026261:27</TopographicPlaceRef>
</StopPoint>
<Name>
<Text xml:lang="de">Zürich, Hardturm</Text>
</Name>
<GeoPosition>
<siri:Longitude>8.50455</siri:Longitude>
<siri:Latitude>47.39415</siri:Latitude>
</GeoPosition>
</Place>
<Place>
<TopographicPlace>
<TopographicPlaceCode>23026261:27</TopographicPlaceCode>
<TopographicPlaceName>
<Text xml:lang="de">Zürich</Text>
</TopographicPlaceName>
</TopographicPlace>
<Name>
<Text xml:lang="de">Zürich</Text>
</Name>
<GeoPosition>
<siri:Longitude>8.50455</siri:Longitude>
<siri:Latitude>47.39415</siri:Latitude>
</GeoPosition>
</Place>
<!-- ... -->
<Place>
<StopPoint>
<siri:StopPointRef>ch:1:sloid:91178::3</siri:StopPointRef>
<StopPointName>
<Text xml:lang="de">Zürich, Hardturm</Text>
</StopPointName>
<ParentRef>ch:1:sloid:91178</ParentRef>
<TopographicPlaceRef>23026261:27</TopographicPlaceRef>
</StopPoint>
<Name>
<Text xml:lang="de">Zürich, Hardturm</Text>
</Name>
<GeoPosition>
<siri:Longitude>8.50429</siri:Longitude>
<siri:Latitude>47.39473</siri:Latitude>
</GeoPosition>
</Place>
</Places>
<Situations/>
</StopEventResponseContext>
<StopEventResult>
<StopEvent>
<PreviousCall>
<CallAtStop>
<siri:StopPointRef>ch:1:sloid:91178::0</siri:StopPointRef>
<StopPointName>
<Text xml:lang="de">Zürich, Hardturm</Text>
</StopPointName>
<ServiceDeparture>
<TimetabledTime>2025-02-17T08:33:00Z</TimetabledTime>
</ServiceDeparture>
<Order>1</Order>
</CallAtStop>
</PreviousCall>
<!-- ... -->
<ThisCall>
<CallAtStop>
<siri:StopPointRef>ch:1:sloid:30813::0</siri:StopPointRef>
<StopPointName>
<Text xml:lang="de">Zürich, Kreuzplatz</Text>
</StopPointName>
<ServiceDeparture>
<TimetabledTime>2025-02-17T09:01:00Z</TimetabledTime>
</ServiceDeparture>
<Order>19</Order>
</CallAtStop>
</ThisCall>
<OnwardCall>
<CallAtStop>
<siri:StopPointRef>ch:1:sloid:91119::0</siri:StopPointRef>
<StopPointName>
<Text xml:lang="de">Zürich, Englischviertelstrasse</Text>
</StopPointName>
<ServiceArrival>
<TimetabledTime>2025-02-17T09:02:00Z</TimetabledTime>
</ServiceArrival>
<ServiceDeparture>
<TimetabledTime>2025-02-17T09:03:00Z</TimetabledTime>
</ServiceDeparture>
<Order>20</Order>
</CallAtStop>
</OnwardCall>
<!-- ... -->
<OnwardCall>
<CallAtStop>
<siri:StopPointRef>ch:1:sloid:91233::1</siri:StopPointRef>
<StopPointName>
<Text xml:lang="de">Zürich, Klusplatz</Text>
</StopPointName>
<PlannedQuay>
<Text xml:lang="de">B</Text>
</PlannedQuay>
<ServiceArrival>
<TimetabledTime>2025-02-17T09:06:00Z</TimetabledTime>
</ServiceArrival>
</CallAtStop>
</OnwardCall>
<Service>
<Mode>
<PtMode>tram</PtMode>
<siri:TramSubmode>cityTram</siri:TramSubmode>
<Name>
<Text xml:lang="de">Tram</Text>
</Name>
<ShortName>
<Text xml:lang="de">T</Text>
</ShortName>
</Mode>
<ConventionalModeOfOperation>scheduled</ConventionalModeOfOperation>
<TrainNumber>4619</TrainNumber>
<siri:LineRef>ojp:91008:H</siri:LineRef>
<siri:OperatorRef>3849</siri:OperatorRef>
<PublicCode>Tram</PublicCode>
<PublishedServiceName>
<Text xml:lang="de">8</Text>
</PublishedServiceName>
<ProductCategory>
<Name>
<Text xml:lang="de">Tram</Text>
</Name>
<ShortName>
<Text xml:lang="de">T</Text>
</ShortName>
<ProductCategoryRef>2</ProductCategoryRef>
</ProductCategory>
<siri:DirectionRef>H</siri:DirectionRef>
<JourneyRef>ch:1:sjyid:100648:plan:3183eb5d-c26c-4ef4-972d-c92c4416363a</JourneyRef>
<OperatingDayRef>2025-02-17</OperatingDayRef>
<Cancelled>false</Cancelled>
<Unplanned>false</Unplanned>
<Deviation>false</Deviation>
<Attribute>
<UserText>
<Text xml:lang="de">Niederflureinstieg</Text>
</UserText>
<Code>A__NF</Code>
</Attribute>
<OriginStopPointRef>ch:1:sloid:91178::0</OriginStopPointRef>
<DestinationStopPointRef>ch:1:sloid:91233::1</DestinationStopPointRef>
<OriginText>
<Text xml:lang="de">Zürich, Hardturm</Text>
</OriginText>
<DestinationText>
<Text xml:lang="de">Zürich, Klusplatz</Text>
</DestinationText>
</Service>
<OperatingDays>
<From>2025-02-02</From>
<To>2025-12-12</To>
<Pattern>01111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100011110011111000111000111110011111001111100111110011110001111100101110011111001111100111110010111001111000011110011111001111100111110011111001111100111110011111001111100111110011111</Pattern>
</OperatingDays>
</StopEvent>
</StopEventResult>
<!-- ... -->
</OJPStopEventDelivery>
</siri:ServiceDelivery>
</OJPResponse>
</OJP>
The answer is in a OJPStopEventDelivery which is structured as follows:
| Item | Cardinality | Description | Example |
|---|---|---|---|
siri:ResponseTimestamp |
1:1 | The timestamp of the answer |
<siri:ResponseTimestamp>2020-04-03T14:47:59Z</siri:ResponseTimestamp> |
siri:RequesteMessageRef |
0:1 | This refers to the message that was requested |
<siri:RequestMessageRef>756</siri:RequestMessageRef> |
siri:DeliveryStatus |
0:1 | The status of the response, true, means that the request has been processed. |
<siri:Status>true</siri:Status> |
CalcTime |
0:1 | The calculation time in milliseconds |
<CalcTime>139</CalcTime> |
StopEventResponseContext |
0:1 | Return reference information such as the stops used.See separate table | |
StopEventResult |
0:* | The effective results. See example above. |
<StopEventResult> |
StopEventResult/Id |
1:1 | The ID of the result |
<ResultId>ID-5194D714-33A5-48B0-8895-BDCBAB540958</ResultId> |
StopEventResult/StopEvent |
1:1 | The individual journeysSee separate table |
ResponseContextStucture
Structure with trip-related response contexts that include collections of places and situations as:
- Operators
- Places
- Situations
| Item | Cardinality | Description | Example |
|---|---|---|---|
Operators |
0:1 | Structure for operator objects. Only operator objects referred to in the response should be output. | n/a |
Places |
0:1 | Only the placement objects referred to in the answer should be included in the structure. |
<Places> |
Situations |
0:1 | Structure for SIRI SX situation objects. Only situations referred to in the answer should be output. |
<Situations> |
StopEventStructure
The StopEvent consists of:
- PreviousCall(s): If parameter is selected
- ThisCall: The currently selected stop
- OnwardCall(s): Future stops on the journey
- Service: Information about the journey
| Item | Cardinality | Description | Example |
|---|---|---|---|
PreviousCall |
0:* | The PreviousCall contains the stops before the one that was requested.All the information is contained in a CallAtStop. See relevant section |
<PreviousCall> |
ThisCall |
1:1 | This is the stop to which the request refers.All information is contained in a CallAtStop. See relevant section |
<ThisCall> |
OnwardCall |
0:* | The OnwardCall contains the stops after the current stop that was specified in the request.All the information is contained in a CallAtStop. See relevant section |
<OnwardCall> |
Service |
1:1 | The service provides the actual information about the entire journey. |
<Service> |
OperatingDays |
0:1 | Validity of the journey specified and pattern on which days this connection was searched |
<OperatingDays> |
OperatingDays/From |
1:1 | Description |
<From>2025-02-02</From> |
OperatingDays/To |
1:1 | Description |
<To>2025-12-12</To> |
OperatingDays/Pattern |
1:1 | More information on how to interpret the pattern can be found here: Line calendar |
<Pattern>01111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100011110011111000111000111110011111001111100111110011110001111100101110011111001111100111110010111001111000011110011111001111100111110011111001111100111110011111001111100111110011111</Pattern> |
CallAtStopStructure
| Item | Cardinality | Description | Example |
|---|---|---|---|
siri:StopPointRef |
1:1 | The stop number. Only SLOID will be used, for foreign StopPoints, the BPUIC number may still occur as StopPointRef. More Information. |
<siri:StopPointRef>8530813</siri:StopPointRef> |
StopPointName |
1:1 | The name of the stop |
<StopPointName> |
PlannedQuay |
0:1 | The planned platform |
<PlannedQuay> |
EstimatedQuay |
0:1 | The current platform, if available |
<EstimatedQuay> |
ServiceArrival |
0:1 | The first stop has no arrival. |
<ServiceArrival> |
ServiceDeparture |
0:1 | The last stop has no departure. |
<ServiceDeparture> |
Order |
1:1 | The sequence of the stops |
<Order>9</Order> |
RequestStop |
0:1 | Request stop. Boolean.Not implemented, planned for a future release. | n/a |
UnplannedStop |
0:1 | Stop that was not planned. Boolean.Not implemented, planned for a future release. | n/a |
NotServicedStop |
0:1 | Contrary to plans, there will be no stops (cancellations). |
<NotServicedStop>true</NotServicedStop> |
NoBoardingAtStop |
0:1 | It is not possible to board the train at this stop. |
<NoBoardingAtStop>true</NoBoardingAtStop> |
NoAlightingAtStop |
0:1 | It is not possible to disembark at this stop. |
<NoAlightingAtStop>true</NoAlightingAtStop> |
The ContinuousServiceStructure
| Item | Cardinality | Description | Example |
|---|---|---|---|
OperatingDayRef |
1:1 | The relevant operating day |
<OperatingDayRef>2020-04-03</OperatingDayRef> |
JourneyRef |
1:1 | The ID of the trip. |
<JourneyRef>ch:1:sjyid:100001:627-001</JourneyRef> |
siri:LineRef |
1:1 | The ID of the line: |
<siri:LineRef>ojp:91021:H</siri:LineRef> |
siri:DirectionRef |
0:1 | The ID of the direction. |
<siri:DirectionRef>R</siri:DirectionRef> |
Mode |
1:1 | The traffic mode.The list of modes can be found at LocationInformationRequest |
<Mode> |
PublishedLineName |
1:1 | The published name of the list |
<PublishedLineName> |
OperatorRef |
0:1 | The reference to the operator.Attention: will still change. |
<siri:OperatorRef>11</siri:OperatorRef> |
Attribute |
0:* | Attributes are properties, usually relating to trips. E.g. low-floor bus, bar, reservation required.Mandateory is true if the attribute must be displayed to the user. |
<Attribute> |
OrginStopPointRef |
0:1 | The Didok number of the starting point.Please note: The ID will still change. |
<OriginStopPointRef>8591315</OriginStopPointRef> |
OriginText |
0:1 | The name of the departure stop. |
<OriginText> |
DestinationStopPointRef |
0:1 | The DiDok number of the destination stop.Please note: The ID will still change. |
<DestinationStopPointRef>8591049</DestinationStopPointRef> |
DestinationText |
0:1 | The name of the destination stop. |
<DestinationText> |
Unplanned |
0:1 | Indicates whether this is an additional journey not listed in the regular timetable. Boolean. |
<Unplanned>true</Unplanned> |
Cancelled |
0:1 | A journey was cancelled. Boolean. |
<Cancelled>true</Cancelled> |
Deviation |
0:1 | Indicates whether the journey is not running according to timetable.Planned for future version | n/a |
BookingArrangements |
0:1 | This feature is not supported. | n/a |
ParticipantRef |
1:1 | Used to communicate faults or other exceptional situations.Planned for future version | n/a |
siri:SituationNumber |
1:1 | Used to communicate faults or other exceptional situations.Planned for future version | n/a |
Further information
Real-time
Key concepts:
- Operating days: Days on which a train runs. Can ultimately take more than 24h. However, notation DD-MM-YYYY as OperatingDays e.g. in Service/Mode.
- UTC time: Corresponds to UTC time and is specified as such 2025-02-02T11:24:00Z, otherwise also ISO 8601 Time with time zone difference 2025-02-02T09:24:00+0200. There will be no daylight saving time change during UTC. Fractions of a second are particularly common for timestamps.
- Delay: In the area of customer information, only changes that exceed a certain amount are forwarded. This is done by means of delays. This means that delays are not polled, but only forwarded once a certain change has been reached. Deviations are communicated within 1/10 minutes.
Real-time or real-time is only shown for the current operating day. The deviation is each specified in the StopPointRef, which also corresponds to the element present in the timetable, while a StopPlaceRef refers to a point in a station. In Switzerland, the same IDs are used for StopPointRef and StopPlaceRef.
Here’s an example using a real-time ‘CallAtStop’. The same concept can be applied to all places in OJP where deviations from the timetable are issued:
<CallAtStop>
<siri:StopPointRef>ch:1:sloid:91128::0</siri:StopPointRef>
<StopPointName>
<Text xml:lang="de">Zürich, Fernsehstudio</Text>
</StopPointName>
<ServiceArrival>
<TimetabledTime>2025-02-17T13:06:18Z</TimetabledTime>
<EstimatedTime>2025-02-17T13:05:54Z</EstimatedTime>
</ServiceArrival>
<ServiceDeparture>
<TimetabledTime>2025-02-17T13:06:30Z</TimetabledTime>
<EstimatedTime>2025-02-17T13:06:00Z</EstimatedTime>
</ServiceDeparture>
<Order>2</Order>
</CallAtStop>
The discrepancy between ‘TimetabledTime’ and ‘EstimatedTime’ is the real-time deviation from the timetable. This is also shown if it is an earlier arrival, for example. It makes sense to implement the logic for outputting the deviation so that only deviations that are relevant to the customer are shown, such as a delay.
Car tunnel hoists
<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-17T08:03:02.813Z</siri:RequestTimestamp>
<siri:RequestorRef>SKIPlus_ATZ</siri:RequestorRef>
<OJPStopEventRequest>
<siri:RequestTimestamp>2025-02-17T08:03:02.813Z</siri:RequestTimestamp>
<Location>
<PlaceRef>
<siri:StopPointRef>ch:1:sloid:11171</siri:StopPointRef>
<Name>
<Text>Kandersteg Autoverlad</Text>
</Name>
</PlaceRef>
</Location>
<Params>
<IncludeAllRestrictedLines>true</IncludeAllRestrictedLines>
<NumberOfResults>10</NumberOfResults>
<StopEventType>departure</StopEventType>
<IncludePreviousCalls>true</IncludePreviousCalls>
<IncludeOnwardCalls>true</IncludeOnwardCalls>
<UseRealtimeData>full</UseRealtimeData>
</Params>
</OJPStopEventRequest>
</siri:ServiceRequest>
</OJPRequest>
</OJP>
Large-capacity profiles (at BLS) can be identified by the GF-attribute:
<Attribute>
<Text>
<Text xml:lang="de">Grossraumprofil</Text>
</Text>
<Code>A__GF</Code>
</Attribute>
