Business

Reisadvies API additional documentation

9292 Reisadvies API introduction

The 9292 Reisadvies API offers the opportunity to use the planner engine of 9292 within a website or app to give Public Transport information from address to address with all the public transport in the Netherlands.

This documentation describes the features of the 9292 Reisadvies API and gives general information on how to use them. This information is an addition to the Swagger documentation we provide.

The 9292 Reisadvies API supports both XML and JSON. Knowledge of Web API's, XML and JSON are essential to be able to use this API.

Terms of service

Usage of the 9292 Reisadvies API is prohibited without the approval of 9292.

 

9292 Logo

It is mandatory to show the 9292 Logo. 9292 will give approval on the location of the logo before you transfer to the production environment. This is done to safeguard the usage of the 9292 logo.
The logo can be found at the following URL:

 

Release notes

Software version

Documentation version

Remarks

11-05-2020
v2.6.1

20-01-2020
v1.7.5

  • Added the "plan a journey by bike" and "plan an accessible journey" features to the 9292 Reisadvies API
  • Updated error messages

24-09-2020
v2.7.1

01-09-2020
v1.7.6

  • Added Occupancy data to the 9292 Reisadvies API

08-12-2020
v2.7.2

15-10-2020
v1.7.7

  • Increased the max cycling distance from 20min. to 30min.
  • Updated the CO2 data

22-03-2021
v2.8.0

23-03-2021
v1.7.8

  • Documentation is based on the OpenAPI 3 standard
  • The location search is improved i.e., the matching of search terms to street names which includes numbers and the matching of street names with house numbers is improved
  • Disturbance messages are included in the travel advice
  • Added the following modalities to the planner to be used at the start and/or end of a journey (first mile and last mile): rental bike, electric (rental) bikes, (rental) scooter
  • Added support for customized transport such as the Watertaxi in Rotterdam
  • Added translations for countries, provinces and stop types
  • Added "taxi" to the list of comparative emissions per modality
  • Increased the default bicycle parking time from 2min. to 5min
  • Various bug fixes

26-04-2021
v2.8.1

26-04-2021
v1.7.9

  • Updated the autosuggest to improve the matching of stations and stops with compound names
  • Improved the matching of occupancy data to journey legs
  • Expanded the Disruption model to display more details
  • Various bug fixes

28-06-2021
v2.8.3

 
  • Performance improvement
  • Various bug fixes
29-06-2021 v2.8.4  
  • Two bugfixes related to FareInfo (tariffs)
05-07-2021 v2.8.5   
  • The StationAbbreviation field was incorrectly left blank in the first/last leg of a voyage when scheduling with coordinates.
04-08-2021 v2.9.0  
  • Fix for recognizing travel advice with delays that cause transfers to become infeasible (FatalDelay)
  • Various framework updates
08-09-2021 v2.9.1  
  • Fix for returning an advice with the correct time when the provided time is in the UTC format (2021-08-30T17:00Z) or if it contains a time zone (2021-08-30T:17:00+02:00)
  • Fix for including subscriptions based on CentrumZone and StarZone information (when applicable) as the most economical product (Prijswijzer requests)

11-10-2021 v3.0.1

  Added a new version (v3) which contains the following updates:
  • DateTime-format of all responses have been changed to the ISO 8601 format (e.g. 2021-10-11T13:00:00.000Z)
  • InterchangeTime property of the JourneyRequest has been changed to specify the desired amount of interchange time in minutes
  • Added a unique identifier (“JourneyId”) to each travelling advice
  • Requesting a travelling advice with minimal walking
  • Requesting a travelling advice based on custom travel time and speed configuration
  • Display fare information in a Leg
  • Display route information in a Leg
  • Requesting unimodal travelling advice for private vehicles or walking
  • Requesting locations near a given point (NearByLocations endpoint)
  • Replanning a public transport travelling advice using the unique JourneyId (“PlannedJourneys” endpoint)
  • Moved the requesting of Prijswijzer information to a separate endpoint (“ProductAdvice”)
  • Various bug fixes

22-11-2021 v3.0.2

 
  • Added “Electric Bicycle” and “Moped” to the list of comparative emissions per modality
  • Updated the CO2 data
  • Requests for unimodal travelling advice returns an error message when no appropriate advice could be found instead of returning a multi-modal travelling advice
  • Route information coordinates conform to the “Well Known Text” LineString format
  • FlexOption parameters are marked as “deprecated” because they will be replaced in a future release
  • Various bug fixes

07-12-2021 v3.0.3

 
  • Performance of the travel advice request has been improved

19-01-2022 v3.0.4

 
  • Made input validation messages more explicit
  • Future-proofed the interval travel advice logic

 

API Security

The 9292 Reisadvies API is secured and can only be used when you have been given a Token or a so-called APIKey by 9292. This ‘Token’ exists of symbols and letters, which is provided through a license agreement. This license agreements allows our customers to make requests to our server.
This ‘Token’ should be kept secret and not shared with any other party. In case of misuse 9292 can deactivate your account.

Access token

You will receive a Token via e-mail from the 9292 Servicedesk. The Token is your identification code which gives you access to the acceptance environment of the 9292 Reisadvies API. Once you have completed your implementation and your service has been tested by 9292, you may switch to the production environment. The 9292 Servicedesk will send you a new Token for the production environment.
After transferring to the production environment, the acceptance environment will remain accessible for two weeks.

The Token must be included in the header of each request. Here is an example of a request header:

Header Key

Value

Authorization

Token <MY_TOKEN>

Accept

Application/XML (for JSON use "Application/JSON")

Content-Type

charset=utf-8

Please note:

The 9292 Travel Advice API only supports HTTPS requests.

Tokens are sent to identify a particular customer and thus the tapping of the HTTP stream can be abused. This can result in a higher count in the statistics and a higher invoice.

 

Reisadvies API Basic Features

Validity of data in a public transport travelling advice

The 9292 Reisadvies API makes use of changing data (public transport timetables). This is why only data within the validity date can be used. When a date beyond the validity date is used, the 9292 Reisadvies API will return an error message (400 BadRequest).
The validity can be requested using the Dataset endpoint.

Requesting the Dataset is not counted as an actual request.

 

Requesting locations for a public transport travelling advice

In order to request a location, you will have to call the Locations endpoint of the 9292 Reisadvies API. With a location request, you can get information about a station, place, address, stops or POIs (Point of Interests). A location request will return 25 locations. The first locations will be the stations, then the bus/tram/metro stops, then street names, postal codes, etc.
This Locations endpoint is NOT an autosuggest. However, it is possible to develop your own autosuggest based on this endpoint.

The request of a location is not counted as an actual request.

 

Requesting nearby locations

In order to request locations near a particular point, you will have to call the NearByLocations endpoint with latitude and longitude coordinates or a ‘locationId’. The 9292 Reisadvies API will then retrieve a list of all locations within a 400 metre radius. This list of locations can consist of stations, places, addresses, addresses with house number, stops or point of interests (POI).
You can choose to add filtering to the request to only retrieve locations of a specific type.

The request of nearby locations is not counted as an actual request.

 

Requesting a public transport travelling advice

The Journeys endpoint is used to request a public transport travelling advice. Requesting a travelling advice will return 9 responses. These are advice around the requested time. The number of responses cannot be adjusted.
The FromId, ToId and ViaId must correspond to the ‘Id’ of the location retrieved from the Locations endpoint.

Attributes in a public transport travelling advice

Attributes are data which is sent by a transport company (i.e., NS) that pertains to a (part of the) journey. The Attributes element is not shown in every advice, but only in those where the information is included by the public transport company.

The following table contains examples of possible attributes.

Attribute Id

Attribute value

Description/Remarks

TWEE

alleen 2e klas

The ‘Only 2nd class travel’ Attribute only appears on a small number of trails, namely:


  • Leeuwarden – Harlingen Haven
  • Leeuwarden – Stavoren
  • Zutphen – Hengelo – Oldenzaal
  • Dordrecht - Geldermalen

WCA

Rolstoeltoegankelijk

Is shown when the modality is accessible

SPEC

Speciaal ticket vereist

Usually shown with Intercity Direct & International trains

FINI

fiets meenemen niet mogelijk

Usually shown with Intercity Direct & International trains

RESM

Reserveren mogelijk

Usually shown with Intercity Direct & International trains

TSR

Toeslag Schiphol - Rotterdam

Usually shown with Intercity Direct & International trains

Structure of an attribute

