Extracting the towards (terminating) station when planning a jounrey

46 views
Skip to first unread message

James Fisk

unread,
Jan 6, 2026, 5:31:26 AM (4 days ago) Jan 6
to A gathering place for the Open Rail Data community
Hi,

We currently use https://ojp.nationalrail.co.uk/webservices SOAP service to help plan a journey in our application.

In order to help our users we want to add the terminating station to each leg of the journey from the planned journey , so that they can be assured they are getting on the correct train.

The results we are getting do not seem to yield that information.  I have included the screen shot from national rail to show what we are trying to achieve.

One burning question, does the nation rail web site that i got the screen shot from use darwin, or does it use another API that we are unaware of?

If you need more info on this, then give me a shout and i'll try and provide as much info as i can.

Thank you
towardseuston.png

Peter Hicks

unread,
Jan 6, 2026, 5:40:02 AM (4 days ago) Jan 6
to openrail...@googlegroups.com
Hi James

On Tuesday, 6 January 2026 at 10:31, James Fisk <james...@gmail.com> wrote:

We currently use https://ojp.nationalrail.co.uk/webservices SOAP service to help plan a journey in our application.

In order to help our users we want to add the terminating station to each leg of the journey from the planned journey , so that they can be assured they are getting on the correct train.

Make sure you test the scenarios where a train splits and joins en route.  Suppose an LNR service splits at Northampton, with a portion to Birmingham and a portion to Crewe.  If you're boarding before the split for Stafford, you want to display "Service to Birmingham New Street & Crewe", and if you're boarding after, you want to display the destination of that portion of the train.  In reverse, if you're boarding at Stafford and the train joins on to a Crewe - Euston service, the timetable for the Stafford train will show a destination of Northampton and a 'join' activity, so you'll want to pick up the ultimate destination from the 'through' train, i.e. London Euston.

The results we are getting do not seem to yield that information. I have included the screen shot from national rail to show what we are trying to achieve.

The output you see on the OJP website may well have more data than is available in the OJP API itself.  Nothing wrong with that - a newer version of the API may have been developed which you're not using, or the front-end may be adding on data from elsewhere.  In this case, it looks like it's picking up the destination from the timetable, possibly by making a "show me all stops" type API call on the Live Departure Boards API.


Peter

James Fisk

unread,
Jan 6, 2026, 6:02:19 AM (4 days ago) Jan 6
to A gathering place for the Open Rail Data community
Thanks for that reply, that is a good heads up on potential splits, furthermore, you managed a new version of the OJP API, how would I go about accessing that?

Peter Hicks

unread,
Jan 6, 2026, 6:05:03 AM (4 days ago) Jan 6
to openrail...@googlegroups.com
On Tuesday, 6 January 2026 at 11:02, James Fisk <james...@gmail.com> wrote:

Thanks for that reply, that is a good heads up on potential splits, furthermore, you managed a new version of the OJP API, how would I go about accessing that?

I'm not saying there is​ a newer version of the API, but check that you are using the latest WSDL.  The SOAP interface is versioned so that newer versions can be released with breaking changes, and systems using the previous/older versions can continue running as normal.


Peter

James Fisk

unread,
Jan 6, 2026, 6:45:09 AM (4 days ago) Jan 6
to A gathering place for the Open Rail Data community
Good point about the WSDL, that is helpful.  I'll have a look at that.
Reply all
Reply to author
Forward
0 new messages