# eMile Tracking API & MCP

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

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

## Overview & Quick Facts

| Property | Value |
|---|---|
| **Carrier slug (`?carrier=`)** | `emile` |
| **Brand aliases** | eMile, Emile, emileps.com |
| **Category** | Canadian final-mile delivery for cross-border parcels |
| **Single-package REST endpoint** | `GET https://api.lastscanned.com/v1/track/{trackingNumber}` |
| **Batch REST endpoint** | `GET https://api.lastscanned.com/v1/track?numbers=EM200006549049CA,EM200006549049CA` |
| **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`)** | `/^EM\d{12}CA$/` or `/^EM\d{16}CA$/` | none | `EM200006549049CA` |
| **Pass 2 (`mayMatch`)** | none | none | none |

These shapes belong to eMile alone, so `?carrier=emile` is optional.

## Synchronous `GET` Request & Normalized JSON Response

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

```json
{
  "carrier": "emile",
  "trackingNumber": "EM200006549049CA",
  "status": "delivered",
  "statusDescription": "DELIVERED",
  "service": null,
  "deliveredAt": "2026-02-04T20:54:10Z",
  "deliveredAtLocal": "2026-02-04T15:54:10",
  "signedBy": null,
  "destination": null,
  "events": [
    {
      "timestamp": "2026-02-04T20:54:10Z",
      "localTime": "2026-02-04T15:54:10",
      "status": "delivered",
      "description": "DELIVERED",
      "location": "Toronto, ON",
      "code": "40"
    },
    {
      "timestamp": "2026-02-04T02:25:19Z",
      "localTime": "2026-02-03T21:25:19",
      "status": "out_for_delivery",
      "description": "OUT FOR DELIVERY",
      "location": "Toronto",
      "code": "31"
    },
    {
      "timestamp": "2026-01-29T16:52:52Z",
      "localTime": "2026-01-29T16:52:52",
      "status": "label_created",
      "description": "Waybill Generated for EXAMPLE-ORDER",
      "location": null,
      "code": "10"
    }
  ]
}
```

## Notes

- **Request**: a small XML POST; the answer is XML. Phone numbers and the delivery postal code in the answer are not passed on.
- **Time zone**: each scan carries its own offset (`GMT-05:00`), so `timestamp` is exact.
- **Status**: point codes `10` waybill generated, `20`/`21`/`22`/`30` in transit, `31` out for delivery, `40` delivered.

## Related Resources

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