# SPX Express Indonesia Tracking API & MCP

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

Query live **SPX Express Indonesia** (`spxid`, Shopee Xpress) parcel status and scan history in a single synchronous request. Both the SPX number and the Shopee order number are accepted.

## Overview & Quick Facts

| Property | Value |
|---|---|
| **Carrier slug (`?carrier=`)** | `spxid` |
| **Brand aliases** | SPX Indonesia, Shopee Xpress Indonesia, SPX ID |
| **Category** | Regional |
| **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`)** | `/^SPXID\d{11}[0-9A-Z]$/` | none | `SPXID01234567890A` |
| **Pass 2 (`mayMatch`)** | `/^ID\d{12}[0-9A-Z]?$/` | none | none |

These numbers belong to this carrier, so `?carrier=spxid` is optional.

## Synchronous `GET` Request & Normalized JSON Response

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

```json
{
  "carrier": "spxid",
  "trackingNumber": "SPXID01234567890A",
  "status": "delivered",
  "statusDescription": "Pesanan tiba di alamat tujuan.",
  "service": null,
  "deliveredAt": "2026-03-02T07:10:44Z",
  "deliveredAtLocal": null,
  "signedBy": null,
  "destination": null,
  "events": [
    {
      "timestamp": "2026-03-02T07:10:44Z",
      "localTime": null,
      "status": "delivered",
      "description": "Pesanan tiba di alamat tujuan.",
      "location": null,
      "code": "F980"
    },
    {
      "timestamp": "2026-03-02T05:02:10Z",
      "localTime": null,
      "status": "out_for_delivery",
      "description": "Pesanan dalam proses pengantaran.",
      "location": "Example Hub",
      "code": "F600"
    },
    {
      "timestamp": "2026-03-01T01:30:00Z",
      "localTime": null,
      "status": "label_created",
      "description": "Pengirim telah mengatur pengiriman.",
      "location": null,
      "code": "F000"
    }
  ]
}
```

## Notes

- **Source**: SPX's public tracking JSON on `spx.co.id`, shared by all five SPX countries (one factory, `platforms/spx.ts`). Hub names appear as the location when SPX gives one.
- **Statuses**: mapped from SPX's milestone and event codes (`F980` delivered, `F600` out for delivery, `F650` failed attempt, `F999` returned to sender).
- **Time zone**: Indonesia spans three zones, so only the UTC `timestamp` is given and `localTime` is `null`. Descriptions are in Indonesian.
- **Unknown numbers**: SPX answers an error body for numbers it has no record of, returned as `not_found`.

## Related Resources

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