Trace

Use case

Package tracking API for WooCommerce

WooCommerce stores ship through dozens of carriers, and there's no built-in multi-carrier tracking API. Each order's tracking number comes from whichever shipping plugin generated the label.

Trace gives WooCommerce merchants a single endpoint: send the tracking number, get normalized status and events, and display them on the order page or in a custom status page.

How it works

  1. 1Generate an API key in the Trace dashboard.
  2. 2Read the tracking number from the WooCommerce order or shipping plugin.
  3. 3POST it to /v1/track and display the normalized status and events.

PHP (cURL) — track a WooCommerce order

$ch = curl_init("https://api.traceapi.dev/v1/track");
curl_setopt_array($ch, [
    CURLOPT_POST => true,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer " . getenv("TRACE_API_KEY"),
        "Content-Type: application/json",
    ],
    CURLOPT_POSTFIELDS => json_encode(["tracking_number" => "1Z999AA10123456784"]),
]);
$tracking = json_decode(curl_exec($ch), true);
curl_close($ch);

WooCommerce FAQ

Does Trace have a WooCommerce plugin?

Trace is an API. You call it from a small mu-plugin or your theme's functions.php using the snippet above.

Which carriers does Trace cover for WooCommerce?

80+ carrier codes including USPS, UPS, FedEx, DHL, Royal Mail, and cross-border lines like YunExpress and Cainiao.

How do I get the tracking number?

From the order's shipment tracking meta, or from your shipping plugin (WooCommerce Shipping, ShipStation, and others).

Start tracking for free.

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