Attributes can be found in the “Attributes” component of a travel advice. The Attributes component consists of zero or more LegAttributes. Here is an example of an Attributes component:

Format

Example

XML

<Attributes>
<LegAttribute>
<Id>TWEE</Id>
<Title>alleen 2e klas</Title>
</LegAttribute>
</Attributes>

JSON

"Attributes": [{
"Id": "TWEE",
"Title": "alleen 2e klas"
}]

 

Unique identification of a public transport travelling advice

Each public transport travelling advice contains a “JourneyId” which is a unique value that can be used to identify a travelling advice.

The following parameter is available to display the JourneyId in a public transport travelling advice:

Parameter

Description (example)

ShowJourneyId true

Here is an example of a partial travel advice response containing a JourneyId:

Format

Example

XML

<Journey>
<Arrival>2021-09-09T16:27:00.0000000Z</Arrival>
<Departure>2021-09-09T15:06:00.0000000Z</Departure>
<DurationMinutes>81</DurationMinutes>
<JourneyId>delft_de-genestetstraat-25~utrecht_catharijnesingel-
39~~0~C02OKFAAS$$OcOjOlOoOsPRAK$$40~~~IC~1~2257~SPR~1~
5148~IC~1~2059~40~~~~dt~gv~gvc~ut~~
</JourneyId>
    <NumberOfChanges>2</NumberOfChanges>
    <Occupancy i:nil="true" />
    <RealtimeArrival i:nil="true" />
    <RealtimeDeparture i:nil="true" />
    ...
</Journey>

JSON

{
    "JourneyId": "delft_de-genestetstraat-25~utrecht_catharijnesingel-
39~~0~C02N8EAAS$$OOOcOnPMAK$$40~~~SPR~1~5157~IC~1~657~
40~~~~dt~rtd~ut~~"
,
"Departure": "2021-09-20T12:52:00.0000000Z",
    "Arrival":"2021-09-20T14:22:00.0000000Z",
    "RealtimeDeparture": null,
  "RealtimeArrival": null,
    "NumberOfChanges": 1,
  "DurationMinutes": 90,
    "Occupancy": null,
    ...
}

 

Disruptions in a public transport travelling advice

Disruption messages can be associated with a journey. These messages are sent by the transport company (i.e., NS) for a particular place, station, stop, service and/or for all trips done by an operator.
The disruption messages, if present, are shown in the Disruption element of a journey's leg.

Business rules for displaying disruptions in a journey

The 9292 Reisadvies API supports four types of disruption messages:

  1. Message related to a place
    • A disruption is added to a journey if the name of place where a stop is located corresponds to the place in a disruption message
    • If the corresponding message also contains an operator, the disruption is only added if both the place and the operator in the leg are present in that message
  2. Message related to a stop
    • A disruption is added to a journey if either the departure or arrival location corresponds to the stop in a disruption message
  3. Message related to a service line
    • If the service line of a leg corresponds to the line number in the message, then that message is added as a disruption
    • If a message contains both service lines and stops the disruption will only be added if the leg corresponds to both the service line and the stop
  4. Message related to an operator
    • A disruption message is added to the journey if both the leg and the message reference the same operator number and the message does not contain names of a place, service lines, or stops

Fares in a public transport travelling advice

Fares are shown in all responses. They can be found under FareInfo. The FareInfo consists of fares that represent the entire travelling advice (Journey). It is also possible to display fare information per Leg.

Fares at Journey-level

FareInfo consists of a "Complete" and a "Farelegs" component. When there are no fares possible, for example a travelling advice with a ferry, then the element "Complete" will contain the value 'false'. In that case it is not possible to give a total fare for the advice. For the parts where it is possible to give the information, it will be shown per part of the journey

Train fares

Below an example is given of a NS train fare:

  • 2nd class fare 14,00 euro full price
  • 2nd class fare 8,40 euro reduction price
  • 1st class fare 23,80 euro full price
  • 1st class fare 14,30 euro reduction price

Format

Example

XML

<FareInfo>
<Complete>true</Complete>
<FareLegs>
<FareLeg>
<Fares>
<Fare>
<Eurocents>1400</Eurocents>
<FareClass>Second</FareClass>
<Reduced>false</Reduced>
</Fare>
<Fare>
<Eurocents>840</Eurocents>
<FareClass>Second</FareClass>
<Reduced>true</Reduced>
</Fare>
<Fare>
<Eurocents>2380</Eurocents>
<FareClass>First</FareClass>
<Reduced>false</Reduced>
</Fare>
<Fare>
<Eurocents>1430</Eurocents>
<FareClass>First</FareClass>
<Reduced>true</Reduced>
</Fare>
</Fares>
<FromId>station-amsterdam-centraal</FromId>
<OperatorsString>NS</OperatorsString>
< PlaceNamesString>Amsterdam - Rotterdam</PlaceNamesString>
<PriceUnits>86</PriceUnits>
<StarValue></StarValue>
<StarZones xmlns:d7p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"/>
<ToId>station-rotterdam-centraal</ToId>
</FareLeg>
</FareLegs>
<FullPriceEuroCents>1400</FullPriceEuroCents>
<ReducedPriceEuroCents>840</ReducedPriceEuroCents>
</FareInfo>

JSON

"FareInfo": {
"Complete": true,
"ReducedPriceEuroCents": 1400,
"FullPriceEuroCents": 840,
"FareLegs": [ {
"FromId": "station-amsterdam-centraal",
"ToId": " station-rotterdam-centraal ",
"PlaceNamesString": " Amsterdam - Rotterdam",
"OperatorsString": "NS",
"Fares": [ {
"Eurocents": 1400,
"Reduced": false,
"FareClass": "Second"
} ,
{
"Eurocents": 840,
"Reduced": true,
"FareClass": "Second"
} ,
{
"Eurocents": 2380,
"Reduced": false,
"FareClass": "First"
} ,
{
"Eurocents": 1430,
"Reduced": true,
"FareClass": "First"
}
],
"StarZones": [],
"StarValue": "",
"PriceUnits": 86
} ]
}
Train price units

The amount of price units of the train is shown under “PriceUnits” of the “FareLegs”.

Tram, bus, metro or ferry

Here is an example of a bus journey from a travelling advice from Leeuwarden to Harlingen with the following fare information:

  • The section of the journey with Arriva bus 97 is:
    • € 5,30 full price
    • € 3,49 with reduction

Format

Example

XML

<FareInfo>
<Complete>true</Complete>
<FareLegs>
<FareLeg>
<Fares>
<Fare>
<Eurocents>530</Eurocents>
<FareClass>None</FareClass>
<Reduced>false</Reduced>
</Fare>
<Fare>
<Eurocents>349</Eurocents>
<FareClass>None</FareClass>
<Reduced>true</Reduced>
</Fare>
</Fares>
<FromId>leeuwarden/bushalte-station</FromId>
<OperatorsString>Arriva</OperatorsString>
< PlaceNamesString>Leeuwarden - Harlingen</PlaceNamesString>
<PriceUnits i:nil="true"/>
<StarValue></StarValue>
<StarZones xmlns:d7p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"/>
<ToId>harlingen/bushalte-station</ToId>
</FareLeg>
</FareLegs>
<FullPriceEuroCents>530</FullPriceEuroCents>
<ReducedPriceEuroCents>349</ReducedPriceEuroCents>
</FareInfo>

JSON

"FareInfo": {
"Complete": true,
"ReducedPriceEuroCents": 349,
"FullPriceEuroCents": 530,
"FareLegs": [ {
"FromId": "leeuwarden/bushalte-station",
"ToId": "harlingen/bushalte-station",
"PlaceNamesString": "Leeuwarden - Harlingen",
"OperatorsString": "Arriva",
"Fares": [ {
"Eurocents": 530,
"Reduced": false,
"FareClass": "None"
} ,
{
"Eurocents": 349,
"Reduced": true,
"FareClass": "None"
}
],
"StarZones": [],
"StarValue": "",
"PriceUnits": null
} ]
}

“FareLegs” within 1 Journey can be added up in the following combinations:

  • Combination: Train + bus/metro or tram
  • Combination: bus/metro/tram + ferry
  • Combination: Train + ferry
  • Combination: Train + ferry + bus/metro/tram
  • Combination: Ferry + bus/metro/tram

The elements below can also be used. These add up all the elements and will show the full and reduction price:

  • <FullPriceEuroCents>603</FullPriceEuroCents>
  • <ReducedPriceEuroCents>398</ReducedPriceEuroCents>

