# TDN Tracking API & MCP

URL: https://docs.lastscanned.com/carriers/tdn

Query live **TDN** (`tdn`) package status and scan history in a single synchronous `GET` request or MCP tool call. Pass `?carrier=tdn` (or the MCP `carrier` argument) so the lookup goes to TDN.

## Overview & Quick Facts

| Property | Value |
|---|---|
| **Carrier slug (`?carrier=`)** | `tdn` |
| **Brand aliases** | TDN, TDN Transporte y Distribucion Nacional, tdnonline.com |
| **Category** | Regional (domestic parcel, Spain) |
| **Single-package REST endpoint** | `GET https://api.lastscanned.com/v1/track/{trackingNumber}` |
| **Batch REST endpoint** | `GET https://api.lastscanned.com/v1/track?numbers=999900000019,...` |
| **MCP server (`https://mcp.lastscanned.com`)** | `track_package`, `track_packages`, `list_carriers` |
| **Authentication & pricing** | `Authorization: Bearer lsk_live_...` · 1 free keyless lookup/day per IP |

## Tracking Number Formats & Auto-Detection

| Pass | Rule / Regex | Check Digit | Examples |
|---|---|---|---|
| **Pass 1 (`matches`)** | none | none | none |
| **Pass 2 (`mayMatch`)** | none | none | none |

TDN's twelve-digit numbers start with `9999`, a shape FedEx's twelve-digit numbers also take, so pass `?carrier=tdn`. Accepted shape: `^9999\d{8}$`.

## Synchronous `GET` Request & Normalized JSON Response

```bash
curl -s "https://api.lastscanned.com/v1/track/999900000019?carrier=tdn" \
  -H "Authorization: Bearer $LASTSCANNED_API_KEY"
```

```json
{
  "carrier": "tdn",
  "trackingNumber": "999900000019",
  "status": "delivered",
  "statusDescription": "Entregado",
  "service": null,
  "deliveredAt": null,
  "deliveredAtLocal": "2026-03-12T11:17:00",
  "signedBy": null,
  "destination": null,
  "events": [
    {
      "timestamp": null,
      "localTime": "2026-03-12T11:17:00",
      "status": "delivered",
      "description": "Entregado",
      "location": "MADRID",
      "code": null
    }
  ]
}
```

## Notes

- **One scan**: TDN's page ends in one line, `Entregado - 028 MADRID - 12/03/2026 11:17` (status, delegation, date, time). That line is the only event, so `events` always has one entry.
- **Time zone**: the delegations include the islands, so the time carries `localTime` only.

## Related Resources

- **Regex & check digits**: [Tracking number formats & auto-detection](/formats)