How to track Cainiao AliExpress shipments handed off to CTT Expresso in Portugal & CTT Express in Spain

Cainiao routes AliExpress Portugal and Iberian shipments via Madrid (`MAD`) or Lisbon (`LIS`) customs and injects them into CTT Expresso Portugal (`DA...PT`, `LA...PT`, `008...`) and CTT Express Spain (`008...` / `34...`) for home or Locky locker delivery.

Try a live tracking number:

Barcode transition: Cainiao Smart Logistics to CTT Expresso (Portugal & Spain)

When Cainiao Smart Logistics clears customs and hands off to CTT Expresso (Portugal & Spain), lastscanned surfaces the secondary tracking number in the top-level message field.

Origin / middle-mile carrier
Cainiao Smart Logistics (cainiao)
Cainiao LP / CNPRT Tracking ID
LP00... or CNPRT... / S10
Origin example
LP00639182736452
Final-mile carrier
CTT Expresso (Portugal & Spain) (ctt)
CTT Expresso 13-Char / 22-Digit ID
DA...PT / LA...PT / 008...
Final-mile example
DA948201948PT
Extracted in .message
DA948201948PT

How the Cainiao → CTT Expresso handoff works

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

1. Cainiao Iberian Sortation in China
Cainiao consolidates AliExpress Portugal and Spain orders in Dongguan and pre-assigns a CTT Expresso (`DA...PT` or `008...`) barcode.
2. Madrid / Lisbon Linehaul & Customs Clearance
Air cargo clears EU IOSS customs at Madrid (`MAD`) or Lisbon (`LIS`) and trucks to CTT Expresso's MARL (Lisbon), Maia (Porto), or Coslada (Madrid) hubs.
3. CTT Expresso Doorstep or Locky Locker Delivery
CTT Expresso delivers the parcel with an SMS PIN code (`Pin de Entrega`) or places it in a Ponto CTT / Locky locker.
Origin Consolidator
`cainiao` (Cainiao Smart Logistics)
Iberian Final Mile
`ctt` (CTT Correios de Portugal / CTT Expresso / CTT Express Spain)
Unified API Resolution
`GET /v1/track/{number}` bridges Cainiao `LP...` / `CNPRT...` IDs to CTT Expresso domestic tracking.

Chain Cainiao → CTT Expresso 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 Smart Logistics origin waybill (extracts final-mile barcode in .message):
curl "https://api.lastscanned.com/v1/track/LP00639182736452" \
  -H "Authorization: Bearer lsk_live_YOUR_API_KEY"

# 2. Query the extracted CTT Expresso (Portugal & Spain) barcode:
curl "https://api.lastscanned.com/v1/track/DA948201948PT" \
  -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 ("DA948201948PT")
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 Portugal & Spain Linehaul to CTT Expresso / CTT Express Handoff FAQ

Quem entrega as encomendas da Cainiao / AliExpress em Portugal?
In Portugal, most Cainiao Standard and AliExpress Choice parcels are delivered by CTT Expresso (`DA...PT` / `LA...PT` / `008...`), CTT Correios, or EcoScooting.
Why did CTT Expresso send me an SMS with a 4-digit PIN?
CTT Expresso requires a 4-digit `Pin de Entrega` upon doorstep delivery to verify handover for AliExpress and e-commerce parcels.
How long does CTT Expresso take after the parcel arrives in Portugal?
Once scanned at CTT's Lisbon (MARL) or Porto (Maia) sorting center, delivery across mainland Portugal usually takes 1 to 2 working days.

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