Hi everyone,
Apologies for what may be a very stupid question, I am very new to APIs and the data that TFL publish so I’m happy to just be pointed to some documentation that I missed.
I spent a couple of hours over the last few days wrestling with this and wanted clarification on what data is being sent back and what I can do with it.
What I wanted to do was fairly straightforward - I just wanted to bring back the predicted arival time for a local bus stop, however for this I needed the StopPoint ID.
I found that you can get a list back by searcing on a common name using this:
[https://api.tfl.gov.uk/StopPoint/Search/Mayplace]
Which is great.
However neither the icsId: 1015380 or the topMostParentId: 490G00015380 is the StopPoint id that works in this API call:
StopPoint/{id}/Arrivals
(had to de-link as I’m a new poster)
It wasn’t until I tried the SMS code for the bus stop:
[https://api.tfl.gov.uk/StopPoint/Search/74861]
That I ended up getting back the bit of data labelled as id: which had the code that I needed: 490015380E
This then works in the arrivals call:
StopPoint/490015380E/Arrivals
(had to de-link as I’m a new poster)
Which labels that code as the naptanId.
So my question is, how would you get from the topMostParentID 490G00015380 from the StopPoint/Search call to what the naptanId is for the actual stop, that can be used in the Arrivals call?
Thanks in advance
Ian