Documentation: disruptions and engineering work
The webservice for disruptions and engineering work allows you to request information about disruptions and/or engineering work.
The following information is available upon request:
- current disruptions (=unscheduled disruptions + current engineering work)
- scheduled engineering work(=scheduled engineering work)
- current disruptions for a specific station (=unscheduled disruptions + current engineering work)
The information about disruptions can be requested using the following url:
|station||The code (abbreviation) or short, medium or full name or synonym for the station name. This parameter provides the information described below in section 3.||No|
|actual||Boolean (true or false) indicator of the current disruptions must be returned. This includes both unscheduled disruptions at the moment of the request, as well as engineering work scheduled to take place within two hours of the request. This parameter will provide the information described above in section 1.||Yes|
|unplanned||Boolean (true or false) indicator of the scheduled engineering work for the next two weeks must be returned. This parameter provides the information described above in section 2. Note: unplanned=true will return the scheduled engineering work. This is therefore the opposite of what the parameter name would imply.||No|
None of the parameters are required, but if no parameters are entered then 0 disruptions will be returned, which would be pointless in this case.
Note: the parameters can be combined freely, but this will generally return an illogical answer. Most users of the service will either request the current disruptions or scheduled engineering work or the disruptions and engineering work for a specific station.
The following two requests will return the same results:
Within NS, the response is known as a station report. It will return all relevant scheduled and unscheduled disruptions for the station Utrecht Centraal (code=ut). The response is as followed:
<Storingen> <Ongepland> <Storing> <id>prio-13345</id> <Traject>'s-Hertogenbosch-Nijmegen</Traject> <Reden>beperkingen op last van de politie</Reden> <Bericht></Bericht> <Datum>2010-12-16T11:16:00+0100</Datum> </Storing> </ongepland> <Gepland> <Storing> <id>2010_almo_wp_18_19dec</id> <Traject>Almere Oostvaarders-Weesp/Naarden-Bussum</Traject> <Periode>zaterdag 18 en zondag 19 december</Periode> <Reden>Limited train service: use bus and/or alternative route, extra travel time 15-30 min.</Reden> <Advies>Use an alternative train or bus. Travel between Weesp and Almere Centrum with NS bus instead of the train. Between Almere Centrum and Lelystad Centrum there are four Sprinters per hour. Travel between Almere Muziekwijk and Naarden-Bussum via Weesp</Advies> <Bericht></Bericht> </Storing> </Gepland> </Storingen>