Track Cainiao, AliExpress, and SHEIN cross-border shipments into the UAE, Saudi Arabia, Mexico, and Brazil via iMile Delivery.

Cainiao partners with iMile Delivery (`imile`, 12–13 digit numeric barcodes) for e-commerce last-mile fulfillment across the GCC (UAE, Saudi Arabia, Kuwait, Qatar), Mexico, and Brazil, handing off air linehaul bags at Dubai (DXB), Riyadh (RUH), Mexico City (MEX), and São Paulo (GRU).

Try a live tracking number:

Barcode transition: Cainiao to iMile Delivery

When Cainiao clears customs and hands off to iMile Delivery, lastscanned surfaces the secondary tracking number in the top-level message field.

Origin / middle-mile carrier
Cainiao (cainiao)
Cainiao LP… or iMile 12–13 Digit Waybill
^(LP\d{14,17}|\d{12,13})$
Origin example
6091234567890
Final-mile carrier
iMile Delivery (imile)
iMile 12–13 Digit Waybill
^\d{12,13}$
Final-mile example
6091234567890
Extracted in .message
Shipment arrived at delivery station — iMile Dubai / Riyadh / CDMX

How the Cainiao → iMile handoff works

Follow the parcel across both networks without waiting on asynchronous webhooks or losing visibility at the handoff boundary.

1. Cainiao origin sort & pre-allocated iMile barcode
Cainiao assigns an iMile 13-digit tracking number at the Chinese export warehouse or links it to an LP… manifest.
2. Destination airport customs clearance
Consolidated air freight clears customs at Dubai, Riyadh, Mexico City, or São Paulo.
3. iMile local delivery station & WhatsApp/SMS dispatch
iMile scans the parcel at the local delivery station and dispatches a courier with live WhatsApp/SMS address confirmation.
Cainiao query
GET /v1/track/LP00612345678901?carrier=cainiao
Handoff resolution
Extracts the 12–13 digit iMile waybill from Cainiao's handoff metadata when shipped under an LP… origin number
Regions covered
UAE, Saudi Arabia, Oman, Kuwait, Mexico, Brazil, and Chile

Chain Cainiao → iMile in code or MCP

Resolve both legs synchronously in TypeScript, curl, or your AI support agent via Streamable HTTP MCP.

REST (Synchronous GET)

# 1. Query Cainiao origin waybill (extracts final-mile barcode in .message):
curl "https://api.lastscanned.com/v1/track/6091234567890" \
  -H "Authorization: Bearer lsk_live_YOUR_API_KEY"

# 2. Query the extracted iMile Delivery barcode:
curl "https://api.lastscanned.com/v1/track/6091234567890" \
  -H "Authorization: Bearer lsk_live_YOUR_API_KEY"

TypeScript (Automatic Handoff Chaining)

const headers = { Authorization: `Bearer ${process.env.LASTSCANNED_API_KEY}` };
const originRes = await fetch(`https://api.lastscanned.com/v1/track/${encodeURIComponent(number)}`, { headers });
const originPkg = await originRes.json();

// Extract secondary barcode from top-level message ("Shipment arrived at delivery station — iMile Dubai / Riyadh / CDMX")
const handoff = originPkg.message?.match(/^Handed to (.+?) as ([A-Z0-9-]+)$/i);
if (handoff) {
  const [, , lastMileNumber] = handoff;
  const destRes = await fetch(`https://api.lastscanned.com/v1/track/${encodeURIComponent(lastMileNumber)}`, { headers });
  const destPkg = await destRes.json();
}

Remote MCP (Claude Code / Cursor / ChatGPT)

claude mcp add --transport http lastscanned https://mcp.lastscanned.com \
  --header "Authorization: Bearer lsk_live_YOUR_API_KEY"

Cainiao Middle East & LATAM Linehaul to iMile Delivery Last-Mile Handoff FAQ

Why did my AliExpress tracking switch to a 13-digit number with iMile?
Cainiao handles the flight from China and hands the package to iMile Delivery for local doorstep delivery in the Middle East and Latin America.
What does 'Shipment arrived at delivery station' mean on iMile?
It means your parcel has reached the local iMile depot in your city and will typically go out for delivery within 24 hours.

Other carrier handoff guides

Explore cross-border last-mile barcode extraction and domestic USPS consolidator overrides across all 273 carriers.

All 273 supported carriers

International posts and couriers

Cross-border