#AutoTranslate
Description rapide
Cette interface met à disposition une consultation des prix des transports publics via NOVA.
Il s’agit d’un premier système de test et les données proviennent de l’intégration et non de la production.
Description métier
Le service OJP fare permet de calculer le prix des Trips. Ce service permet d’effectuer des requêtes au format OJP par rapport à NOVA. Les réponses incluent également les trajets à prix réduit. La requête doit être effectuée dans le futur. Les trajets doivent être indiqués comme TripResult.
La recherche de prix n’est possible qu’en Suisse. La recherche de prix est possible avec un abonnement demi-tarif.
Les informations sur les prix ne sont pas contraignantes. Le prix effectif n’est défini qu’au moment de la commande.
Le nombre de demandes est également limité.
Description technique
Pour le moment, seul le système d’intégration est disponible.
Principales données et interfaces:
URL https://api.opentransportdata.swiss/ojpfare/
L’accès s’effectue uniquement à l’aide de la clé API. Voir: Gestionnaire d’API
Pour les premiers essais, voici un OpenAPI: Explorateur API OJPFare
Le service permet également: OJPTripRequests et d’en tirer les TripResults nécessaires pour la requête.
Données du planificateur de voyage (OJP) et renseignements sur les prix: https://data.opentransportdata.swiss/group/journeyplanner
Renseignements sur les prix:
Exemple: OJPTripRequest à Berne
<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>
Un TripResult dans la réponse:
<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>
L’OJPFareRequest effective se présente alors comme suit (nous n’affichons que la position du Trips et ne la remplissons pas):
<?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>
Paramètres
Les trajets sont OJPTripRequest expliquées. C’est pourquoi nous abordons ici en premier lieu les paramètres
| Paramètres | Explication | Exemple |
|---|---|---|
oFareAuthorityfilter |
Actuellement défini sur NOVA. Est ignoré dans le service. | ojp:FareAuthorityFilter>ch:1:NOVA</ojp:FareAuthorityFilter> |
PassengerCategory |
Liste de sélection. Cet élément est ignoré pour le moment. | <ojp:PassengerCategory>Adult</ojp:PassengerCategory> |
Traveller |
Plus d’informations sur le voyageur. Cette information est ignorée pour le moment. | |
Age |
L’âge du voyageur. Cette information est ignorée pour le moment. | |
EntitlementProduct |
Actuellement, seul l’abonnement demi-tarif EntitlementProductRef (abonnement demi-tarif) est pris en charge.
Une fois coché, les prix du demi-tarif sont indiqués. Sinon, le prix plein est indiqué. |
Le résultat se présente alors comme suit:
<?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>
Points importants
- Le calcul du prix ne fonctionne que pour l’avenir.
- Seuls les legs des transports publics peuvent être évalués.
- L’information sur les prix inclut également les billets dégriffés, s’ils existent. Les billets au prix normal portent le code 125. Par exemple, le BLS utilise le code produit 84004 pour Bern–Zweisimmen.
- Si «On Demand», «Sharing», etc. sont mentionnés dans le Trip, le comportement n’est pour l’instant pas entièrement défini. En principe, il est indiqué que toutes les Legs n’ont pas pu être évaluées.
- Jusqu’à présent, le calcul du demi-tarif était fixe. Aujourd’hui, ce n’est plus le cas. Un Traveler correspondant avec EntitalementProduct est désormais nécessaire.
Problèmes connus
- Actuellement, les données sont extraites de l’environnement d’intégration de NOVA.
- Les messages d’erreur ne sont pas optimaux.
- Actuellement, le prix du demi-tarif (abonnement demi-tarif en tant qu’EntitlementProduct) est encodé de manière fixe dans le service. Nous réfléchissons à la suppression de ce code. Dans ce cas, l’EntitlementProduct doit impérativement être inséré. L’âge est repris. Sinon, le prix est défini sur «Person» (personne).
- Dans certains cas, on passe à un pass journalier. Par exemple, parce qu’il n’y a pas de billet 1re classe. Dans ce cas, il se peut qu’une carte journalière à prix réduit soit disponible sous le code 2361. Il faut filtrer cela.
- Aucun prix n’est indiqué pour les arrêts à l’étranger (p. ex. pas non plus le Léman Express).
Informations complémentaires
- Bloc de données: Bêta: Service de demande de renseignements sur les prix via OJP Fare – Jeu de données – opentransportdata.swiss – CKAN data catalog
- Toutes les informations sur le service: openTdataCH/ojp-nova: Interface between OJP and NOVA to return an OJPFareDelivery (github.com)
- Le calcul est intégré sous Test dans Démo OJP – BETA (odpch.ch/fr)
