# PostEx Tracking API & MCP

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

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

## Overview & Quick Facts

| Property | Value |
|---|---|
| **Carrier slug (`?carrier=`)** | `postex` |
| **Brand aliases** | PostEx Pakistan, PostEx.pk, PostEx Courier |
| **Category** | Pakistani domestic courier (cash on delivery) |
| **Region** | Pakistan |
| **Single-package REST endpoint** | `GET https://api.lastscanned.com/v1/track/{trackingNumber}` |
| **Batch REST endpoint** | `GET https://api.lastscanned.com/v1/track?numbers=21000000123456,...` |
| **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`)** | none | none | none |
| **Pass 2 (`mayMatch`)** | none | none | none |

PostEx numbers are 14 digits, a shape other carriers use, so pass `?carrier=postex`.

## Synchronous `GET` Request & Normalized JSON Response

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

```json
{
  "carrier": "postex",
  "trackingNumber": "21000000123456",
  "status": "delivered",
  "statusDescription": "Delivered to Customer",
  "service": null,
  "deliveredAt": "2026-03-02T17:20:03Z",
  "deliveredAtLocal": "2026-03-02T22:20:03",
  "signedBy": null,
  "destination": null,
  "events": [
    {
      "timestamp": "2026-03-02T17:20:03Z",
      "localTime": "2026-03-02T22:20:03",
      "status": "delivered",
      "description": "Delivered to Customer",
      "location": null,
      "code": "0005"
    },
    {
      "timestamp": "2026-03-02T07:57:58Z",
      "localTime": "2026-03-02T12:57:58",
      "status": "out_for_delivery",
      "description": "Enroute for Delivery",
      "location": null,
      "code": "0004"
    },
    {
      "timestamp": "2026-02-28T06:14:04Z",
      "localTime": "2026-02-28T11:14:04",
      "status": "label_created",
      "description": "At Example Store Warehouse",
      "location": null,
      "code": "0001"
    }
  ]
}
```

## Notes

- **Time zone**: PostEx sends ISO times with a `+0500` offset (Pakistan), so `timestamp` is exact.
- **Privacy**: the reply also names the consignee; the adapter does not pass that on.

## Related Resources

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