# Cacesa Tracking API & MCP

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

Query live **Cacesa** (`cacesa`) package status and scan history in a single synchronous `GET` request or MCP tool call.

## Overview & Quick Facts

| Property | Value |
|---|---|
| **Carrier slug (`?carrier=`)** | `cacesa` |
| **Brand aliases** | Cacesa, Cacesa Logistica, CNPRT |
| **Category** | Spanish parcel and e-commerce logistics |
| **Single-package REST endpoint** | `GET https://api.lastscanned.com/v1/track/{trackingNumber}` |
| **Batch REST endpoint** | `GET https://api.lastscanned.com/v1/track?numbers=CNPRT19580011234003703621,CNPRT19580011234003703621` |
| **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`)** | `/^CNPRT\d{20}$/` | none | `CNPRT19580011234003703621` |
| **Pass 2 (`mayMatch`)** | none | none | none |

Shapes this carrier uses:

- CNPRT + 20 digits: `^CNPRT\d{20}$`

## Synchronous `GET` Request & Normalized JSON Response

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

```json
{
  "carrier": "cacesa",
  "trackingNumber": "CNPRT19580011234003703621",
  "status": "in_transit",
  "statusDescription": "Parcel is going out from Cacesa facilities - More delivery information check with transport company.",
  "service": null,
  "deliveredAt": null,
  "deliveredAtLocal": null,
  "signedBy": null,
  "destination": null,
  "events": [
    {
      "timestamp": "2026-02-10T14:47:08Z",
      "localTime": "2026-02-10T15:47:08",
      "status": "in_transit",
      "description": "Parcel is going out from Cacesa facilities - More delivery information check with transport company.",
      "location": null,
      "code": "ico_almacen"
    },
    {
      "timestamp": "2026-02-10T14:42:09Z",
      "localTime": "2026-02-10T15:42:09",
      "status": "in_transit",
      "description": "Customs cleared-Green channel",
      "location": null,
      "code": "ico_okaduana"
    },
    {
      "timestamp": "2026-02-06T10:13:16Z",
      "localTime": "2026-02-06T11:13:16",
      "status": "label_created",
      "description": "Electronic notification of shipment received",
      "location": null,
      "code": "ico_notification"
    }
  ]
}
```

## Notes

- **Hand-off**: the last scan tells you to check the transport company for delivery; Cacesa does not return the onward carrier's number.
- **Time zone**: Cacesa prints Madrid time; `timestamp` converts from `Europe/Madrid`.
- **`code`** is the icon name Cacesa uses for the milestone.

## Related Resources

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