Journey Planner: Alternative routes due to disruptions

Hi There,

Is there a way I can use the Unified API to suggest alternative routes when disruption(s) are indicated on a particular journey?

Thanks

Hi @SachinK

I think the idea is that it does that anyway. It will certainly do it know changes, but do you mean unknown unknowns like bus stop closures or burst water mains?

Hi Briantist,

I noticed the optional disruption object returned as part of the JSON response to the journey planner call. In the event this is returned I would like to re-query the journey planner for an alternative route.
If you’re saying that it already does this then what would be the purpose of the disruption object if a diversion is always returned by the journey planner?

@SachinK

I’ve just looked at https://api.tfl.gov.uk/journey/journeyresults/aresenal/to/940GZZLUBBN and I can see that returned results are messages to display about the route returned. So the Central line…

Or one of the stations

Or both.

I would say from these results you don’t need to do anything other than display these messages to the end user.

I can confirm from integrating the Journey Planner API into my app the last week that it does return alternative routes/modes for all valid searches I’ve tried, and if you restrict modes and the services you’re expecting are not running, it tells you to walk. I haven’t tried excluding walking as an option.

1 Like