I discovered a bug in my app where I’m not accounting for routes that serve the same bus stop in both directions. A specific example I’ve found is route N89 at Slade Green Station.
Querying the timetable for the route at this bus stop returns a disambiguation result:
Endpoint - https://api.tfl.gov.uk/Line/n89/Timetable/490001252A
{
"$type": "Tfl.Api.Presentation.Entities.TimetableResponse, Tfl.Api.Presentation.Entities",
"disambiguation": {
"$type": "Tfl.Api.Presentation.Entities.Timetables.Disambiguation, Tfl.Api.Presentation.Entities",
"disambiguationOptions": [
{
"$type": "Tfl.Api.Presentation.Entities.Timetables.DisambiguationOption, Tfl.Api.Presentation.Entities",
"description": "Erith Town Centre / Cross Street - Charing Cross Station",
"uri": "/Line/n89/Timetable/490001252A/inbound"
},
{
"$type": "Tfl.Api.Presentation.Entities.Timetables.DisambiguationOption, Tfl.Api.Presentation.Entities",
"description": "Trafalgar Square / Charing Cross Stn - Erith Town Centre / Riverside",
"uri": "/Line/n89/Timetable/490001252A/outbound"
}
]
}
}
Now querying one of the given URIs return a 404:
Request - https://api.tfl.gov.uk/Line/n89/Timetable/490001252A/inbound
{
"$type": "Tfl.Api.Presentation.Entities.ApiError, Tfl.Api.Presentation.Entities",
"timestampUtc": "2021-12-26T15:03:08.9300366Z",
"exceptionType": "EntityNotFoundException",
"httpStatusCode": 404,
"httpStatus": "NotFound",
"relativeUri": "/Line/n89/Timetable/490001252A/inbound",
"message": "Resource not found: http://api:8001/Line/n89/Timetable/490001252A/inbound"
}
Is this a known issue or is there something I’m doing incorrectly?