Please note:

We would like to point out that the presenting of reduction prices in case of different modalities needs some explanation. Qualification for reduction in the train has other conditions than the qualification for reduction in bus/tram/metro.

No Fare information available

It is possible that there is no fare information available, because there is no OV-chip card information present (i.e., ferry information). This is indicated in <Fares> as follows:

Format

Example

XML

<FareInfo>
<Complete>false</Complete>
<FareLegs>
<FareLeg>
<Fares>
<Fare>
<Eurocents i:nil="true" />
<FareClass>None</FareClass>
<Reduced>false</Reduced>
</Fare>
<Fare>
<Eurocents i:nil="true" />
<FareClass>None</FareClass>
<Reduced>true</Reduced>
</Fare>
</Fares>
</FareLeg>
</FareLegs>
</FareInfo>

JSON

"Fares": [{
"Eurocents": null,
"Reduced": false,
"FareClass": "None"
},
{
"Eurocents": null,
"Reduced": true,
"FareClass": "None"
}
]
OV-chipcard valid/not valid

To determine whether the OV-chipcard is valid on a Fareleg, the tariff calculator gives a field NoChipFare to the Planner. The planner gives this back to the client with the same name. This is a boolean-field. This value is true when the OV-chipcard is not valid and it is false when it can be used.

Format

Example

XML

<FareInfo>
<Complete>false</Complete>
<FareLegs>
<FareLeg>
<Fares>
<Fare>
<Eurocents>550</Eurocents>
<FareClass>Second</FareClass>
<Reduced>false</Reduced>
</Fare>
<Fare>
<Eurocents>330</Eurocents>
<FareClass>Second</FareClass>
<Reduced>true</Reduced>
</Fare>
<Fare>
<Eurocents>550</Eurocents>
<FareClass>First</FareClass>
<Reduced>false</Reduced>
</Fare>
<Fare>
<Eurocents>330</Eurocents>
<FareClass>First</FareClass>
<Reduced>true</Reduced>
</Fare>
</Fares>
<FromId>station-leeuwarden</FromId>
<NoChipFare>false</NoChipFare>
<OperatorsString>Arriva</OperatorsString>
<PlaceNamesString>Leeuwarden - Harlingen</PlaceNamesString>
<PriceUnits>27</PriceUnits>
<StarValue></StarValue>
<StarZones xmlns:d7p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" />
<ToId>station-harlingen-haven</ToId>
</FareLeg>
<FareLeg>
<Fares />
<FromId>harlingen/halte-veer-harlingen</FromId>
<NoChipFare>true</NoChipFare>
<OperatorsString>Doeksen</OperatorsString>
<PlaceNamesString>Harlingen - Vlieland</PlaceNamesString>
<PriceUnits i:nil="true" />
<StarValue></StarValue>
<StarZones xmlns:d7p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" />
<ToId>vlieland/halte-veer-vlieland</ToId>
</FareLeg>
</FareLegs>
<FullPriceEuroCents i:nil="true" />
<ReducedPriceEuroCents i:nil="true" />
</FareInfo>

JSON

"FareInfo": {
"Complete": false,
"ReducedPriceEuroCents": null,
"FullPriceEuroCents": null,
"FareLegs": [{
"FromId": "station-leeuwarden",
"ToId": "station-harlingen-haven",
"PlaceNamesString": "Leeuwarden - Harlingen",
"OperatorsString": "Arriva",
"Fares": [{
"Eurocents": 550,
"Reduced": false,
"FareClass": "Second"
},
{
"Eurocents": 330,
"Reduced": true,
"FareClass": "Second"
},
{
"Eurocents": 550,
"Reduced": false,
"FareClass": "First"
},
{
"Eurocents": 330,
"Reduced": true,
"FareClass": "First"
}
],
"StarZones": [],
"StarValue": "",
"PriceUnits": 27,
"NoChipFare": false
},
{
"FromId": "harlingen/halte-veer-harlingen",
"ToId": "vlieland/halte-veer-vlieland",
"PlaceNamesString": "Harlingen - Vlieland",
"OperatorsString": "Doeksen",
"Fares": [],
"StarZones": [],
"StarValue": "",
"PriceUnits": null,
"NoChipFare": true
}
]
}

Fare at Leg-level

The following parameter is available for displaying fare information in a Leg:

Parameter

Description (example)

Fare FareInfoAndLegs

Fare information in the Leg comprises the following components:

Component

Description/Remarks

BaseFare The base fare (boarding rate)
Fare Fare without the base fare
FareClass Class type
Reduced Indicates if it is a reduced fare
MultipleLegFare Indicates if the fare is a total price for a combination of consecutive legs
MultipleLegNotice A note explaining that this fare represents a combination of consecutive legs

The following is an example of fares in a Leg:

Format

Example

XML

<LegFares>
<LegFare>
<BaseFare>99</BaseFare>
<Fare>48</Fare>
<FareClass>None</FareClass>
<MultipleFareLeg>false</MultipleFareLeg>
<MultipleLegNotice i:nil="true" />
<Reduced>false</Reduced>
</LegFare>
<LegFare>
<BaseFare>65</BaseFare>
<Fare>32</Fare>
<FareClass>None</FareClass>
<MultipleFareLeg>false</MultipleFareLeg>
<MultipleLegNotice i:nil="true" />
<Reduced>true</Reduced>
</LegFare>
</LegFares>

JSON

"LegFares": [{
    "BaseFare": 99,
"Fare": 48,
"Reduced": false,
"FareClass": "None",
"MultipleFareLeg": false,
"MultipleLegNotice": null
},
{
"BaseFare": 65,
"Fare": 32,
"Reduced": true,
"FareClass": "None",
"MultipleFareLeg": false,
"MultipleLegNotice": null
}]

 

Bicycles and scooters in a public transport travelling advice

This item is a standard feature of the 9292 Reisadvies API. By assigning the ‘FirstMile’ and or ‘LastMile’ parameter with the values ‘PrivateBicycle’ or ‘PrivateElectricBicycle’ you can provide the traveler with the appropriate public transport travel advice in which he or she can use their own bicycle or electric bicycle to and from a bicycle transfer point located near a train station or a bus/metro/tram stop.

To use a scooter in the transport travel advice, use the value ‘PrivateMoped’.

The 9292 Reisadvies API also supports the use of rental bicycles and scooters. Assigning the value ‘PublicBicycle’, ‘PublicElectricBicycle’ or ‘PublicMoped’ to the ‘LastMile’ parameter will return a transport travel advice with an extra transition-leg to the appropriate rental location.

Please note:

  • In the current release the traveller can only rent a bicycle or scooter for the last mile of a journey
  • Information on rental locations at the arrival and departure location as well as the rental location details (such as number of available rentals and opening hours) are not yet available in the current release

Business rules for planning a journey by bicycle

The standard business rules for planning a journey by bicycle are:

  • Bicycle speed is 230 metres per minute, which is 13.8 km per hour
  • The maximum cycling distance we use is 6.9 km (30 min)
  • The 9292 Reisadvies API adds a 5 minute bicycle parking and walking time to the relevant stop by default
  • When renting we give the traveler 10 minutes to retrieve their rental bicycle

Business rules for planning a journey by scooter

The standard business rules for planning a journey by scooter are:

  • Scooter speed is 20 km per hour
  • The maximum distance used is 10 km (30 min)
  • There is a 5 minute parking and walking time to the relevant stop by default
  • When renting we give the traveler 10 minutes to retrieve their rental scooter

 

Minimize walking distance in a public transport travelling advice

The ‘minimize walking distance’ option allows you to provide the traveller with an appropriate travel advice in which the walking distance of both the first mile and the last mile are minimized.

The following parameter is available to minimize the walking distance in the travel advice:

Parameter

Description (example)

LessWalking

true

 

Customized travel time and speed settings in a public transport travelling advice

By using the option to customize the travel time and speed settings used by the 9292 ReisadviesAPI you can provide the traveller with an appropriate travel advice in which he/she can specify the desired travel time and speed for the first and last mile independently.

The following parameters are available for customizing the settings in a public transport travelling advice:

Parameter

Description (example)

FirstMileSpeed

The first mile travel speed in km/h. When omitted the standard travel speed of the selected first mile modality will be used

FirstMileMaxTravelTime

Maximum travel time in minutes for the first mile

LastMileSpeed

The last mile travel speed in km/h. When omitted the standard travel speed of the selected last mile modality will be used

