# CityMail Tracking API & MCP

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

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

## Overview & Quick Facts

| Property | Value |
|---|---|
| **Carrier slug (`?carrier=`)** | `citymail` |
| **Brand aliases** | CityMail, CityMail Sweden, City Mail, citymail.se |
| **Category** | Swedish parcel and mail network |
| **Single-package REST endpoint** | `GET https://api.lastscanned.com/v1/track/{trackingNumber}` |
| **Batch REST endpoint** | `GET https://api.lastscanned.com/v1/track?numbers=BCMU118177365,BCMU118177365` |
| **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`)** | `/^BCM[A-Z]{1,2}\d{8,9}$/` | none | `BCMU118177365` |
| **Pass 2 (`mayMatch`)** | none | none | none |

Shapes this carrier uses:

- BCM + 1 to 2 letters + 8 to 9 digits: `^BCM[A-Z]{1,2}\d{8,9}$`

## Synchronous `GET` Request & Normalized JSON Response

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

```json
{
  "carrier": "citymail",
  "trackingNumber": "BCMU118177365",
  "status": "returned",
  "statusDescription": "Paketet hämtades inte ut i tid och skickas tillbaka till avsändaren",
  "service": null,
  "deliveredAt": null,
  "deliveredAtLocal": null,
  "signedBy": null,
  "destination": null,
  "events": [
    {
      "timestamp": "2026-07-21T11:00:00Z",
      "localTime": "2026-07-21T13:00:00",
      "status": "returned",
      "description": "Paketet hämtades inte ut i tid och skickas tillbaka till avsändaren",
      "location": null,
      "code": null
    },
    {
      "timestamp": "2026-07-15T06:30:00Z",
      "localTime": "2026-07-15T08:30:00",
      "status": "exception",
      "description": "Paketet har levererats till ombud",
      "location": "ÖR LIVS",
      "code": null
    },
    {
      "timestamp": "2026-07-06T05:59:00Z",
      "localTime": "2026-07-06T07:59:00",
      "status": "in_transit",
      "description": "Paketet är på väg till ombud",
      "location": "CityMail-kontor Sundbyberg",
      "code": null
    },
    {
      "timestamp": "2026-06-30T15:34:00Z",
      "localTime": "2026-06-30T17:34:00",
      "status": "label_created",
      "description": "Vi har fått en beställning på en leverans och väntar på paketet",
      "location": null,
      "code": null
    }
  ]
}
```

## Notes

- **Wording**: scans are in Swedish.
- **Pickup points**: delivery to a pickup agent (ombud) is `exception` until collected; an unclaimed parcel sent back is `returned`.
- **Time zone**: Swedish local time; `timestamp` converts from `Europe/Stockholm`. The sender's name shown on the page is not returned.

## Related Resources

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