destinationNaptanId is empty for some arrivals

Hi all!

My request

GET https://api.tfl.gov.uk/Line/dlr/Arrivals?app_key={my key here}

I’m wondering why some items don’t have destinationNaptanId
For example:

{
        "$type": "Tfl.Api.Presentation.Entities.Prediction, Tfl.Api.Presentation.Entities",
        "id": "-1696309169",
        "operationType": 1,
        "vehicleId": "",
        "naptanId": "940GZZDLBEC",
        "stationName": "Beckton DLR Station",
        "lineId": "dlr",
        "lineName": "DLR",
        "platformName": "Platform 1",
        "direction": "",
        "bearing": "",
        "destinationName": "Canning Town",
        "timestamp": "2023-01-13T16:41:42.2720704Z",
        "timeToStation": 407,
        "currentLocation": "",
        "towards": "",
        "expectedArrival": "2023-01-13T16:48:29Z",
        "timeToLive": "2023-01-13T16:48:29Z",
        "modeName": "dlr",
        "timing": {
            "$type": "Tfl.Api.Presentation.Entities.PredictionTiming, Tfl.Api.Presentation.Entities",
            "countdownServerAdjustment": "00:00:00",
            "source": "0001-01-01T00:00:00",
            "insert": "0001-01-01T00:00:00",
            "read": "2023-01-13T16:42:29.87Z",
            "sent": "2023-01-13T16:41:42Z",
            "received": "0001-01-01T00:00:00"
        }
    },

In the response items with destinationName Canning Town and CANNING TOWN don’t have destinationNaptanId

Is it a bug?

Welcome @volodymyr

From memory, sometime the DLR Operations can override the timetable to allow trains to go to non-standard destinations. This is most notable when there are emergency engineering works. This often results in destinationName being all caps, and the destinationNaptanId being omitted.

I suspect if we ask @jamesevans it might be possible for the destinationNaptanId data to be correctly provided.

The DLR is oddly flexible in it’s operations as there are quite a few built-in sidings and almost every station is reversible.

( Canning Town isn’t typically a destination for the DLR, but there has been a off-peak Canning Town to Beckton shuttle at times plus there are to/from depot trains).

1 Like

hi @volodymyr - welcome to the community.

From what I can tell we use a regex to map the destination station name in the source data to a NaPTAN code.

I’ll get a bug raised to investigate why Canning Town (and potentially others) is not mapped.

UPDATE: bug 83628 raised.

Thanks,
James

2 Likes