I have been using the Journey Planner API for TFL. It works great for the most part but there is a discrepancy I have noticed in the api response.
In the response for the Journey Planner API request,
https://api.tfl.gov.uk//journey/journeyresults/51.51564%2C-0.1811/to/51.52557%2C-0.08807
I am looking for NaptanIds of departure points. These Ids are different for all stops as in, sometimes I get back an actual NaptanId like
“departurePoint”: {
“$type”: “Tfl.Api.Presentation.Entities.StopPoint, Tfl.Api.Presentation.Entities”,
“naptanId”: “940GZZDLBNK”,
“platformName”: “”,
“icsCode”: “1000013”,
“commonName”: “Bank DLR Station”,
“placeType”: “StopPoint”,
“additionalProperties”: [],
“lat”: 51.51232119841,
“lon”: -0.08786127878
},
And sometimes I get back an Id that is different and does not correspond to the NaptanID of the station
“departurePoint”: {
“$type”: “Tfl.Api.Presentation.Entities.StopPoint, Tfl.Api.Presentation.Entities”,
“naptanId”: “490G00133B”,
“platformName”: “”,
“icsCode”: “1000133”,
“commonName”: “Lancaster Gate Station”,
“placeType”: “StopPoint”,
“additionalProperties”: [],
“lat”: 51.51178015795,
“lon”: -0.17468494328
},
I have confirmed this by using the stop point API,
https://api.tfl.gov.uk/StopPoint/Search/Lancaster%20Gate?modes=tube
{ “$type”: “Tfl.Api.Presentation.Entities.SearchResponse, Tfl.Api.Presentation.Entities”, “query”: “Lancaster Gate”, “total”: 1, “matches”: [ { “$type”: “Tfl.Api.Presentation.Entities.MatchedStop, Tfl.Api.Presentation.Entities”, “icsId”: “1000133”, “topMostParentId”: “940GZZLULGT”, “modes”: [ “tube”, “bus” ], “id”: “940GZZLULGT”, “name”: “Lancaster Gate Underground Station”, “lat”: 51.511723, “lon”: -0.175494 } ] }
Could you please help me with this.