Trace

Use case

Package tracking API for Dropshipping

Dropshipping orders move through a chain of carriers — YunExpress, 4PX, Cainiao, ePacket — and tracking numbers use many different formats. Detecting the right carrier is usually the hard part.

Trace auto-detects common dropshipping carrier formats and returns normalized status and events, so a dropshipping store can show one consistent tracking timeline across all its suppliers.

How it works

  1. 1Generate an API key in the Trace dashboard.
  2. 2Send the supplier's tracking number to /v1/track without a carrier — Trace detects it.
  3. 3Display the normalized timeline to the customer and watch for delivery via webhooks.

Node.js — auto-detect a dropshipping carrier

// YunExpress, 4PX, Cainiao, ePacket — Trace detects the carrier automatically.
const response = await fetch("https://api.traceapi.dev/v1/track", {
  method: "POST",
  headers: {
    Authorization: "Bearer " + process.env.TRACE_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ tracking_number: "YT2213421266060000" }),
});

const tracking = await response.json();
console.log(tracking.carrier.code, tracking.status);

Dropshipping FAQ

Does Trace detect the carrier automatically?

For common dropshipping formats (YT, LP, CAIN, 4PX, LX/LY/LZ), yes. For ambiguous formats, send the carrier code explicitly.

Which dropshipping carriers does Trace support?

YunExpress, 4PX, Cainiao, ePacket, China Post, EMS, SF Express, and more — 80+ codes in total.

Can I track AliExpress orders?

Yes, if the supplier provides a tracking number. AliExpress orders often use Cainiao, YunExpress, or 4PX, which Trace detects automatically.

Start tracking for free.

Create an account, generate an API key, and track your first package in under two minutes — no credit card required.