How to track Yanwen (`...YP`) Spain parcels handed off to Correos (`PQ...`), Correos Express & EcoScooting

Yanwen Logistics (`yanwen`) consolidates Chinese e-commerce orders for Spain (`UG...YP` / `UV...YP` / `YT...`), exchanges the origin barcode for a 23-character Spanish Correos `PQ...` label, and injects parcels into Correos after Madrid customs clearance.

Try a live tracking number:

Barcode transition: Yanwen Logistics to Correos (Spain)

When Yanwen Logistics clears customs and hands off to Correos (Spain), lastscanned surfaces the secondary tracking number in the top-level message field.

Origin / middle-mile carrier
Yanwen Logistics (yanwen)
Yanwen Waybill (`UG...YP` / `UV...YP`)
^[A-Z]{2}[0-9]{9}YP$
Origin example
UG849201955YP
Final-mile carrier
Correos (Spain) (correos)
Correos Paq (`PQ...`) Barcode
^PQ[A-Z0-9]{18,22}$
Final-mile example
PQ48290418293847561036B
Extracted in .message
Exchange the last mile tracking number: PQ48290418293847561036B

How the Yanwen → Correos handoff works

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

1. Yanwen Origin Sortation & `PQ...` Barcode Assignment
Yanwen sorts the parcel in Shenzhen or Dongguan and assigns a 23-character Spanish Correos `PQ...` barcode (`Pre-registrado` in Correos).
2. Air Linehaul & Madrid Customs Clearance
Consolidated air cargo lands in Madrid-Barajas (MAD) or Liège (LGG), clears EU IOSS customs, and transfers to Correos's automated sorting center in Madrid.
3. Correos Final Delivery (`En reparto`)
Correos scans `Admitido` and delivers the package across Spain within 48–72 hours.
Last-Mile Barcode Extraction
Yanwen's `Exchange the last mile tracking number` scan provides the exact `PQ...` Correos barcode days before physical arrival in Spain.
Unified API Response
Querying `GET /v1/track/{number}` with your `...YP` barcode returns both Yanwen export scans and Correos Spain last-mile updates.

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

# 2. Query the extracted Correos (Spain) barcode:
curl "https://api.lastscanned.com/v1/track/PQ48290418293847561036B" \
  -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 ("Exchange the last mile tracking number: PQ48290418293847561036B")
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"

Yanwen Logistics to Correos Spain Handoff Tracking FAQ

Why does my Yanwen number end in YP while my Spanish delivery number starts with PQ?
`...YP` is Yanwen's internal cross-border barcode. Yanwen swaps it for a domestic Spanish Correos `PQ...` (Paq Ligero / Paq Estándar) barcode so Correos can deliver it with full scan tracking.
How long does Yanwen take to deliver to Spain via Correos?
Most Yanwen Special Line parcels reach Spanish addresses in 7 to 12 calendar days.
What if Yanwen assigns an `ES...` or `CNESP...` number instead of `PQ...`?
Those prefixes indicate delivery by EcoScooting (`ecoscooting`) or CTT Express (`cttexpress`), both of which `lastscanned` also resolves automatically.

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