# iMile Tracking API & MCP

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

Query live **iMile** (`imile`) package status and scan history in a single synchronous `GET` request or MCP tool call. `lastscanned` auto-detects the number format below.

## Overview & Quick Facts

| Property | Value |
|---|---|
| **Carrier slug (`?carrier=`)** | `imile` |
| **Brand aliases** | iMile, iMile Delivery, imile.com |
| **Category** | Middle East, Australia and Latin America last-mile courier |
| **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`)** | `/^IM0601\d{10}$/` | none | `3781052124989` |
| **Pass 2 (`mayMatch`)** | none | none | none |

`iMile` numbers are claimed by `imile`, so `?carrier=imile` is optional.

## Synchronous `GET` Request & Normalized JSON Response

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

```json
{
  "carrier": "imile",
  "trackingNumber": "3781052124989",
  "status": "delivered",
  "statusDescription": "Your order has been delivered successfully.",
  "service": null,
  "deliveredAt": null,
  "deliveredAtLocal": "2026-09-30T12:52:30",
  "signedBy": null,
  "destination": null,
  "message": null,
  "events": [
    {
      "timestamp": null,
      "localTime": "2026-09-30T12:52:30",
      "status": "delivered",
      "description": "Your order has been delivered successfully.",
      "location": "Sydney Center",
      "code": "2060"
    },
    {
      "timestamp": null,
      "localTime": "2026-09-28T17:27:30",
      "status": "out_for_delivery",
      "description": "Our delivery associate is out for delivery.",
      "location": "Sydney Center",
      "code": "1003"
    },
    {
      "timestamp": null,
      "localTime": "2026-09-24T12:14:05",
      "status": "in_transit",
      "description": "Parcel is currently being processed.",
      "location": "Sydney Center",
      "code": "1003"
    }
  ]
}
```

## Notes

- **Signed request**: the tracking page sends `sign`, the waybill number RSA-encrypted (PKCS#1 v1.5) with the public key in its own script, and `code`, an MD5 of the number plus a constant. Both are built per lookup.
- **Time zone**: iMile prints scan times without a zone (the parcel's own country, and it serves several), so `timestamp` is `null` and only `localTime` is set.
- **Detection**: only the `IM0601…` form is claimed; the plain 13-digit waybills are a shape other carriers use.

## Related Resources

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