# HuaHan Logistics Tracking API & MCP

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

Query live **HuaHan Logistics** (`huahan`) package status, scan history, and the **destination carrier's tracking number** in a single synchronous `GET` request or MCP tool call. `lastscanned` auto-detects `HHW…YQ` numbers.

## Overview & Quick Facts

| Property | Value |
|---|---|
| **Carrier slug (`?carrier=`)** | `huahan` |
| **Brand aliases** | HuaHan, HuaHan Logistics, 华翰物流, hh-exp |
| **Category** | Cross-border e-commerce parcels |
| **Single-package REST endpoint** | `GET https://api.lastscanned.com/v1/track/{trackingNumber}` |
| **Batch REST endpoint** | `GET https://api.lastscanned.com/v1/track?numbers=HHW...,HHW...` |
| **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`)** | `/^HHW[A-Z]{2}\d{10}[A-Z]{2}$/` | none | `HHWAB1234000001YQ` |
| **Pass 2 (`mayMatch`)** | none | none | none |

`HHW` numbers belong to HuaHan alone, so `?carrier=huahan` is optional.

## Synchronous `GET` Request & Normalized JSON Response

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

```json
{
  "carrier": "huahan",
  "trackingNumber": "HHWAB1234000001YQ",
  "status": "in_transit",
  "statusDescription": "Arrived at origin facility",
  "service": null,
  "deliveredAt": null,
  "deliveredAtLocal": null,
  "signedBy": null,
  "destination": { "city": null, "state": null, "country": "US" },
  "message": "Handed to USPS as 9400100000000000000000",
  "events": [
    {
      "timestamp": null,
      "localTime": "2026-10-05T14:26:15",
      "status": "in_transit",
      "description": "Arrived at origin facility",
      "location": "SHENZHEN",
      "code": "AF"
    },
    {
      "timestamp": null,
      "localTime": "2026-10-05T14:07:43",
      "status": "label_created",
      "description": "Shipment information received",
      "location": "CHINA",
      "code": "IR"
    }
  ]
}
```

## Notes

- **Handoff**: `message` names the delivery partner and its number (for example `"Handed to USPS as 9400100000000000000000"`). Pass that number to `GET /v1/track/{number}` for the partner's own scans. The `_D104`-style suffix HuaHan appends is dropped.
- **Verification step**: HuaHan's tracking page asks a simple arithmetic question (such as "12 + 5 = ?") before it looks a number up. This carrier answers it with a strict parser (two whole numbers and `+`, `-` or `×`); anything else is a failed lookup, never a guess.
- **Rate limit**: the site allows a limited number of verifications per IP per hour. Lookups are automatically retried when upstream rate-limiting is encountered.
- **Time zone**: scan times carry no zone on HuaHan's page, so only `localTime` is set and `timestamp` is `null`.
- **Not found**: an unknown number returns `404 not_found`.

## Related Resources

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