# UBI Smart Parcel Tracking API & MCP

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

Query live **UBI Smart Parcel** (`ubi`) cross-border package status, scan history, and **destination carrier handoff numbers** (Australia Post, Aramex, Team Global Express, Dragonfly, iMile) in a single synchronous `GET` request or MCP tool call. `lastscanned` auto-detects 15-character `AU…` UBI tracking numbers in Pass 1 and returns a normalized `TrackingResult` JSON payload—without requiring an eTower / UBI shipper account.

## Overview & Quick Facts

| Property | Value |
|---|---|
| **Carrier slug (`?carrier=`)** | `ubi` |
| **Brand & service aliases** | UBI Smart Parcel, UBI Logistics, Gotoubi (`ubismartparcel.com`, `shipper.ubismartparcel.com`) |
| **Category** | Cross-border e-commerce logistics carrier — China to Australia, Canada & global (Detection precedence **#29 of 31**) |
| **Single-package REST endpoint** | `GET https://api.lastscanned.com/v1/track/{trackingNumber}` |
| **Batch REST endpoint** | `GET https://api.lastscanned.com/v1/track?numbers=AU000...,AU000...` (up to 30 UBI numbers per batch; up to 100 total numbers) |
| **MCP server (`https://mcp.lastscanned.com`)** | `track_package`, `track_packages`, `list_carriers` (`claude mcp add --transport http lastscanned https://mcp.lastscanned.com`) |
| **Authentication & pricing** | `Authorization: Bearer lsk_live_...` · **1 free keyless lookup/day per IP** · **Free tier** (5 unique numbers/day, $0) · **Pro** ($4.99/mo for 1,000 unique numbers, unlimited re-polls, $0.015/extra) · **HTTP 402 Stripe MPP** ($0.50 for 25-number `lsk_pack_` key or $0.02/number in USDC on Tempo) |

## Why developers use `lastscanned` for UBI Smart Parcel

- **Deduplicates dual-number scans & filters future flight bookings**: UBI's eTower portal mixes UBI's own origin scans in China with relayed partner scans filed under the destination carrier's barcode—often emitting duplicate events 1 second apart under both tracking numbers, pre-populating future flight departure timestamps before the flight has taken off, and stamping `"Out for delivery"` and `"Delivered"` at the exact same minute. `lastscanned` deduplicates dual-number scans, filters out future-dated flight projections, orders `"Delivered"` ahead of same-minute `"Out for delivery"` scans, and ensures a partner's mid-transit electronic manifest (`INF`) never resets an `in_transit` parcel back to `label_created`.
- **Automatic last-mile carrier & exchange number extraction**: UBI hands parcels over to **Australia Post** (`auspost.com.au`), **Aramex** (`aramex.com.au`), **Team Global Express** (`teamglobalexp.com`), **Dragonfly** (`dragonflyshipping.com.au`), **iMile**, or **[Canada Post](/carriers/canadapost)**. `lastscanned` extracts both the partner carrier name and secondary barcode into top-level `message` (e.g. `"Handed to Australia Post as 33X9K012345601000930905"`).

## Tracking Number Formats & Auto-Detection (`matches` vs `mayMatch`)

UBI Smart Parcel is evaluated **twenty-ninth (#29)** in `lastscanned`'s two-pass detector:

| Pass | Rule / Regex | Check Digit | Examples |
|---|---|---|---|
| **Pass 1 (`matches`)** | `/^AU\d{13}$/i` (`AU` + 13 digits = 15 chars) | — | `AU0000001234567`, `AU0000006050000` |
| **Pass 2 (`mayMatch`)** | *None* | — | — |

### When is `?carrier=ubi` optional vs required?

- **Optional (auto-detected)**: All 15-character `AU` + 13-digit UBI Smart Parcel numbers auto-detect in Pass 1.
- **Required (`?carrier=ubi`)**: When querying UBI by the destination partner's barcode (such as an Australia Post barcode, an Aramex `MP…` number, or a 16-digit [Canada Post](/carriers/canadapost) PIN that would otherwise route to `canadapost` in Pass 1).

## Synchronous `GET` Request & Normalized JSON Response

### `curl`

```bash
curl -s "https://api.lastscanned.com/v1/track/AU0000001234567" \
  -H "Authorization: Bearer $LASTSCANNED_API_KEY"
```

### JavaScript / TypeScript (`fetch`)

```ts
const res = await fetch("https://api.lastscanned.com/v1/track/AU0000001234567", {
  headers: { Authorization: `Bearer ${process.env.LASTSCANNED_API_KEY}` },
});
const pkg = await res.json();
console.log(pkg.status, pkg.message, pkg.events[0]);
```

### MCP `track_package` tool call

```json
{
  "tool": "track_package",
  "arguments": {
    "tracking_number": "AU0000001234567"
  }
}
```

### Normalized `TrackingResult` JSON response

```json
{
  "carrier": "ubi",
  "trackingNumber": "AU0000001234567",
  "status": "delivered",
  "statusDescription": "Delivered - Left in a safe place",
  "service": null,
  "deliveredAt": "2026-10-26T00:05:07Z",
  "deliveredAtLocal": "2026-10-26T11:05:07",
  "signedBy": null,
  "destination": {
    "city": null,
    "state": null,
    "country": "AU"
  },
  "message": "Handed to Australia Post as 33X9K012345601000930905",
  "events": [
    {
      "timestamp": "2026-10-26T00:05:07Z",
      "localTime": "2026-10-26T11:05:07",
      "status": "delivered",
      "description": "Delivered - Left in a safe place",
      "location": "PARRAMATTA, NSW",
      "code": "DLD"
    },
    {
      "timestamp": "2026-10-25T21:18:00Z",
      "localTime": "2026-10-26T08:18:00",
      "status": "out_for_delivery",
      "description": "Onboard for delivery",
      "location": "PARRAMATTA, NSW",
      "code": "INF-OFD"
    },
    {
      "timestamp": null,
      "localTime": "2026-10-23T14:40:00",
      "status": "in_transit",
      "description": "Customs clearance completed",
      "location": "SYDNEY",
      "code": "CCD"
    },
    {
      "timestamp": "2026-10-20T09:12:00Z",
      "localTime": "2026-10-20T17:12:00",
      "status": "label_created",
      "description": "Shipping information approved by Australia Post",
      "location": null,
      "code": "INF"
    }
  ]
}
```

> **Raw status & event codes**: `events[].code` preserves UBI's eTower event code (`"INF"` shipping information / manifest, `"RCV"` received at hub, `"SCN"` transit scan, `"LHL"` linehaul flight, `"CCD-EXP"`/`"CCD"` customs clearance, `"ARR"`/`"BSE"` arrived in destination country, `"HDD"` handed to last-mile carrier, `"RSN"` new tracking number assigned, `"CRD"` awaiting collection, `"INF-OFD"` out for delivery, `"DLV"`/`"DLV-DLF"` failed delivery attempt, `"DLD"` delivered, `"RTN"` returned).

## Related Resources

- **Live browser lookup tool**: [Track a UBI Smart Parcel package live on lastscanned.com/lookup/ubi](https://lastscanned.com/lookup/ubi)
- **Carrier hub**: [All 31 supported carriers](/carriers)
- **Regex & check digits**: [Tracking number formats & auto-detection](/formats)
- **AI support workflows**: [WISMO AI agents & synchronous tracking](/wismo)