LastMileMaxTravelTime

Maximum travel time in minutes for the last mile

Business rules for customizing the travel time and speed settings

The business rules for the travel speed settings are as follows:

  • The 9292 Reisadvies API defines the standard travel speed by foot as 4.2 km per hour
    • The lower bound for this setting is 2 km per hour
    • The upper bound is 5 km per hour
  • The standard travel speed by bicycle is 13.8 km per hour
    • The travel speed setting has a lower bound of 10 km per hour
    • The upper bound is 22 km per hour
  • The standard travel speed used by the 9292 Reisadvies API for scooters and electric bicycles is 20 km per hour
    • The lower bound is 10 km per hour
    • The upper bound is 22 km per hour

The business rules for the travel time settings are:

  • The 9292 Reisadvies API defines 20 minutes as standard for the maximum travel time on foot
    • The lower bound for customizing this setting is 10 minutes
    • The upper bound is 30 minutes
  • The standard maximum travel time by bicycle is 30 minutes
    • The lower bound is 15 minutes
    • The upper bound is 45 minutes
  • The standard for scooters and electric bicycles is a maximum travel time of 30 minutes
    • The lower bound is 15 minutes
    • The upper bound is 45 minutes

 

Occupancy information in a public transport travelling advice

By using the option ‘Occupancy information’ you can provide the traveller with an appropriate travel advice including the occupancy per vehicle and you can give an occupancy forecast for the entire journey.

The following parameters are available to add the occupancy information to the travel advice:

Parameter

Description (example)

ShowOccupancy

true

Classification and visualization of the occupancy

The occupancy is indicated on a scale from 0-5 in accordance with the BISON specification “Concept interface occupancy”. The occupancy can be visualized with the corresponding color or the corresponding icon.

In the following table an example is given how 9292 translates the data in her own apps and website.

BISON occupancy value

Enumeration

Color

9292 icon

Remarks

0

No information

 

Level 0 icon

No information received or occupancy unknown

1

Empty

 

Level 1 icon

At the NS numbers 1 and 2 will be converted to 2

2

Many seats available

 

Level 2 icon

At the NS <65% of the seats on the train are taken

3

Few seats available

 

Level 3 icon

At the NS >65% and <100% of the seats per train are taken

4

Standing room only

 

Level 4 icon

At the NS >100% of the seats on the train are taken

5

Full

 

Level 5 icon

Only relevant for real time data.
This data is not supplied yet, but will be in the future

The icons accommodate the visually impaired by making a clear distinction between the icons.

Occupancy example

A travel advice from Waterlooplein in Amsterdam to Stadsschouwburg in Utrecht.

  • leg 1:    Tram - 3 stops (busy-quiet-busy) gets the indicator BUSY
  • leg 2:    Train Amsterdam Central Station to Utrecht Central Station - 2 stops (average-quiet) gets the indicator AVERAGE
  • leg 3:    Bus - a couple of stops (quiet-quiet-average-quiet-average) gets the indicator AVERAGE

The whole journey will get the indicator BUSY because 1 leg has the indicator “BUSY”.

The indicator will be aggregated to the busiest stop of the journey.

 

Route information in a public transport travelling advice

You can provide the traveller with an appropriate travel advice in which each Leg contains a corresponding route.

Use the following parameter to add route information to each leg of a travel advice:

Parameter

Description (example)

Route

true

The route information can be found under the Route element of a Leg. The Route consist of 3 elements:

  1. The "Bounds"
    • This element contains 4 coordinates that define the boundaries of the route. These four coordinates are; MaxLatitude (northern boundary), MaxLongitude (eastern boundary), MinLatitude(southern boundary), and MinLongitude (western boundary)
  2. The “Distance”
    • This element contains the distance in metres of the route. The distance will only be filled for walk-legs, bicycle-legs, and scooter-legs
  3. The “RouteString”
    • This element contains a series of coordinates (one per stop/intermediate stop) that comprise the route covered by the Leg. The series of coordinates are formatted as a “Well Known Text” (WKT) LineString

Here is an example of such a route information:

Format

Example

XML

<Route>
<Bounds>
<MaxLatitude>51.81395</MaxLatitude>
<MaxLongitude>4.662163</MaxLongitude>
<MinLatitude>51.81212</MinLatitude>
<MinLongitude>4.66043</MinLongitude>
</Bounds>
<Distance>586</Distance>
<RouteString>LINESTRING (4.66219 51.81394, 4.66257 51.81392,
4.66257 51.81392, 4.66264 51.81391, 4.66328 51.81389, 4.66373 51.81389,
4.66389 51.81392, 4.66392 51.81388, 4.66402 51.81373, 4.66411 51.8136, 4.66415 51.81354, 4.66418 51.81351,
4.66421 51.81348, 4.66433 51.81353, 4.66451 51.81336,
4.66504 51.81285, 4.66529 51.8126, 4.66574 51.8125,
4.66572 51.81245, 4.66608 51.81208, 4.66609 51.81199, 4.66602 51.81191,
4.66609 51.81192, 4.66614 51.81191, 4.66636 51.81188, 4.66652 51.81185,
4.66647 51.81175, 4.6664 51.81159, 4.66638 51.81151, 4.66664 51.81146,
4.6666 51.81137, 4.66668 51.81136, 4.6676 51.81122)</RouteString>
</Route>

JSON

"Route": {
"RouteString": "LINESTRING (4.66219 51.81394, 4.66257 51.81392, 4.66257 51.81392, 4.66264 51.81391,
4.66328 51.81389, 4.66373 51.81389, 4.66389 51.81392, 4.66392 51.81388, 4.66402 51.81373, 4.66411 51.8136,
4.66415 51.81354, 4.66418 51.81351, 4.66421 51.81348, 4.66433 51.81353, 4.66451 51.81336, 4.66504 51.81285,
4.66529 51.8126, 4.66574 51.8125, 4.66572 51.81245, 4.66608 51.81208, 4.66609 51.81199, 4.66602 51.81191,
4.66609 51.81192, 4.66614 51.81191, 4.66636 51.81188, 4.66652 51.81185, 4.66647 51.81175, 4.6664 51.81159,
4.66638 51.81151, 4.66664 51.81146, 4.6666 51.81137, 4.66668 51.81136, 4.6676 51.81122)",
"Distance": 586,
"Bounds": {
"MaxLatitude": 51.81395,
"MaxLongitude": 4.662163,
"MinLatitude": 51.81212,
"MinLongitude": 4.66043
}
}

Unimodal public transport travelling advice

By using the ‘unimodal’ option you can provide the traveller with an appropriate travel advice consisting of a single journey by foot, (electric) bicycle or scooter from the departure location to the arrival location.

Use the following parameter to receive a unimodal travel advice:

Parameter

Description (example)

Unimodal

true

Business rules for unimodal public transport travelling advice

The combination of the first mile and the total distance between the departure and arrival location need to comply with one of the following criteria:

First mile

Route type

Max distance between departure and arrival location

Walking

Walk route

 <= FirstMileSpeed * FirstMileMaxTravelTime / 60 (default 1,4 km)

Bicycle

Bicycle route

 <= FirstMileSpeed * FirstMileMaxTravelTime / 60 (default 6,9 km)

Electric bicycle

Bicycle route

 <= FirstMileSpeed * FirstMileMaxTravelTime / 60 (default 10 km)

Scooter

Bicycle route

 <= FirstMileSpeed * FirstMileMaxTravelTime / 60 (default 10 km)

If the above criteria is not met, the 9292 Reisadvies API will return an error message.

Please note:

In the current release the traveller can only specify the ‘FirstMile’ modality when requesting a unimodal travelling advice, which means there is only support for travelling by private bicycle, private moped, and on foot.

Requesting a public transport travelling advice using a JourneyId

The PlannedJourneys endpoint enables the traveller to replan a travel advice they have received. The replanning is equivalent to refreshing the information (i.e., real-time data, occupancy data, disturbances, etc.) in the travel advice.

Request:

  • https://<RAPI domain>/v3/PlannedJourneys?JourneyId=
    station-alkmaar~station-utrecht-
    centraal~~0~C0nHlCAAB$$HmH040~~~B~9~129~~3600215~3627006~

 

Reisadvies API Optional Features

StarZones in a public transport travelling advice

