A query of public transport prices via NOVA is made available via this interface.
This is an initial test system and the data comes from integration and not from production.
(Timetable)
Technical description
The OJP fare service allows you to calculate the price of trips. The service can be used to carry out queries in OJP format against the NOVA. The answers also include discount trips. The enquiry must be made in the future. The journeys must be entered as TripResult.
Price enquiries are only possible in Switzerland. Price enquiries with Half Fare Travelcard (“HTA”) are possible.
The price information is not binding. The actual price is not defined until the order is placed.
The number of requests is also limited.
Technical aspects
At the moment, only the integration system is available.
URL: https://api.opentransportdata.swiss/ojpfare/
Access is only possible using the API key. See: Developer Dashboard | Open Data Platform Mobility Switzerland (opentransportdata.swiss)
The service also allows you to send OJPTripRequests and then obtain the necessary TripResults for the query.
Example: OJPTripRequest within Bern
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 |
<OJP xmlns="http://www.siri.org.uk/siri" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ojp="http://www.vdv.de/ojp" xsi:schemaLocation="http://www.siri.org.uk/siri ../ojp-xsd-v1.0/OJP.xsd" version="1.0"> <OJPRequest> <ServiceRequest> <RequestorRef>OJP SDK v1.0</RequestorRef> <RequestTimestamp>2023-09-04T11:00:53.285Z</RequestTimestamp> <ojp:OJPTripRequest> <RequestTimestamp>2023-09-04T11:00:53.285Z</RequestTimestamp> <ojp:Origin> <ojp:PlaceRef> <StopPointRef>8576990</StopPointRef> <ojp:LocationName> <ojp:Text>Bern, Guisanplatz Expo (Bern)</ojp:Text> </ojp:LocationName> </ojp:PlaceRef> </ojp:Origin> <ojp:Destination> <ojp:PlaceRef> <StopPointRef>8571359</StopPointRef> <ojp:LocationName> <ojp:Text>Bern, Länggasse (Bern)</ojp:Text> </ojp:LocationName> </ojp:PlaceRef> </ojp:Destination> <ojp:Params> <ojp:NumberOfResultsAfter>5</ojp:NumberOfResultsAfter> <ojp:IncludeTrackSections>true</ojp:IncludeTrackSections> <ojp:IncludeLegProjection>true</ojp:IncludeLegProjection> <ojp:IncludeTurnDescription>true</ojp:IncludeTurnDescription> <ojp:IncludeIntermediateStops>true</ojp:IncludeIntermediateStops> </ojp:Params> </ojp:OJPTripRequest> </ServiceRequest> </OJPRequest> </OJP> |
A TripResult in the answer:
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 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 |
<ojp:TripResult> <ojp:ResultId>ID-52F8DE3F-2A4D-45F7-A432-017FD41A62D6</ojp:ResultId> <ojp:Trip> <ojp:TripId>ID-52F8DE3F-2A4D-45F7-A432-017FD41A62D6</ojp:TripId> <ojp:Duration>PT22M</ojp:Duration> <ojp:StartTime>2023-10-02T12:22:30Z</ojp:StartTime> <ojp:EndTime>2023-10-02T12:44:00Z</ojp:EndTime> <ojp:Transfers>2</ojp:Transfers> <ojp:Distance>5738</ojp:Distance> <ojp:TripLeg> <ojp:LegId>1</ojp:LegId> <ojp:TimedLeg> <ojp:LegBoard> <StopPointRef>8576990</StopPointRef> <ojp:StopPointName> <ojp:Text xmlns:xml="http://www.w3.org/XML/1998/namespace" xml:lang="de">Bern, Guisanplatz Expo</ojp:Text> </ojp:StopPointName> <ojp:PlannedQuay> <ojp:Text xmlns:xml="http://www.w3.org/XML/1998/namespace" xml:lang="de">E</ojp:Text> </ojp:PlannedQuay> <ojp:ServiceDeparture> <ojp:TimetabledTime>2023-10-02T12:22:30Z</ojp:TimetabledTime> </ojp:ServiceDeparture> <ojp:Order>1</ojp:Order> </ojp:LegBoard> <ojp:LegIntermediates> <StopPointRef>8576991</StopPointRef> <ojp:StopPointName> <ojp:Text xmlns:xml="http://www.w3.org/XML/1998/namespace" xml:lang="de">Bern, Kasernenstrasse</ojp:Text> </ojp:StopPointName> <ojp:ServiceArrival> <ojp:TimetabledTime>2023-10-02T12:23:30Z</ojp:TimetabledTime> </ojp:ServiceArrival> <ojp:ServiceDeparture> <ojp:TimetabledTime>2023-10-02T12:23:30Z</ojp:TimetabledTime> </ojp:ServiceDeparture> <ojp:Order>2</ojp:Order> </ojp:LegIntermediates> <ojp:LegAlight> <StopPointRef>8587485</StopPointRef> <ojp:StopPointName> <ojp:Text xmlns:xml="http://www.w3.org/XML/1998/namespace" xml:lang="de">Bern, Rosengarten</ojp:Text> </ojp:StopPointName> <ojp:ServiceArrival> <ojp:TimetabledTime>2023-10-02T12:25:00Z</ojp:TimetabledTime> </ojp:ServiceArrival> <ojp:Order>3</ojp:Order> </ojp:LegAlight> <ojp:Service> <ojp:OperatingDayRef>2023-10-02</ojp:OperatingDayRef> <ojp:JourneyRef>ojp:92040::H:j23:445:42369</ojp:JourneyRef> <LineRef>ojp:92040:</LineRef> <DirectionRef>H</DirectionRef> <ojp:Mode> <ojp:PtMode>bus</ojp:PtMode> <BusSubmode>localBusService</BusSubmode> <ojp:Name> <ojp:Text xmlns:xml="http://www.w3.org/XML/1998/namespace" xml:lang="de">Bus</ojp:Text> </ojp:Name> <ojp:ShortName> <ojp:Text xmlns:xml="http://www.w3.org/XML/1998/namespace" xml:lang="de">B</ojp:Text> </ojp:ShortName> </ojp:Mode> <ojp:PublishedLineName> <ojp:Text xmlns:xml="http://www.w3.org/XML/1998/namespace" xml:lang="de">40</ojp:Text> </ojp:PublishedLineName> <ojp:OperatorRef>ojp:850</ojp:OperatorRef> <ojp:DestinationStopPointRef>8577024</ojp:DestinationStopPointRef> <ojp:DestinationText> <ojp:Text xmlns:xml="http://www.w3.org/XML/1998/namespace" xml:lang="de">Allmendingen b. B., K�serei</ojp:Text> </ojp:DestinationText> </ojp:Service> </ojp:TimedLeg> </ojp:TripLeg> <ojp:TripLeg> <ojp:LegId>2</ojp:LegId> <ojp:TransferLeg> <ojp:TransferMode>walk</ojp:TransferMode> <ojp:LegStart> <StopPointRef>8587485</StopPointRef> <ojp:LocationName> <ojp:Text xmlns:xml="http://www.w3.org/XML/1998/namespace" xml:lang="de">Bern, Rosengarten</ojp:Text> </ojp:LocationName> </ojp:LegStart> <ojp:LegEnd> <StopPointRef>8587485</StopPointRef> <ojp:LocationName> <ojp:Text xmlns:xml="http://www.w3.org/XML/1998/namespace" xml:lang="de">Bern, Rosengarten</ojp:Text> </ojp:LocationName> </ojp:LegEnd> <ojp:TimeWindowStart>2023-10-02T12:25:00Z</ojp:TimeWindowStart> <ojp:TimeWindowEnd>2023-10-02T12:27:36Z</ojp:TimeWindowEnd> <ojp:Duration>PT3M</ojp:Duration> <ojp:WalkDuration>PT1M</ojp:WalkDuration> <ojp:BufferTime>PT1M</ojp:BufferTime> </ojp:TransferLeg> </ojp:TripLeg> <ojp:TripLeg> <ojp:LegId>3</ojp:LegId> <ojp:TimedLeg> <ojp:LegBoard> <StopPointRef>8587485</StopPointRef> <ojp:StopPointName> <ojp:Text xmlns:xml="http://www.w3.org/XML/1998/namespace" xml:lang="de">Bern, Rosengarten</ojp:Text> </ojp:StopPointName> <ojp:ServiceDeparture> <ojp:TimetabledTime>2023-10-02T12:27:36Z</ojp:TimetabledTime> <ojp:EstimatedTime>2023-10-02T12:27:36Z</ojp:EstimatedTime> </ojp:ServiceDeparture> <ojp:Order>1</ojp:Order> </ojp:LegBoard> <ojp:LegIntermediates> <StopPointRef>8587484</StopPointRef> <ojp:StopPointName> <ojp:Text xmlns:xml="http://www.w3.org/XML/1998/namespace" xml:lang="de">Bern, Sch�nburg</ojp:Text> </ojp:StopPointName> <ojp:ServiceArrival> <ojp:TimetabledTime>2023-10-02T12:28:42Z</ojp:TimetabledTime> <ojp:EstimatedTime>2023-10-02T12:28:42Z</ojp:EstimatedTime> </ojp:ServiceArrival> <ojp:ServiceDeparture> <ojp:TimetabledTime>2023-10-02T12:28:42Z</ojp:TimetabledTime> <ojp:EstimatedTime>2023-10-02T12:28:42Z</ojp:EstimatedTime> </ojp:ServiceDeparture> <ojp:Order>2</ojp:Order> </ojp:LegIntermediates> <ojp:LegIntermediates> <StopPointRef>8587483</StopPointRef> <ojp:StopPointName> <ojp:Text xmlns:xml="http://www.w3.org/XML/1998/namespace" xml:lang="de">Bern, Salem</ojp:Text> </ojp:StopPointName> <ojp:ServiceArrival> <ojp:TimetabledTime>2023-10-02T12:29:30Z</ojp:TimetabledTime> <ojp:EstimatedTime>2023-10-02T12:29:30Z</ojp:EstimatedTime> </ojp:ServiceArrival> <ojp:ServiceDeparture> <ojp:TimetabledTime>2023-10-02T12:29:30Z</ojp:TimetabledTime> <ojp:EstimatedTime>2023-10-02T12:29:30Z</ojp:EstimatedTime> </ojp:ServiceDeparture> <ojp:Order>3</ojp:Order> </ojp:LegIntermediates> <ojp:LegIntermediates> <StopPointRef>8590021</StopPointRef> <ojp:StopPointName> <ojp:Text xmlns:xml="http://www.w3.org/XML/1998/namespace" xml:lang="de">Bern, Viktoriaplatz</ojp:Text> </ojp:StopPointName> <ojp:PlannedQuay> <ojp:Text xmlns:xml="http://www.w3.org/XML/1998/namespace" xml:lang="de">C</ojp:Text> </ojp:PlannedQuay> <ojp:ServiceArrival> <ojp:TimetabledTime>2023-10-02T12:30:30Z</ojp:TimetabledTime> <ojp:EstimatedTime>2023-10-02T12:30:30Z</ojp:EstimatedTime> </ojp:ServiceArrival> <ojp:ServiceDeparture> <ojp:TimetabledTime>2023-10-02T12:30:30Z</ojp:TimetabledTime> <ojp:EstimatedTime>2023-10-02T12:30:30Z</ojp:EstimatedTime> </ojp:ServiceDeparture> <ojp:Order>4</ojp:Order> </ojp:LegIntermediates> <ojp:LegIntermediates> <StopPointRef>8507110</StopPointRef> <ojp:StopPointName> <ojp:Text xmlns:xml="http://www.w3.org/XML/1998/namespace" xml:lang="de">Bern, Zytglogge</ojp:Text> </ojp:StopPointName> <ojp:PlannedQuay> <ojp:Text xmlns:xml="http://www.w3.org/XML/1998/namespace" xml:lang="de">A</ojp:Text> </ojp:PlannedQuay> <ojp:ServiceArrival> <ojp:TimetabledTime>2023-10-02T12:32:54Z</ojp:TimetabledTime> <ojp:EstimatedTime>2023-10-02T12:32:54Z</ojp:EstimatedTime> </ojp:ServiceArrival> <ojp:ServiceDeparture> <ojp:TimetabledTime>2023-10-02T12:32:54Z</ojp:TimetabledTime> <ojp:EstimatedTime>2023-10-02T12:32:54Z</ojp:EstimatedTime> </ojp:ServiceDeparture> <ojp:Order>5</ojp:Order> </ojp:LegIntermediates> <ojp:LegIntermediates> <StopPointRef>8590048</StopPointRef> <ojp:StopPointName> <ojp:Text xmlns:xml="http://www.w3.org/XML/1998/namespace" xml:lang="de">Bern, Bundesplatz</ojp:Text> </ojp:StopPointName> <ojp:ServiceArrival> <ojp:TimetabledTime>2023-10-02T12:34:24Z</ojp:TimetabledTime> <ojp:EstimatedTime>2023-10-02T12:34:24Z</ojp:EstimatedTime> </ojp:ServiceArrival> <ojp:ServiceDeparture> <ojp:TimetabledTime>2023-10-02T12:34:24Z</ojp:TimetabledTime> <ojp:EstimatedTime>2023-10-02T12:34:24Z</ojp:EstimatedTime> </ojp:ServiceDeparture> <ojp:Order>6</ojp:Order> </ojp:LegIntermediates> <ojp:LegAlight> <StopPointRef>8576646</StopPointRef> <ojp:StopPointName> <ojp:Text xmlns:xml="http://www.w3.org/XML/1998/namespace" xml:lang="de">Bern, Bahnhof</ojp:Text> </ojp:StopPointName> <ojp:PlannedQuay> <ojp:Text xmlns:xml="http://www.w3.org/XML/1998/namespace" xml:lang="de">I</ojp:Text> </ojp:PlannedQuay> <ojp:ServiceArrival> <ojp:TimetabledTime>2023-10-02T12:35:30Z</ojp:TimetabledTime> <ojp:EstimatedTime>2023-10-02T12:35:36Z</ojp:EstimatedTime> </ojp:ServiceArrival> <ojp:Order>7</ojp:Order> </ojp:LegAlight> <ojp:Service> <ojp:OperatingDayRef>2023-10-02</ojp:OperatingDayRef> <ojp:JourneyRef>ojp:92010::R:j23:3656:17878</ojp:JourneyRef> <LineRef>ojp:92010:</LineRef> <DirectionRef>R</DirectionRef> <ojp:Mode> <ojp:PtMode>bus</ojp:PtMode> <BusSubmode>localBusService</BusSubmode> <ojp:Name> <ojp:Text xmlns:xml="http://www.w3.org/XML/1998/namespace" xml:lang="de">Bus</ojp:Text> </ojp:Name> <ojp:ShortName> <ojp:Text xmlns:xml="http://www.w3.org/XML/1998/namespace" xml:lang="de">B</ojp:Text> </ojp:ShortName> </ojp:Mode> <ojp:PublishedLineName> <ojp:Text xmlns:xml="http://www.w3.org/XML/1998/namespace" xml:lang="de">10</ojp:Text> </ojp:PublishedLineName> <ojp:OperatorRef>ojp:827</ojp:OperatorRef> <ojp:Attribute> <ojp:Text> <ojp:Text xmlns:xml="http://www.w3.org/XML/1998/namespace" xml:lang="de">VELOS: Platzzahl eingeschr�nkt</ojp:Text> </ojp:Text> <ojp:Code>A__VB</ojp:Code> </ojp:Attribute> <ojp:Attribute> <ojp:Text> <ojp:Text xmlns:xml="http://www.w3.org/XML/1998/namespace" xml:lang="de">Niederflureinstieg</ojp:Text> </ojp:Text> <ojp:Code>A__NF</ojp:Code> <AccessFacility>palletAccess_lowFloor</AccessFacility> </ojp:Attribute> <ojp:DestinationStopPointRef>8595932</ojp:DestinationStopPointRef> <ojp:DestinationText> <ojp:Text xmlns:xml="http://www.w3.org/XML/1998/namespace" xml:lang="de">Schliern, Bus-Endstation</ojp:Text> </ojp:DestinationText> </ojp:Service> </ojp:TimedLeg> </ojp:TripLeg> <ojp:TripLeg> <ojp:LegId>4</ojp:LegId> <ojp:TransferLeg> <ojp:TransferMode>walk</ojp:TransferMode> <ojp:LegStart> <StopPointRef>8576646</StopPointRef> <ojp:LocationName> <ojp:Text xmlns:xml="http://www.w3.org/XML/1998/namespace" xml:lang="de">Bern, Bahnhof</ojp:Text> </ojp:LocationName> </ojp:LegStart> <ojp:LegEnd> <StopPointRef>8576646</StopPointRef> <ojp:LocationName> <ojp:Text xmlns:xml="http://www.w3.org/XML/1998/namespace" xml:lang="de">Bern, Bahnhof</ojp:Text> </ojp:LocationName> </ojp:LegEnd> <ojp:TimeWindowStart>2023-10-02T12:35:36Z</ojp:TimeWindowStart> <ojp:TimeWindowEnd>2023-10-02T12:37:48Z</ojp:TimeWindowEnd> <ojp:Duration>PT3M</ojp:Duration> <ojp:WalkDuration>PT2M</ojp:WalkDuration> <ojp:BufferTime>PT0M</ojp:BufferTime> </ojp:TransferLeg> </ojp:TripLeg> <ojp:TripLeg> <ojp:LegId>5</ojp:LegId> <ojp:TimedLeg> <ojp:LegBoard> <StopPointRef>8576646</StopPointRef> <ojp:StopPointName> <ojp:Text xmlns:xml="http://www.w3.org/XML/1998/namespace" xml:lang="de">Bern, Bahnhof</ojp:Text> </ojp:StopPointName> <ojp:PlannedQuay> <ojp:Text xmlns:xml="http://www.w3.org/XML/1998/namespace" xml:lang="de">F</ojp:Text> </ojp:PlannedQuay> <ojp:ServiceDeparture> <ojp:TimetabledTime>2023-10-02T12:37:48Z</ojp:TimetabledTime> </ojp:ServiceDeparture> <ojp:Order>1</ojp:Order> </ojp:LegBoard> <ojp:LegIntermediates> <StopPointRef>8581351</StopPointRef> <ojp:StopPointName> <ojp:Text xmlns:xml="http://www.w3.org/XML/1998/namespace" xml:lang="de">Bern, Schanzenstrasse</ojp:Text> </ojp:StopPointName> <ojp:ServiceArrival> <ojp:TimetabledTime>2023-10-02T12:39:42Z</ojp:TimetabledTime> </ojp:ServiceArrival> <ojp:ServiceDeparture> <ojp:TimetabledTime>2023-10-02T12:39:42Z</ojp:TimetabledTime> </ojp:ServiceDeparture> <ojp:Order>2</ojp:Order> </ojp:LegIntermediates> <ojp:LegIntermediates> <StopPointRef>8571357</StopPointRef> <ojp:StopPointName> <ojp:Text xmlns:xml="http://www.w3.org/XML/1998/namespace" xml:lang="de">Bern, Universit�t</ojp:Text> </ojp:StopPointName> <ojp:ServiceArrival> <ojp:TimetabledTime>2023-10-02T12:41:18Z</ojp:TimetabledTime> </ojp:ServiceArrival> <ojp:ServiceDeparture> <ojp:TimetabledTime>2023-10-02T12:41:18Z</ojp:TimetabledTime> </ojp:ServiceDeparture> <ojp:Order>3</ojp:Order> </ojp:LegIntermediates> <ojp:LegIntermediates> <StopPointRef>8571358</StopPointRef> <ojp:StopPointName> <ojp:Text xmlns:xml="http://www.w3.org/XML/1998/namespace" xml:lang="de">Bern, Mittelstrasse</ojp:Text> </ojp:StopPointName> <ojp:ServiceArrival> <ojp:TimetabledTime>2023-10-02T12:42:42Z</ojp:TimetabledTime> </ojp:ServiceArrival> <ojp:ServiceDeparture> <ojp:TimetabledTime>2023-10-02T12:42:42Z</ojp:TimetabledTime> </ojp:ServiceDeparture> <ojp:Order>4</ojp:Order> </ojp:LegIntermediates> <ojp:LegIntermediates> <StopPointRef>8590038</StopPointRef> <ojp:StopPointName> <ojp:Text xmlns:xml="http://www.w3.org/XML/1998/namespace" xml:lang="de">Bern, Unitobler</ojp:Text> </ojp:StopPointName> <ojp:ServiceArrival> <ojp:TimetabledTime>2023-10-02T12:43:48Z</ojp:TimetabledTime> </ojp:ServiceArrival> <ojp:ServiceDeparture> <ojp:TimetabledTime>2023-10-02T12:43:48Z</ojp:TimetabledTime> </ojp:ServiceDeparture> <ojp:Order>5</ojp:Order> </ojp:LegIntermediates> <ojp:LegAlight> <StopPointRef>8571359</StopPointRef> <ojp:StopPointName> <ojp:Text xmlns:xml="http://www.w3.org/XML/1998/namespace" xml:lang="de">Bern, L�nggasse</ojp:Text> </ojp:StopPointName> <ojp:ServiceArrival> <ojp:TimetabledTime>2023-10-02T12:44:42Z</ojp:TimetabledTime> </ojp:ServiceArrival> <ojp:Order>6</ojp:Order> </ojp:LegAlight> <ojp:Service> <ojp:OperatingDayRef>2023-10-02</ojp:OperatingDayRef> <ojp:JourneyRef>ojp:92020::R:j23:2215:31326</ojp:JourneyRef> <LineRef>ojp:92020:</LineRef> <DirectionRef>R</DirectionRef> <ojp:Mode> <ojp:PtMode>bus</ojp:PtMode> <BusSubmode>localBusService</BusSubmode> <ojp:Name> <ojp:Text xmlns:xml="http://www.w3.org/XML/1998/namespace" xml:lang="de">Bus</ojp:Text> </ojp:Name> <ojp:ShortName> <ojp:Text xmlns:xml="http://www.w3.org/XML/1998/namespace" xml:lang="de">B</ojp:Text> </ojp:ShortName> </ojp:Mode> <ojp:PublishedLineName> <ojp:Text xmlns:xml="http://www.w3.org/XML/1998/namespace" xml:lang="de">20</ojp:Text> </ojp:PublishedLineName> <ojp:OperatorRef>ojp:827</ojp:OperatorRef> <ojp:Attribute> <ojp:Text> <ojp:Text xmlns:xml="http://www.w3.org/XML/1998/namespace" xml:lang="de">VELOS: Platzzahl eingeschr�nkt</ojp:Text> </ojp:Text> <ojp:Code>A__VB</ojp:Code> </ojp:Attribute> <ojp:Attribute> <ojp:Text> <ojp:Text xmlns:xml="http://www.w3.org/XML/1998/namespace" xml:lang="de">Niederflureinstieg</ojp:Text> </ojp:Text> <ojp:Code>A__NF</ojp:Code> <AccessFacility>palletAccess_lowFloor</AccessFacility> </ojp:Attribute> <ojp:DestinationStopPointRef>8571359</ojp:DestinationStopPointRef> <ojp:DestinationText> <ojp:Text xmlns:xml="http://www.w3.org/XML/1998/namespace" xml:lang="de">Bern, L�nggasse</ojp:Text> </ojp:DestinationText> </ojp:Service> </ojp:TimedLeg> </ojp:TripLeg> </ojp:Trip> </ojp:TripResult> |
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 |
<?xml version="1.0" encoding="UTF-8"?> <OJP xmlns="http://www.siri.org.uk/siri" xmlns:ojp="http://www.vdv.de/ojp" version="1.0"> <OJPRequest> <ServiceRequest> <RequestTimestamp>2023-10-02T11:56:11.714265</RequestTimestamp> <RequestorRef>OJP2NOVA</RequestorRef> <ojp:OJPFareRequest> <RequestTimestamp>2023-10-02T11:56:11.714265</RequestTimestamp> <ojp:TripFareRequest> <ojp:Trip> <!-- add the Trip here --> </ojp:Trip> <!-- multiple trips possible --> </ojp:TripFareRequest> <ojp:Params> <ojp:FareAuthorityFilter>ch:1:NOVA</ojp:FareAuthorityFilter> <ojp:PassengerCategory>Adult</ojp:PassengerCategory> <ojp:TravelClass>second</ojp:TravelClass> <ojp:Traveller> <ojp:Age>25</ojp:Age> <ojp:PassengerCategory>Adult</ojp:PassengerCategory> <ojp:EntitlementProducts> <ojp:EntitlementProduct> <ojp:FareAuthorityRef>ch:1:NOVA</ojp:FareAuthorityRef> <ojp:EntitlementProductRef>HTA</ojp:EntitlementProductRef> <ojp:EntitlementProductName>Halbtax-Abonnement</ojp:EntitlementProductName> </ojp:EntitlementProduct> </ojp:EntitlementProducts> </ojp:Traveller> </ojp:Params> </ojp:OJPFareRequest> </ServiceRequest> </OJPRequest> </OJP> |
Parameter
Trips are explained in OJPTripRequest. Therefore, the parameters are primarily discussed here
Parameter | Explanation | Example |
oFareAuthorityfilter | Currently set to NOVA. Is ignored in the service. | ojp:FareAuthorityFilter>ch:1:NOVA</ojp:FareAuthorityFilter> |
PassengerCategory | PassengerCategory selection list. Ignored at the moment. | <ojp:PassengerCategory>Adult</ojp:PassengerCategory> |
Traveller | More information about the traveller. Ignored at the moment. | |
Age | The age of the traveller. Ignored at the moment. | |
EntitlementProduct | At the moment, only the EntitlementProductRef HTA (half-price subscription) is supported. If this is set, half-fare prices are shown, otherwise the full price. |
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:OJPFareDelivery xmlns="http://www.siri.org.uk/siri" xmlns:ojp="http://www.vdv.de/ojp"> <ResponseTimestamp>2023-10-02T11:56:13.536149</ResponseTimestamp> <Status>true</Status> <ojp:FareResult> <ojp:ResultId>ID-20932163-8A85-4648-80A2-661D2D388361</ojp:ResultId> <ojp:TripFareResult> <ojp:FromTripLegIdRef>2</ojp:FromTripLegIdRef> <ojp:ToTripLegIdRef>2</ojp:ToTripLegIdRef> <ojp:FareProduct> <ojp:FareProductId>10972</ojp:FareProductId> <ojp:FareProductName>10972</ojp:FareProductName> <ojp:FareAuthorityRef>NOVA</ojp:FareAuthorityRef> <ojp:FareAuthorityText>NOVA</ojp:FareAuthorityText> <ojp:Price>2.80</ojp:Price> <ojp:NetPrice>2.58</ojp:NetPrice> <ojp:Currency>CHF</ojp:Currency> <ojp:VatRate>7.7</ojp:VatRate> <ojp:TravelClass>second</ojp:TravelClass> </ojp:FareProduct> </ojp:TripFareResult> <ojp:TripFareResult> <ojp:FromTripLegIdRef>2</ojp:FromTripLegIdRef> <ojp:ToTripLegIdRef>2</ojp:ToTripLegIdRef> <ojp:FareProduct> <ojp:FareProductId>10972</ojp:FareProductId> <ojp:FareProductName>10972</ojp:FareProductName> <ojp:FareAuthorityRef>NOVA</ojp:FareAuthorityRef> <ojp:FareAuthorityText>NOVA</ojp:FareAuthorityText> <ojp:Price>4.80</ojp:Price> <ojp:NetPrice>4.43</ojp:NetPrice> <ojp:Currency>CHF</ojp:Currency> <ojp:VatRate>7.7</ojp:VatRate> <ojp:TravelClass>first</ojp:TravelClass> </ojp:FareProduct> </ojp:TripFareResult> </ojp:FareResult> </ojp:OJPFareDelivery> |
Important points
- The price calculation only works for the future.
- Only public transport legs can be evaluated.
- The price information also includes economy tickets, if they exist. Normal price tickets have the code 125
- If On Demand, Sharing etc. is listed on the trip, the behaviour is not fully defined at the moment. As a matter of principle, we are informed that not all legs could be priced.
Known problems
The error messages are not optimal.
Further information
- All information about the service: openTdataCH/ojp-nova: Interface between OJP and NOVA to return an OJPFareDelivery (github.com)
- The calculation is integrated under Test in OJP Demo – BETA (odpch.ch)