# Nacex Tracking API & MCP

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

Query live **Nacex (Spain / Portugal)** (`nacex`) package status and scan history in a single synchronous `GET` request or MCP tool call.

## Overview & Quick Facts

| Property | Value |
|---|---|
| **Carrier slug (`?carrier=`)** | `nacex` |
| **Brand aliases** | Nacex, Nacex Spain, Nacex Portugal |
| **Category** | Regional express (Spain, Portugal) |
| **Single-package REST endpoint** | `GET https://api.lastscanned.com/v1/track/{trackingNumber}` |
| **Batch REST endpoint** | `GET https://api.lastscanned.com/v1/track?numbers=...,...` |
| **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`)** | `/^\d{4}\/\d{8}$/` (agency/waybill) | none | `1234/12345678` |
| **Pass 2 (`mayMatch`)** | none | none | none |

| Format | Pattern |
|---|---|
| Agency / waybill | `^\d{4}/\d{8}$` |

Shapes this carrier does not own alone are not auto-detected; pass `?carrier=nacex`.

## Synchronous `GET` Request & Normalized JSON Response

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

```json
{
  "carrier": "nacex",
  "trackingNumber": "1234/12345678",
  "status": "delivered",
  "statusDescription": "Entregado",
  "service": "E-NACEX",
  "deliveredAt": null,
  "deliveredAtLocal": "2026-07-01T13:24:00",
  "signedBy": "MARIA PEREZ",
  "destination": null,
  "events": [
    {
      "timestamp": null,
      "localTime": "2026-07-01T13:24:00",
      "status": "delivered",
      "description": "Entregado",
      "location": "3014 - MOLINA S.",
      "code": null
    },
    {
      "timestamp": null,
      "localTime": "2026-07-01",
      "status": "out_for_delivery",
      "description": "En reparto",
      "location": "3014 - MOLINA S.",
      "code": null
    },
    {
      "timestamp": null,
      "localTime": "2026-06-29",
      "status": "in_transit",
      "description": "En tránsito",
      "location": "9028 - PLATMADRID",
      "code": null
    }
  ]
}
```

## Notes

- **Number**: the 4-digit agency, a slash, and the 8-digit waybill (`1234/12345678`); `1234-12345678` is accepted too.
- **Dates only**: the page lists scans under date headings without times. Only the delivery has a time (its 'Hora entrega'), so other events carry a date in `localTime` and `timestamp` is `null`. Scans from one day keep the carrier's order, newest first.
- Descriptions are in Spanish.

## Related Resources

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