This is an optional feature that can be purchased and added to the 9292 Reisadvies API  at your request.
The star values and star zones are used in the so-called ‘Sterabonnementen’ subscriptions. If this functionality is activated, the 9292 Reisadvies API will calculate which monthly ticket is required for the travelling advice. This monthly ticket is no longer used everywhere in the Netherlands, thus it is only given when this monthly ticket is applicable. This is demonstrated in the following example

In this example the requested travelling advice is from Station Koog Zaandijk to Station Krommenie Assendelft where the modality train is excluded:

Request:

  • https://<RAPI domain>/v3/Journeys?FromId=station-koog-zaandijk&ToId=station-krommenie-assendelft&DateTime=2021-09-27T13:24:00.000Z&ExcludedTravelModes=1

When there are Star zones present in the travelling advice, the response is as follows:

Format

Example

XML

<PriceUnits i:nil="true" />
<StarValue>2</StarValue>
<StarZones xmlns:d7p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d7p1:string>3722, 3732, 3733, 3742</d7p1:string>
</StarZones>

JSON

"StarZones": [
"3722, 3732, 3733, 3742"
],
"StarValue": "2",
"PriceUnits": null

When there are no Star zones present, the following is returned:

Format

Example

XML

<StarZones xmlns:d7p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"/>

JSON

"StarZones": []

The Star value can be both a numeric and an alphabetic value. There are seven possible values: 1 to 6 and ‘Netabonnement’. With a value greater than 6, the value Netabonnement will be displayed, as this value is valid in the entire country for city and region transport.

Multiple monthly tickets required

It is possible that for one journey more than 1 monthly ticket is required. In that case multiple elements <FareLeg> are shown, in which the first FareLeg the tariff information shows for the total journey. After this the <FareLeg> is shown per required monthly ticket. This is shown as follows in the <Fares>:

Format

Example

XML

<FareInfo>
<Complete>true</Complete>
<FareLegs>
<FareLeg>
<Fares>
<Fare> <Eurocents>1759</Eurocents> <FareClass>None</FareClass> <Reduced>false</Reduced>
</Fare>
<Fare> <Eurocents>1161</Eurocents> <FareClass>None</FareClass> <Reduced>true</Reduced> </Fare> </Fares> <FromId>scherpenisse/bushalte-spuidamstraat</FromId> <NoChipFare>false</NoChipFare> <OperatorsString>Connexxion, Arriva, RET &amp; EBS</OperatorsString> <PlaceNamesString>Scherpenisse - Hellevoetsluis</PlaceNamesString> <PriceUnits i:nil="true" /> <StarValue></StarValue> <StarZones xmlns:d7p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" /> <ToId>hellevoetsluis/bushalte-amnesty-internationallaan</ToId> </FareLeg> <FareLeg> <Fares /> <FromId>scherpenisse/bushalte-spuidamstraat</FromId>
<NoChipFare>false</NoChipFare>
<OperatorsString>Connexxion</OperatorsString>
<PlaceNamesString>Scherpenisse - Halsteren</PlaceNamesString>
<PriceUnits i:nil="true" />
<StarValue>3</StarValue>
<StarZones xmlns:d7p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d7p1:string>7233, 7243, 7248, 7259, 7738</d7p1:string>
</StarZones>
<ToId>halsteren/bushalte-nieuwe-molenweg</ToId>
</FareLeg>
<FareLeg>
<Fares />
<FromId>rotterdam/metrostation-zuidplein</FromId>
<NoChipFare>false</NoChipFare>
<OperatorsString>RET &amp; EBS</OperatorsString>
<PlaceNamesString>Rotterdam - Hellevoetsluis</PlaceNamesString>
<PriceUnits i:nil="true" />
<StarValue>5</StarValue>
<StarZones xmlns:d7p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d7p1:string>5246, 5247, 5336, 5337, 5358</d7p1:string>
</StarZones>
<ToId>hellevoetsluis/bushalte-amnesty-internationallaan</ToId>
</FareLeg>
</FareLegs>
<FullPriceEuroCents>1759</FullPriceEuroCents>
<ReducedPriceEuroCents>1161</ReducedPriceEuroCents>
</FareInfo>

JSON

"FareInfo": {
"Complete": true,
"ReducedPriceEuroCents": 1161,
"FullPriceEuroCents": 1759,
"FareLegs": [{
"FromId": "scherpenisse/bushalte-spuidamstraat",
"ToId": "hellevoetsluis/bushalte-amnesty-internationallaan",
"PlaceNamesString": "Scherpenisse - Hellevoetsluis",
"OperatorsString": "Connexxion, Arriva, RET & EBS",
"Fares": [{
"Eurocents": 1759,
"Reduced": false,
"FareClass": "None"
},
{
"Eurocents": 1161,
"Reduced": true,
"FareClass": "None"
}],
"StarZones": [],
"StarValue": "",
"PriceUnits": null,
"NoChipFare": false
},
{
"FromId": "scherpenisse/bushalte-spuidamstraat",
"ToId": "halsteren/bushalte-nieuwe-molenweg",
"PlaceNamesString": "Scherpenisse - Halsteren",
"OperatorsString": "Connexxion",
"Fares": [],
"StarZones": [
"7233, 7243, 7248, 7259, 7738"
],
"StarValue": "3",
"PriceUnits": null,
"NoChipFare": false
},
{
"FromId": "rotterdam/metrostation-zuidplein",
"ToId": "hellevoetsluis/bushalte-amnesty-internationallaan",
"PlaceNamesString": "Rotterdam - Hellevoetsluis",
"OperatorsString": "RET & EBS",
"Fares": [],
"StarZones": [
"5246, 5247, 5336, 5337, 5358"
],
"StarValue": "5",
"PriceUnits": null,
"NoChipFare": false
}]
}

 

CO2 in a public transport travelling advice

This optional component can be purchased and added to the 9292 Reisadvies API upon request.
By using the CO2 option in the public transport travel advice, your users can compare how much CO2 they save per public transport journey by travelling with Public Transport.
The calculation of CO2 is based on CO2 emissions per kilometre and Well-to-Wheel (WTW) = the emissions of both the pre-use phase and the direct emissions together.
The summaries are shown below for the different modes of transport.

The CO2 values listed below originate from the website co2emissiefactoren.nl and are the initiative of SKAO, Stimular, Connekt, Milieu Centraal and the central government and were created in collaboration with various stakeholders.


Private/Shared Transportation

Category

CO2 emissions

Bicycle 0
Electric bicycle 6
Moped 48

Electric moped

17

Small Car

180

Mid-class Car

202

Large Car

236


Public transport

Category

CO2 emissions

Tram

0

Bus

103

Metro

0

Train

2

Ferry

115

Taxi

202

Sources consulted:

A sample travel advice with CO2 from zip code 3221AL in Hellevoetsluis to zip code 3078PE in Rotterdam:

Request:

  • •https://<RAPI domain>/v3/Journeys?FromId=hellevoetsluis/3221al&ToId=rotterdam/3078pe&DateTime=2021-01-01T10:45:00.000Z

Response:

Format

Example

XML

<CO2Info>
<EmissionByModality>
<Bicycle>0</Bicycle>
<Bus> 4.1666140966497007</Bus>
<CarLarge> 7.0237209057809231</CarLarge>
<CarMedium> 6.0118289108802827</CarMedium>
<CarSmall> 5.3570752671210435</CarSmall>
<Ferry> 3.4225758651051112</Ferry>
<Subway> 2.2023531653719846</Subway>
<Train> 0.17856917557070145</Train>
<Tram> 1.9642609312777162</Tram>
</EmissionByModality>
<JourneyDistance> 29.761529261783576</JourneyDistance>
<JourneyEmission> 4.0814766438217758</JourneyEmission>
</CO2Info>

JSON

"CO2Info": {
"JourneyEmission": 4.0814766438217758,
"JourneyDistance": 29.761529261783576,
"EmissionByModality": {
"Train": 0.17856917557070145,
"Tram": 1.9642609312777162,
"Bus": 4.1666140966497007,
"Subway": 2.2023531653719846,
"Ferry": 3.4225758651051112,
"CarSmall": 5.3570752671210435,
"CarMedium": 6.0118289108802827,
"CarLarge": 7.0237209057809231,
"Bicycle": 0.0
}
}

An explanation of the most relevant elements of the response above:

Elements

Description (example)

JourneyDistance

measured distance of the journey in kilometres

JourneyEmission

total CO2 emissions from travel by public transport in kilograms

 

Realtime in a public transport travelling advice

This is an extra feature that can be purchased and added to the 9292 Reisadvies API at your request.

