# MRW Tracking API & MCP

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

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

## Overview & Quick Facts

| Property | Value |
|---|---|
| **Carrier slug (`?carrier=`)** | `mrw` |
| **Brand aliases** | MRW, MRW Spain, MRW 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{5}[A-Z]\d{6}$/` | none | `04000A123456` |
| **Pass 2 (`mayMatch`)** | none | none | none |

| Format | Pattern |
|---|---|
| Waybill (5 digits, letter, 6 digits) | `^\d{5}[A-Z]\d{6}$` |

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

## Synchronous `GET` Request & Normalized JSON Response

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

```json
{
  "carrier": "mrw",
  "trackingNumber": "04000A123456",
  "status": "delivered",
  "statusDescription": "Envío entregado",
  "service": null,
  "deliveredAt": null,
  "deliveredAtLocal": "2026-09-10T19:29:00",
  "signedBy": null,
  "destination": null,
  "events": [
    {
      "timestamp": null,
      "localTime": "2026-09-10T19:29:00",
      "status": "delivered",
      "description": "Envío entregado",
      "location": "28931 Móstoles",
      "code": null
    },
    {
      "timestamp": null,
      "localTime": "2026-09-10T13:38:00",
      "status": "out_for_delivery",
      "description": "Envío en reparto",
      "location": "28931 Móstoles",
      "code": null
    },
    {
      "timestamp": null,
      "localTime": "2026-09-07T13:41:00",
      "status": "in_transit",
      "description": "Envío recogido en origen",
      "location": "46410 Sueca",
      "code": null
    }
  ]
}
```

## Notes

- **Session flow**: MRW keeps the number in an ASP session, so each lookup is a short sequence (about two seconds, run one at a time in a batch).
- **Purged history**: when MRW has dropped the scans but kept the final state, the result has that one event.
- **Local time only**: Spain and Portugal are an hour apart and the page prints no zone, so `timestamp` is `null`. Descriptions are in Spanish.

## Related Resources

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