Track AliExpress and Cainiao Spain shipments through Madrid customs and EcoScooting final-mile delivery.

On AliExpress Choice and Cainiao Standard shipments to Spain and Portugal, Cainiao flies consolidated parcels into Madrid-Barajas or Liege and injects them into EcoScooting (`ecoscooting`), its dedicated Spanish last-mile delivery partner, or Correos Express.

Try a live tracking number:

Barcode transition: Cainiao to EcoScooting

Domestic Cainiao parcels keep the same 92… / 420… barcode from pickup to mailbox. Pass ?carrier=cainiao to inspect middle-mile sort scans before USPS induction.

Origin / middle-mile carrier
Cainiao (cainiao)
Cainiao LP… / CNESP… / ECSC… Barcode
^(LP\d{14,17}|CNESP[A-Z0-9]{10,16}|ECSC[A-Z0-9]{10,16}|\d{18,22})$
Origin example
CNESP1234567890123
Final-mile carrier
EcoScooting (ecoscooting)
EcoScooting Waybill
^(CNESP[A-Z0-9]{10,16}|ECSC[A-Z0-9]{10,16}|\d{18,22})$
Final-mile example
CNESP1234567890123
Middle-mile resolution
En reparto por el mensajero — EcoScooting Madrid (?carrier=ecoscooting)

How the Cainiao → EcoScooting handoff works

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

1. Cainiao consolidation in Dongguan / Hong Kong
Cainiao combines multiple AliExpress Choice items into a single bag labeled for Spanish final mile.
2. EU customs clearance & Madrid hub arrival
The shipment clears EU customs under IOSS and arrives at Cainiao's San Fernando de Henares (Madrid) sorting hub.
3. EcoScooting 7-day urban delivery
EcoScooting couriers scan the parcel at the local Spanish depot and deliver to the recipient's home or Cainiao locker.
Cainiao query
GET /v1/track/LP00612345678901?carrier=cainiao
EcoScooting query
GET /v1/track/CNESP1234567890123?carrier=ecoscooting
Spanish coverage
Supports CainiaoLP, CNESP, and numeric EcoScooting barcodes across mainland Spain and the Balearic Islands

Chain Cainiao → EcoScooting 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 middle-mile scans on the 92… barcode:
curl "https://api.lastscanned.com/v1/track/CNESP1234567890123?carrier=cainiao" \
  -H "Authorization: Bearer lsk_live_YOUR_API_KEY"

# 2. Query USPS final-mile scans on the same barcode:
curl "https://api.lastscanned.com/v1/track/CNESP1234567890123" \
  -H "Authorization: Bearer lsk_live_YOUR_API_KEY"

TypeScript (Automatic Handoff Chaining)

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

// If USPS is still waiting on the consolidator parcel, query Cainiao middle-mile hubs:
if (pkg.carrier === "usps" && pkg.status === "label_created" && /^(420\d{5})?9[2345]/.test(number)) {
  const mid = await fetch(`https://api.lastscanned.com/v1/track/${encodeURIComponent(number)}?carrier=cainiao`, { headers });
  if (mid.ok) pkg = await mid.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 Spain Linehaul to EcoScooting ECSC… & Correos Express Handoff FAQ

What is EcoScooting on my AliExpress tracking?
EcoScooting is the primary last-mile courier partner used by Cainiao and AliExpress Choice across major Spanish cities (Madrid, Barcelona, Valencia, Seville, Bilbao, and Zaragoza).
How can I track my EcoScooting package directly?
Pass your tracking number to GET /v1/track/{number}?carrier=ecoscooting (or ?carrier=cainiao for origin scans) on lastscanned.

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