By using the functionality ‘Realtime travelling advice’ you provide the traveller with an appropriate travelling advice including delays (train, bus, metro or tram). When there are changes in time, the journey can be rescheduled, and alternatives are offered by 9292.

The following parameters are added to the 9292 Reisadvies API to display real time in the travelling advice.

Parameter

Description (example)

RealtimeArrival

Actual arrival time

RealtimeDeparture

Actual departure time

RealtimeState

None, Offset, Cancelled

Cancellations

None of Cancellations

Delays

None, InternalDelay

Detour

Normal

LudMessage

<Text>Dit is een alternatief reisadvies.</ Text>

Delays on a journey

The example below shows how delays are indicated. In the example both the departure time and the arrival time have changed compared to the original time.

Original departure time and arrival time are:

  • Departure 2014-11-05T11:03:00.0000000Z
  • Arrival 2014-11-05T11:27:00.0000000Z

Format

Example

XML

<RealtimeArrival>2014-11-05T11:55:00.0000000Z</RealtimeArrival>
<RealtimeDeparture>2014-11-05T11:32:00.0000000Z</RealtimeDeparture>
<RealtimeInfo>
<Cancellations>None</Cancellations>
<Delays>InternalDelay</Delays>
<Detour>Normal</Detour>
<LudMessages />
</RealtimeInfo>

JSON

"RealtimeDeparture": "2014-11-05T11:32:00.0000000Z",
"RealtimeArrival": "2014-11-05T11:55:00.0000000Z",
"RealtimeInfo": {
"LudMessages": [],
"Detour": "Normal",
"Cancellations": "None",
"Delays": "InternalD
}

Real time departure and arrival times on a stop

In a travelling advice for every stop the real time departure and arrival time is indicated, as is also the case for stops in-between. In the example below the bus has left the bus stop "Claudius Prinsenlaan" in Breda earlier than originally planned. The bus should have departed at 10:05h but has left the stop at 10:02h.

Format

Example

XML

<Call>
<Arrival>2014-11-17T10:05:00.0000000Z</Arrival>
<Departure>2014-11-17T10:05:00.0000000Z</Departure>
<FareZones>
<FareZone>
<Selected>true</Selected>
<Zone>7200</Zone>
</FareZone>
</FareZones>
<Location>
<Coordinate>
<Latitude>51.587575</Latitude>
<Longitude>4.784468</Longitude>
</Coordinate>
<DisplayName>Claudius Prinsenlaan</DisplayName>
<Id>breda/bushalte-claudius-prinsenlaan</Id>
<Place>
<Coordinate>
<Latitude>51.594976</Latitude>
<Longitude>4.779766</Longitude>
</Coordinate>
<CountryCode>NL</CountryCode>
<CountryName>Nederland</CountryName>
<Id>breda</Id>
<Name>Breda</Name>
<RegionCode>NB</RegionCode>
<RegionName>Noord-Brabant</RegionName>
<ShowCountry>false</ShowCountry>
<ShowRegion>false</ShowRegion>
</Place>
<StationAbbreviation i:nil="true" />
<Type>Stop</Type>
<TypeName>Bushalte</TypeName>
</Location>
<Platform i:nil="true" />
<PlatformChange i:nil="true" />
<RealtimeArrival>2014-11-17T10:02:00.0000000Z</RealtimeArrival>
<RealtimeDeparture>2014-11-17T10:02:00.0000000Z</RealtimeDeparture>
<RealtimeState>Offset</RealtimeState>
</Call>

JSON

"Calls": [{
"Location": {
"Id": "breda/bushalte-claudius-prinsenlaan",
"StationAbbreviation": null,
"DisplayName": "ClaudiusPrinsenlaan",
"Place": {
"Id": "breda",
"Name": "Breda",
"RegionCode": "NB",
"RegionName": "Noord-Brabant",
"ShowRegion": false,
"CountryCode": "NL",
"CountryName": "Nederland",
"ShowCountry": false,
"Coordinate": {
"Latitude": 51.594976,
"Longitude": 4.779766
}
},
"Type": "Stop",
"TypeName": "Bushalte",
"Coordinate": {
"Latitude": 51.587575,
"Longitude": 4.784468
}
},
"Platform": null,
"PlatformChange": null,
"Arrival": "2014-11-17T10:05:00.0000000Z",
"Departure": "2014-11-17T10:05:00.0000000Z",
"RealtimeArrival": "2014-11-17T10:02:00.0000000Z",
"RealtimeDeparture": "2014-11-17T10:02:00.0000000Z",
"RealtimeState": "Offset",
"FareZones": [{
"Zone": "7200",
"Selected": true
}]
}]

Planned journey is cancelled

When a planned journey is cancelled, a cancelled message will be sent by the public transport company. This is shown in the example below.

The sprinter (train) from Amersfoort to Zwolle is cancelled. For every station/ stop of that journey, the RealtimeState shows Cancelled.
Thus, this travelling advice is cancelled. It is considered very important to present this information to the traveller and to give an explanation.

Request:

  • https://<RAPI domain>/v3/Journeys?FromId=station-amersfoort&ToId=zwolle&DateTime=2021-01-01T19:45:00.000Z

Format

Example

XML

<Call>
<Arrival>2014-11-04T19:47:00.0000000Z</Arrival>
<Departure>2014-11-04T19:47:00.0000000Z</Departure>
<FareZones>
<Location>
<Coordinate>
<Latitude>52.153484</Latitude>
<Longitude>5.373807</Longitude>
</Coordinate>
<DisplayName>Amersfoort</DisplayName>
<Id>station-amersfoort</Id>
<Place>
<Coordinate>
<Latitude>52.153484</Latitude>
<Longitude>5.373807</Longitude>
</Coordinate>
<CountryCode>NL</CountryCode>
<CountryName>Nederland</CountryName>
<Id>amersfoort</Id>
<Name>Amersfoort</Name>
<RegionCode>UT</RegionCode>
<RegionName>Utrecht</RegionName>
<ShowCountry>false</ShowCountry>
<ShowRegion>false</ShowRegion>
</Place>
<StationAbbreviation>amf</StationAbbreviation>
<Type>Station</Type>
<TypeName>Station</TypeName>
</Location>
<Platform>2b</Platform>
<PlatformChange i:nil="true" />
<RealtimeArrival i:nil="true" />
<RealtimeDeparture i:nil="true" />
<RealtimeState>Cancelled</RealtimeState>
</Call>
<RealtimeInfo>
<Cancellations>Cancellations</Cancellations>
<Delays>None</Delays>
<Detour>Normal</Detour>
<LudMessages />
</RealtimeInfo>

JSON

"RealtimeInfo": {
"LudMessages": [],
"Detour": "Normal",
"Cancellations": "Cancellations",
"Delays": "None"
"Location": {
"Id": "station-amersfoort",
"StationAbbreviation": "amf",
"DisplayName": "Amersfoort",
"Place": {
"Id": "amersfoort",
"Name": "Amersfoort",
"RegionCode": "UT",
"RegionName": "Utrecht",
"ShowRegion": false,
"CountryCode": "NL",
"CountryName": "Nederland",
"ShowCountry": false,
"Coordinate": {
"Latitude": 52.153484,
"Longitude": 5.373807
}
},
"Type": "Station",
"TypeName": "Station",
"Coordinate": {
"Latitude": 52.153484,
"Longitude": 5.373807
}
},
"Platform": "2b",
"PlatformChange": null,
"Arrival": "2014-11-04T19:42:00.0000000Z",
"Departure": "2014-11-04T19:43:00.0000000Z",
"RealtimeArrival": null,
"RealtimeDeparture": null,
"RealtimeState": "Cancelled",
"FareZones": [{
"Zone": "5042",
"Selected": true
}]
}

Transfer connection not realized

It can occur that a transfer connection cannot be realized. For example when there is a delay in the first part of the journey. The RealtimeInfo shows a FatalDelay, the remaining output does not change.
Thus, this travelling advice is cancelled. It is considered very important to present this information to the traveller and to give an explanation.

Format

Example

XML

<RealtimeInfo>
<Cancellations>None</Cancellations>
<Delays>FatalDelay</Delays>
<Detour>Normal</Detour>
<LudMessages />
</RealtimeInfo>

JSON

"RealtimeInfo": {
"LudMessages": [],
"Detour": "Normal",
"Cancellations": "None",
"Delays": "FatalDelay"
}

Alternative travelling advice after cancelled journey

