StopEventService
The StopEventService serves to construct a departure or arrival monitor.
API Explorer
You can try your own requests – direct link to the API explorer.
Request
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
<?xml version="1.0" encoding="utf-8"?> <OJP xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.siri.org.uk/siri" version="1.0" xmlns:ojp="http://www.vdv.de/ojp" xsi:schemaLocation="http://www.siri.org.uk/siri ../ojp-xsd-v1.0/OJP.xsd"> <OJPRequest> <ServiceRequest> <RequestTimestamp>2021-01-09T11:34:25.507Z</RequestTimestamp> <RequestorRef>API-Explorer</RequestorRef> <ojp:OJPStopEventRequest> <RequestTimestamp>2020-01-20T12:00:00Z</RequestTimestamp> <MessageIdentifier>756</MessageIdentifier> <ojp:Location> <ojp:PlaceRef> <ojp:StopPlaceRef>8530813</ojp:StopPlaceRef> <ojp:LocationName> <ojp:Text>Zürich Kreuzplatz</ojp:Text> </ojp:LocationName> </ojp:PlaceRef> <ojp:DepArrTime>2021-01-20T12:00:00Z</ojp:DepArrTime> <ojp:IndividualTransportOptions> <Mode>walk</Mode> <MaxDistance>5000</MaxDistance> <MaxDuration>PT5M</MaxDuration> <MinDistance>0</MinDistance> <MinDuration>PT0M</MinDuration> <Speed>50</Speed> <AdditionalTime>PT10M</AdditionalTime> </ojp:IndividualTransportOptions> </ojp:Location> <ojp:Params> <ojp:StopEventType>both</ojp:StopEventType> <ojp:IncludePreviousCalls>true</ojp:IncludePreviousCalls> <ojp:IncludeOnwardCalls>true</ojp:IncludeOnwardCalls> <ojp:IncludeOperatingDays>true</ojp:IncludeOperatingDays> <ojp:IncludeRealtimeData>true</ojp:IncludeRealtimeData> </ojp:Params> </ojp:OJPStopEventRequest> </ServiceRequest> </OJPRequest> </OJP> |
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. |
|
||
ojp:Location/ojp:PlaceRef | 0:1 | It is best to use a StopPlaceRef. Location Name is ignored. |
|
||
ojp:Location/ojp:DepArrTime | 0:1 | The time to be used. Preferably in UTC (with the Z).
“Z” is Zulu time (i.e. independent of time zones). With Z, it is essential that the seconds are also specified. If the format is not correct or there is no Z, the machine tries to interpret the time as local time. |
|
||
ojp:Location/ojp:TimeAllowance | 0:1 | As alternative to DepArrTime. The time still required to reach the location. xs:Duration. |
|
||
ojp:Location/ojp:IndividualTransportOptions | 0:* | Options to reach or leave the location. See section on IndividualTransportOptions under Trip Service
Permitted modes: walk, cycle, taxi, self-drive-car, others-drive-car, motorcycle, truck. At present, only walk and cycle are supported. The distances are in metres. The speed is relative to normal (=100%). For this mode, AdditionalTime is additional time. |
|
||
ojp:/Params | 0:1 | The parameters |
|
Params
Element | Cardinality | Description | Example | ||
ojp:PtModeFilter | 0:1 | Filter by mode. The Exclude element indicates whether the modes are to be included or excluded.
1:* modes can be added. See PtModeFilter under Trip Service |
|
||
ojp:LineFilter | 0:1 | Filter by line. The Exclude element indicates whether the lines are to be included or excluded.
1:* Line can be added. |
|
||
ojp:OperatorFilter | Filter by operator. The Exclude element indicates whether the operators are to be included or excluded.
1:* OperatorRef can be added. |
|
|||
ojp:NumberOfResults | 0:1 | Quantity of results |
|
||
ojp:StopEventType | 0:1 | Type of StopEvents:
|
|
||
ojp:IncludePreviousCalls | 0:1 | Show the previous stops for the individual trips as well? |
|
||
ojp:IncludeOnwardCalls | 0:1 | Show the subsequent stops for the individual trips as well? |
|
||
ojp:IncludeOperatingDays | 0:1 | Include operating day information for this Stopevent too? |
|
||
ojp:IncludeRealtimeData | 0:1 | Use the real-time data to calculate the trip? |
|
Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 |
<?xml version="1.0" encoding="UTF-8"?> <siri:OJP xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:siri="http://www.siri.org.uk/siri" version="1.0" xmlns:ojp="http://www.vdv.de/ojp" xsi:schemaLocation="http://www.siri.org.uk/siri ../ojp-xsd-v1.0/OJP.xsd"> <siri:OJPResponse> <siri:ServiceDelivery> <siri:ResponseTimestamp>2020-01-12T22:27:13Z</siri:ResponseTimestamp> <siri:ProducerRef>OJPCH_test</siri:ProducerRef> <siri:Status>true</siri:Status> <ojp:OJPStopEventDelivery> <siri:ResponseTimestamp>2020-01-12T22:27:13Z</siri:ResponseTimestamp> <siri:RequestMessageRef>756</siri:RequestMessageRef> <siri:Status>true</siri:Status> <ojp:CalcTime>310</ojp:CalcTime> <ojp:StopEventResponseContext> <ojp:Places> <ojp:Location> <ojp:StopPlace> <ojp:StopPlaceRef>8530813</ojp:StopPlaceRef> <ojp:StopPlaceName> <ojp:Text>Zürich Kreuzplatz</ojp:Text> </ojp:StopPlaceName> <ojp:TopographicPlaceRef>-1:-1</ojp:TopographicPlaceRef> </ojp:StopPlace> <ojp:LocationName> <ojp:Text xml:lang="de">Zürich Kreuzplatz</ojp:Text> </ojp:LocationName> <ojp:GeoPosition/> </ojp:Location> <ojp:Location> <ojp:StopPoint> <siri:StopPointRef>8530813</siri:StopPointRef> <ojp:StopPointName> <ojp:Text>Zürich Kreuzplatz</ojp:Text> </ojp:StopPointName> <ojp:ParentRef>8530813</ojp:ParentRef> <ojp:TopographicPlaceRef>-1:-1</ojp:TopographicPlaceRef> </ojp:StopPoint> <ojp:LocationName> <ojp:Text xml:lang="de">Zürich Kreuzplatz</ojp:Text> </ojp:LocationName> <ojp:GeoPosition> <siri:Longitude>8.55408</siri:Longitude> <siri:Latitude>47.36488</siri:Latitude> </ojp:GeoPosition> </ojp:Location> <!--- and so on ---> </ojp:Places> </ojp:StopEventResponseContext> <ojp:StopEventResult> <ojp:ResultId>ID-61BB1C56-4F28-410A-9D03-298D9BF9165C</ojp:ResultId> <ojp:StopEvent> <ojp:PreviousCall> <ojp:CallAtStop> <siri:StopPointRef>8591228</siri:StopPointRef> <ojp:StopPointName> <ojp:Text>Zürich, Kienastenwies</ojp:Text> </ojp:StopPointName> <ojp:ServiceDeparture> <ojp:TimetabledTime>2020-01-12T12:42:00Z</ojp:TimetabledTime> </ojp:ServiceDeparture> <ojp:Order>1</ojp:Order> </ojp:CallAtStop> </ojp:PreviousCall> <!--- and so on ---> <ojp:ThisCall> <ojp:CallAtStop> <siri:StopPointRef>8530813</siri:StopPointRef> <ojp:StopPointName> <ojp:Text>Zürich Kreuzplatz</ojp:Text> </ojp:StopPointName> <ojp:ServiceArrival> <ojp:TimetabledTime>2020-01-12T12:56:00Z</ojp:TimetabledTime> </ojp:ServiceArrival> <ojp:Order>14</ojp:Order> </ojp:CallAtStop> </ojp:ThisCall> <ojp:OnwardCall> <ojp:CallAtStop> <siri:StopPointRef>8591375</siri:StopPointRef> <ojp:StopPointName> <ojp:Text>Zürich, Sprecherstrasse</ojp:Text> </ojp:StopPointName> <ojp:ServiceArrival> <ojp:TimetabledTime>2020-01-12T12:56:00Z</ojp:TimetabledTime> </ojp:ServiceArrival> <ojp:ServiceDeparture> <ojp:TimetabledTime>2020-01-12T12:56:00Z</ojp:TimetabledTime> </ojp:ServiceDeparture> <ojp:Order>15</ojp:Order> </ojp:CallAtStop> </ojp:OnwardCall> <!--- and so on ---> <ojp:Service> <ojp:OperatingDayRef></ojp:OperatingDayRef> <ojp:JourneyRef>sbb:92031::R:j20:21060</ojp:JourneyRef> <siri:LineRef>sbb:92031::R</siri:LineRef> <siri:DirectionRef>H</siri:DirectionRef> <ojp:Mode> <ojp:PtMode>bus</ojp:PtMode> <siri:BusSubmode>regionalBus</siri:BusSubmode> <ojp:Name> <ojp:Text xml:lang="de">Bus</ojp:Text> </ojp:Name> </ojp:Mode> <ojp:PublishedLineName> <ojp:Text>31</ojp:Text> </ojp:PublishedLineName> <ojp:OperatorRef>sbb:849:VerkehrsbetriebeZrich</ojp:OperatorRef> <ojp:Attribute> <ojp:Text> <ojp:Text xml:lang="de">Linie 31: Niederflureinstieg</ojp:Text> </ojp:Text> <ojp:Code>30</ojp:Code> <ojp:Mandatory>false</ojp:Mandatory> </ojp:Attribute> <ojp:OriginStopPointRef>8591228</ojp:OriginStopPointRef> <ojp:OriginText> <ojp:Text xml:lang="de">Zürich, Kienastenwies</ojp:Text> </ojp:OriginText> <ojp:DestinationStopPointRef>8591056</ojp:DestinationStopPointRef> <ojp:DestinationText> <ojp:Text xml:lang="de">Zürich Altstetten, Bahnhof</ojp:Text> </ojp:DestinationText> </ojp:Service> </ojp:StopEvent> </ojp:StopEventResult> </ojp:OJPStopEventDelivery> </siri:ServiceDelivery> </siri:OJPResponse> </siri:OJP> |
Please note that sometimes not only the relevant information for the selected stop is included but all the trip information. The answer is packed into an ojp:OJPStopEventDelivery.
Element | Cardinality | Description | Example | ||
siri:ResponseTimestamp | 1:1 | The timestamp of the response |
|
||
siri:RequesteMessageRef | 0:1 | Reference to the request message |
|
||
siri:Status | 1:1 | The status of the response; true means that the request has been processed. |
|
||
ojp:CalcTime | 1:1 | The calculation time in milliseconds |
|
||
ojp:StopEventResponseContext | 1:1 | Returns the reference information, such as the stops specified.
See separate table |
|||
ojp:StopEventResult | 0:n | The actual results | |||
ojp:StopEventResult/ojp:StopEventResultID | 1:1 | The ID of the result |
|
||
ojp:StopEventResult/ojp:StopEvent | 1:1 | The individual trips
See separate table |
StopEventResponseContext
The context contains
- Location(s)
- Situation(s) not yet implemented
Element | Cardinality | Description | Example | ||
ojp:StopPlace | 1:1 | ||||
ojp:StopPlace/ojp:StopPlaceRef | 1:1 | The reference to the stop. This is currently the DiDok number. However, it could also be the NeTEx ID of a StopPlace or, in future, a Swiss Location ID (SLOID). For now, there are close links between the three references. |
|
||
ojp:StopPlace/ojp:StopPlaceName | 1:1 | The name of the stop. There is currently no language for stops. |
|
||
ojp:StopPlace/ojp:TopographicPlaceRef | 1:1 | This is a reference in the location tree.
Because the location tree is not published, this feature can only be used if it has been requested beforehand in a LocationInformationRequest. |
|
||
ojp:StopPlace/ojp:LocationName | 1:1 | Name of the location |
|
||
ojp:StopPlace/ojp:GeoPosition | 1:1 | WGS84 coordinates |
|
ojp:StopEvent
Das StopEvent besteht aus:
- The StopEvent consists of:
- ojp:PreviousCall(s): If parameters were set
- ojp:ThisCall: The currently selected stop
- ojp:OnwardCall(s): Subsequent stops on the trip
- ojp:Service: Information about the trip
Element | Cardinality | Description | Example | ||
ojp:PreviousCall | 0:* | The PreviousCall element contains all the stops before the one that was requested.
All the information is contained in a CallAtStop. See relevant section |
|
||
ojp:ThisCall | 1:1 | This is the stop to which the request refers.
All the information is contained in a CallAtStop. See relevant section |
|
||
ojp:OnwardCall | 0:* | The OnwardCall element contains the stops after the current stop that was specified in the request.
All the information is contained in a CallAtStop. See relevant section |
|
||
ojp:Service | 1:1 | The service returns the actual information about the entire trip. |
|
ojp:CallAtStop
Element | Cardinality | Description | Example | ||
siri:StopPointRef | 1:1 | The stop number. This is currently the DiDok number. However, it could also be a NeTEx ID or a SLOID. |
|
||
ojp:StopPointName | 1:1 | The name of the stop |
|
||
ojp:PlannedQuay | 0:1 | The planned platform |
|
||
ojp:EstimatedQuay | 0:1 | The actual platform, if available |
|
||
ojp:ServiceArrival | 0:1 | The first stop has no arrival. |
|
||
ojp:ServiceDeparture | 0:1 |
|
|||
ojp:Order | 1:1 | The sequence of the stops |
|
||
ojp:RequestStop | 0:1 | Whether the vehicle journey calls at this stop only on demand. Boolean.
Planned for a future release |
n/a | ||
ojp:UnplannedStop | 0:1 | An unscheduled stop that had not been published in the timetable. Boolean.
Planned for a future release |
n/a | ||
ojp:NotServicedStop | 0:1 | The vehicle didn’t call at a planned stop. |
|
||
ojp:SituationFullRef | 0:1 | This feature is not available. | n/a |
ojp:Service
Element | Cardinality | Description | Example | Example | |
ojp:OperatingDayRef | 1:1 | The relevant operating day |
|
||
ojp:JourneyRef | 1:1 | The ID of the trip. |
|
||
siri:LineRef | 1:1 | The ID of the line: |
|
||
siri:DirectionRef | 1:1 | The ID of the direction. |
|
||
ojp:Mode | 1:1 | The transport mode.
The list of modes can be found at LocationInformationRequest |
|
||
ojp:PublishedLineName | 1:1 | The published name of the list |
|
||
ojp:OperatorRef | 0:1 | The reference to the operator. |
|
||
ojp:Attribute | 0:* | Attributes are properties, mostly relating to trips. For example: low-floor bus, reservation required.
ojp:Mandatory is true if the attribute must be displayed to the user. |
|
||
ojp:OrginStopPointRef | 0:1 | The Didok number of the starting point.
Please note: The ID will still change. |
|
||
ojp:OriginText | 0:1 | The name of the departure stop. |
|
||
ojp:DestinationStopPointRef | 0:1 | The DiDok number of the destination stop. |
|
||
ojp:DestinationText | 0:1 | The name of the destination stop. |
|
||
ojp:Unplanned | 0:1 | Whether the journey is an additional one that has not been planned. Boolean. |
|
||
ojp:Cancelled | 0:1 | Whether the journey has been cancelled. Boolean. |
|
||
ojp:Deviation | 0:1 | Whether the journey deviates from the scheduled journey. Boolean.
Planned for a future version. |
n/a | ||
ojp:BookingArrangements | 0:1 | This feature is not supported. | n/a | ||
ojp:ParticipantRef | 1:1 | Used to communicate disturbances or other extraordinary events.
Planned for a future version. |
n/a | ||
ojp:SituationNumber | 1:1 | Used to communicate disturbances or other extraordinary events.
Planned for a future version. |
n/a |
Special cases:
Car tunnelling trains
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
<siri: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="1.0"> <siri:OJPRequest> <siri:ServiceRequest> <siri:RequestTimestamp>2024-07-22T10:40:16.970Z</siri:RequestTimestamp> <siri:RequestorRef>OJP_JS_SDK_v0.9.35</siri:RequestorRef> <OJPStopEventRequest> <siri:RequestTimestamp>2024-07-22T10:40:16.970Z</siri:RequestTimestamp> <Location> <PlaceRef> <StopPlaceRef>8519606</StopPlaceRef> <LocationName> <Text/> </LocationName> </PlaceRef> <DepArrTime>2024-07-22T10:40:02.237Z</DepArrTime> </Location> <Params> <NumberOfResults>10</NumberOfResults> <StopEventType>departure</StopEventType> <IncludePreviousCalls>true</IncludePreviousCalls> <IncludeOnwardCalls>true</IncludeOnwardCalls> <IncludeRealtimeData>true</IncludeRealtimeData> </Params> <siri:Extensions> <ParamsExtension> <PrivateModeFilter> <Exclude>false</Exclude> </PrivateModeFilter> </ParamsExtension> </siri:Extensions> </OJPStopEventRequest> </siri:ServiceRequest> </siri:OJPRequest> </siri:OJP> |
Large-volume profiles (on the BLS) can be recognised by the GF attribute:
1 2 3 4 5 6 |
<ojp:Attribute> <ojp:Text> <ojp:Text xml:lang="de">Grossraumprofil</ojp:Text> </ojp:Text> <ojp:Code>A__GF</ojp:Code> </ojp:Attribute> |