When a public transport travelling advice is cancelled, often an alternative travelling advice is offered. It is considered very important to present this information to the traveller.

For example the journey from Kampen Zuid to Amsterdam Bijlmer Arena (sprinter train) has been cancelled. There is an Intercity (train) from Kampen Zuid to Duivendrecht followed by a transfer with the Metro to Amsterdam Bijlmer Arena.

The most important change in the response is displayed in the example below:

Format

Example

XML

<RealtimeInfo>
<Cancellations>None</Cancellations>
<Delays>InternalDelay</Delays>
<Detour>Normal</Detour>
<LudMessages>
<LudMessage>
<Text>Dit is een alternatief reisadvies.</Text>
<Url i:nil="true" />
</LudMessage>
</LudMessages>
</RealtimeInfo>

JSON

"RealtimeInfo": {
"LudMessages": [{
"Text": "Dit is een alternatief reisadvies.",
"Url": null
}],
"Detour": "Normal",
"Cancellations": "None",
"Delays": "InternalDelay"
}

Extra journey

When the NS inserts an extra journey, this is displayed in the 9292 Reisadvies API.

In the example below an extra journey is inserted between Harderwijk and Zwolle: an extra intercity (train) with journey number 29600.
This type of travelling advice is called ‘Alternatief reisadvies’ as is shown in the Ludmessage.
It can occur that there is no Platform or Platformchange information available, as is shown in the example below. This means that 9292 has not received this information or that this information has not been processed. Except for when it is the last stop of an extra journey, or an alternative journey (then this information is not displayed), this is a known error and will be fixed in the next version of the 9292 Reisadvies API.

Format

Example

XML

<Journey>
<Legs>
<Leg>
<Calls>
<Call>
<Arrival i:nil="true" />
<Departure>2014-11-17T09:00:00.0000000Z</Departure>
<FareZones>
<FareZone>
<Selected>true</Selected>
<Zone>4961</Zone>
</FareZone>
</FareZones>
<Location>
<Coordinate>
<Latitude>52.337846</Latitude>
<Longitude>5.620297</Longitude>
</Coordinate>
<DisplayName>Harderwijk</DisplayName>
<Id>station-harderwijk</Id>
<Place>
<Coordinate>
<Latitude>52.337675</Latitude>
<Longitude>5.620047</Longitude>
</Coordinate>
<CountryCode>NL</CountryCode>
<CountryName>Nederland</CountryName>
<Id>harderwijk</Id>
<Name>Harderwijk</Name>
<RegionCode>GL</RegionCode>
<RegionName>Gelderland</RegionName>
<ShowCountry>false</ShowCountry>
<ShowRegion>false</ShowRegion>
</Place>
<StationAbbreviation>hd</StationAbbreviation>
<Type>Station</Type>
<TypeName>Station</TypeName>
</Location>
<Platform i:nil="true" />
<PlatformChange i:nil="true" />
<RealtimeArrival i:nil="true" />
<RealtimeDeparture i:nil="true" />
<RealtimeState>None</RealtimeState>
</Call>
<Call>
<Arrival>2014-11-17T09:27:00.0000000Z</Arrival>
<Departure i:nil="true" />
<FareZones>
<FareZone>
<Selected>true</Selected>
<Zone>4680</Zone>
</FareZone>
<FareZone>
<Selected>false</Selected>
<Zone>4610</Zone>
</FareZone>
<FareZone>
<Selected>false</Selected>
<Zone>4601</Zone>
</FareZone>
</FareZones>
<Location>
<Coordinate>
<Latitude>52.505185</Latitude>
<Longitude>6.091078</Longitude>
</Coordinate>
<DisplayName>Zwolle</DisplayName>
<Id>station-zwolle</Id>
<Place>
<Coordinate>
<Latitude>52.505185</Latitude>
<Longitude>6.091078</Longitude>
</Coordinate>
<CountryCode>NL</CountryCode>
<CountryName>Nederland</CountryName>
<Id>zwolle</Id>
<Name>Zwolle</Name>
<RegionCode>OV</RegionCode>
<RegionName>Overijssel</RegionName>
<ShowCountry>false</ShowCountry>
<ShowRegion>false</ShowRegion>
</Place>
<StationAbbreviation>zl</StationAbbreviation>
<Type>Station</Type>
<TypeName>Station</TypeName>
</Location>
<Platform i:nil="true" />
<PlatformChange i:nil="true" />
<RealtimeArrival>2014-11-17T09:58:00.0000000Z</RealtimeArrival>
<RealtimeDeparture i:nil="true" />
<RealtimeState>Offset</RealtimeState>
</Call>
</Calls>
<Destination>Zwolle</Destination>
<DurationMinutes i:nil="true" />
<LegType>Scheduled</LegType>
<ModeId>0</ModeId>
<ModeName>Intercity</ModeName>
<ModeType>Train</ModeType>
<OperatorName>NS</OperatorName>
<Service>29600</Service>
</Leg>
</Legs>
<RealtimeArrival>2014-11-17T09:58:00.0000000Z</RealtimeArrival>
<RealtimeDeparture i:nil="true" />
<RealtimeInfo>
<Cancellations>None</Cancellations>
<Delays>InternalDelay</Delays>
<Detour>Normal</Detour>
<LudMessages>
<LudMessage>
<Text>Dit is een alternatief reisadvies.</Text>
<Url i:nil="true" />
</LudMessage>
</LudMessages>
</RealtimeInfo>
</Journey>

JSON

"RealtimeInfo": {
"LudMessages": [{
"Text": "Dit is een alternatief reisadvies.",
"Url": null
}],
"Detour": "Normal",
"Cancellations": "None",
"Delays": "InternalDelay"
},
"Departure": "2014-11-17T09:00:00.0000000Z",
"Arrival": "2014-11-17T09:27:00.0000000Z",
"RealtimeDeparture": null,
"RealtimeArrival": "2014-11-17T09:58:00.0000000Z",
"Legs": [{
"LegType": "Scheduled",
"ModeType": "Train",
"DurationMinutes": null,
"ModeName": "Intercity",
"OperatorName": "NS",
"Destination": "Zwolle",
"Service": "29600",
"Attributes": [],
"Calls": [{
"Location": {
"Id": "station-harderwijk",
"StationAbbreviation": "hd",
"DisplayName": "Harderwijk",
"Place": {
"Id": "harderwijk",
"Name": "Harderwijk",
"RegionCode": "GL",
"RegionName": "Gelderland",
"ShowRegion": false,
"CountryCode": "NL",
"CountryName": "Nederland",
"ShowCountry": false,
"Coordinate": {
"Latitude": 52.337675,
"Longitude": 5.620047
}
},
"Type": "Station",
"TypeName": "Station",
"Coordinate": {
"Latitude": 52.337846,
"Longitude": 5.620297
}
},
"Platform": null,
"PlatformChange": null,
"Arrival": null,
"Departure": "2014-11-17T09:00:00.0000000Z",
"RealtimeArrival": null,
"RealtimeDeparture": null,
"RealtimeState": "None",
"FareZones": [{
"Zone": "4961",
"Selected": true
}]
},
{
"Location": {
"Id": "station-zwolle",
"StationAbbreviation": "zl",
"DisplayName": "Zwolle",
"Place": {
"Id": "zwolle",
"Name": "Zwolle",
"RegionCode": "OV",
"RegionName": "Overijssel",
"ShowRegion": false,
"CountryCode": "NL",
"CountryName": "Nederland",
"ShowCountry": false,
"Coordinate": {
"Latitude": 52.505185,
"Longitude": 6.091078
}
},
"Type": "Station",
"TypeName": "Station",
"Coordinate": {
"Latitude": 52.505185,
"Longitude": 6.091078
}
},
"Platform": null,
"PlatformChange": null,
"Arrival": "2014-11-17T09:27:00.0000000Z",
"Departure": null,
"RealtimeArrival": "2014-11-17T09:58:00.0000000Z",
"RealtimeDeparture": null,
"RealtimeState": "Offset",
"FareZones": [{
"Zone": "4680",
"Selected": true
},
{
"Zone": "4610",
"Selected": false
},
{
"Zone": "4601",
"Selected": false
}
],
"ModeId": 0
},
]
}]

Extra stop

When a journey has an extra stop, this will be displayed as followed in the 9292 Reisadvies API:

  • This service is converted to the 9292-format
  • and the element LudMessages is filled in

In the 9292 Reisadvies API it is not visible which station/stop is extra inserted. However, it might occur that for that station/stop the departure/arrival platform information is not available.

The response of a journey with an extra stop is as follows:

Format

Example

XML

<Destination>Den Haag</Destination>
<DurationMinutes i:nil="true" />
<LegType>Scheduled</LegType>
<ModeId>0</ModeId>
<ModeName>Intercity</ModeName>
<ModeType>Train</ModeType>
<OperatorName>NS</OperatorName>
<Service> G0746</Service>
<RealtimeArrival i:nil="true" />
<RealtimeDeparture i:nil="true" />
<RealtimeInfo>
<Cancellations>None</Cancellations>
<Delays>None</Delays>
<Detour>Normal</Detour>
<LudMessages>
<LudMessage>
<Text>Dit is een alternatief reisadvies.</Text>
<Url i:nil="true" />
</LudMessage>
</LudMessages>
</RealtimeInfo>

JSON

"RealtimeInfo": {
"LudMessages": [{
"Text": "Dit is een alternatief reisadvies.",
"Url": null
}],
"Detour": "Normal",
"Cancellations": "None",
"Delays": "None"
},
"Departure": "2014-11-18T13:24:00.0000000Z",
"Arrival": "2014-11-18T14:01:00.0000000Z",
"RealtimeDeparture": null,
"RealtimeArrival": null,
"Legs": [{
"LegType": "Scheduled",
"ModeType": "Train",
"DurationMinutes": null,
"ModeName": "Intercity",
"OperatorName": "NS",
"Destination": "Den Haag",
"Service": "G0746",
"Attributes": [],
]
}

 

OV Prijswijzer in the public transport travelling advice

This feature is optional and can be added to the 9292 Reisadvies API upon request.

By using the ‘OV Prijswijzer’ option, you will provide the traveller with appropriate subscription information for the train, bus, metro or tram of their travelling advice. The retrieval of this information is done using the ProductAdvice endpoint.

For more information about the ‘OV Prijswijzer’ we refer you to our website 9292.nl. There you will find the list of subscriptions used by the ‘OV Prijswijzer’.

ProductAdvice request

The ProductAdvice endpoint requires the following parameters to show the Prijswijzer API advice for a travel advice.

Parameter

Description (example)

JourneyId

A travel advice’s unique identifier

TravellerAge

Age (number between 4 and 100)

TravellerFrequencyPeriod

Period (number 1 or 2)

1=week,

2=month

TravellerFrequency

Number of days (number between 1 and 31, dependent on TravellerFrequencyPeriode)

If TravellerFrequencyPeriod = 1, then TravellerFrequency must be between 1 and 7.

If TravellerFrequencyPeriod = 2, then TravellerFrequency must be between 1 and 31.

Here is an example of a valid request with the following information:

Field

Parameter

JourneyId

station-alkmaar~station-utrecht-centraal~~0~C0nHlCAAB$$HmH040~~~B~9~129~~3600215~3627006~

Traveller's Age

24

Number of days

3

Period (week)

1

Request:

  • https://<RAPI domain>/v3/ProductAdvice?JourneyId=station-alkmaar~station-utrecht-centraal~~0~C0nHlCAAB$$HmH040~~~B~9~129~~
    3600215~3627006~
    &TravellerAge=24&TravellerFrequency=3&TravellerFrequencyPeriod=1

ProductAdvice response

In the example below, we show the XML & JSON of a ProductAdvice response.

Format

Example

XML

<ProductAdviceResponse
    <MonthBasedProducts>
        <ProductAdviceCollection>
            <ProductAdviceSubSet>
                <ProductAdvice>
                    <ProductDetail>
                        <AdditionalInformation i:nil="true" />
                        <CentrumZones i:nil="true" />
                        <InformationURL>https://9292.nl/prijzen-en-abonnementen/trein/abonnementen/altijd-voordeel#
                        </InformationURL>
                        <ProductCompanies />
                        <ProductName>Altijd Voordeel Maand</ProductName>
                        <ProductPrice>26402</ProductPrice>
                        <ProductRoutes>
                            <ProductRoute>
                                <Departure>Station Amsterdam Centraal</Departure>
                                <Destination>Station Leiden Centraal</Destination>
                                <TransportType>Train</TransportType>
                            </ProductRoute>
                            <ProductRoute>
                                <Departure>Station Leiden Centraal</Departure>
                                <Destination>Station Den Haag Centraal</Destination>
                                <TransportType>Train</TransportType>
                            </ProductRoute>
                        </ProductRoutes>
                        <ProductSaldoPrice>29877</ProductSaldoPrice>
                        <SaldoPrice>29877</SaldoPrice>
                        <StarValue i:nil="true" />
                    </ProductDetail>
                </ProductAdvice>
            </ProductAdviceSubSet>
        </ProductAdviceCollection>
    </MonthBasedProducts>
    <ROSMonthTotal>29877</ROSMonthTotal>
    <ROSYearTotal>358524</ROSYearTotal>
    <YearBasedProducts>
        <ProductAdviceCollection>
            <ProductAdviceSubSet>
                <ProductAdvice>
                    <ProductDetail>
                        <AdditionalInformation i:nil="true" />
                        <CentrumZones i:nil="true" />
                        <InformationURL>https://9292.nl/prijzen-en-abonnementen/trein/abonnementen/altijd-voordeel#
                        </InformationURL>
                        <ProductCompanies />
                        <ProductName>Altijd Voordeel Jaar</ProductName>
                        <ProductPrice>310819</ProductPrice>
                        <ProductRoutes>
                            <ProductRoute>
                                <Departure>Station Amsterdam Centraal</Departure>
                                <Destination>Station Leiden Centraal</Destination>
                                <TransportType>Train</TransportType>
                            </ProductRoute>
                            <ProductRoute>
                                <Departure>Station Leiden Centraal</Departure>
                                <Destination>Station Den Haag Centraal</Destination>
                                <TransportType>Train</TransportType>
                            </ProductRoute>
                        </ProductRoutes>
                        <ProductSaldoPrice>358524</ProductSaldoPrice>
                        <SaldoPrice>358524</SaldoPrice>
                        <StarValue i:nil="true" />
                    </ProductDetail>
                </ProductAdvice>
            </ProductAdviceSubSet>
        </ProductAdviceCollection>
    </YearBasedProducts>
</ProductAdviceResponse>

JSON

{
    "ROSYearTotal": 358524,
    "ROSMonthTotal": 29877,
    "YearBasedProducts": [{
        "ProductAdviceSubSet": [{
            "ProductDetail": {
                "ProductRoutes": [{
                        "Destination": "Station Leiden Centraal",
                        "Departure": "Station Amsterdam Centraal",
                        "TransportType": "Train"
                    },
                    {
                        "Destination": "Station Den Haag Centraal",
                        "Departure": "Station Leiden Centraal",
                        "TransportType": "Train"
                    }
                ],
                "InformationURL": "https://9292.nl/prijzen-en-abonnementen/trein/abonnementen/altijd-voordeel#",
                "ProductName": "Altijd Voordeel Jaar",
                "ProductPrice": 310819,
                "ProductSaldoPrice": 358524,
                "SaldoPrice": 358524,
                "StarValue": null,
                "CentrumZones": null,
                "AdditionalInformation": null,
                "ProductCompanies": []
            }
        }]
    }]
}

Accessible journeys in a public transport travelling advice

This optional feature can be added to the 9292 Reisadvies API at your request.

By using the option ‘Planning an accessible journey & Stop Accessibility’ you provide the traveler with the appropriate travel advice suited for someone with a physical disability. In addition, all travel advice (whether or not planned with accessibility) are provided with information regarding a stop's accessibility.

The following parameters are available to get an accessible public transport travel advice.

Parameter

Description (example)

PlanWithAccessibility

true

Business rules for an accessible travel advice

  • The walk speed is 45 meter per minute
  • Every transfer point uses 10 minutes extra transfer time
  • The 9292 Reisadvies API plans with accessible stops as indicated in the ‘CHB’ and with accessible vehicles as indicated by the public transport companies in the timetables

Accessibility of stops

The following attributes are added to the call element:

  • DisabledAccessible
    • This attribute can be used to determine whether or not a stop is wheelchair accessible
  • VisuallyAccessible
    • This attribute can be used to determine whether or not a stop is accessible for people with visual impairment

Possible values for these attributes:

Values

Meaning

Accessible

Stop is accessible

NotAccessible

Stop is not accessible

Unknown

No information available