Create a tracking item by sending a POST request to the order’s Shipment Tracking collection endpoint. Use the canonical wc-shipment-tracking/v3 namespace for new integrations.
Note:
Authenticate with a WooCommerce REST API key that can create or edit orders. Keep the consumer secret outside source control and never expose it in browser-side code.
Request example
↑ Back to topReplace the credentials, site URL, and order ID with values from your store. This request adds a USPS tracking number to order 645.
curl --user consumer_key:consumer_secret \
--request POST \
--header "Content-Type: application/json" \
--data '{
"tracking_provider": "USPS",
"tracking_number": "9400111899560000000000",
"date_shipped": "2026-07-10"
}' \
https://example.com/wp-json/wc-shipment-tracking/v3/orders/645/shipment-trackings
Request fields
↑ Back to top| Field | Required | Description |
|---|---|---|
tracking_number | Yes | The carrier tracking number. |
tracking_provider | For predefined providers | A provider name from the providers endpoint. |
date_shipped | No | The shipped date in YYYY-MM-DD format. The current date is used when omitted. |
custom_tracking_provider | For custom providers | The customer-facing carrier name. |
custom_tracking_link | For custom providers | A full tracking URL, normally containing %1$s. |
Successful response
↑ Back to topA successful request returns HTTP 201 Created, the created tracking item, and a Location header for the new resource. The response includes a read-only tracking_id that you can use to retrieve or delete the item later.
Shipment Tracking normalizes the predefined provider value before saving it. Use the exact name returned by the providers endpoint to avoid creating an unintended custom-provider item.
Authentication and errors
↑ Back to topCreate REST API credentials in WooCommerce > Settings > Advanced > REST API. See WooCommerce REST API authentication for supported authentication methods.
| Status | Meaning |
|---|---|
201 | The tracking item was created. |
400 | The request attempted to provide an existing tracking ID or contained invalid data. |
401 or 403 | The credentials cannot create order resources. |
404 | The order ID does not identify a WooCommerce order. |
There is no update endpoint for a tracking item. Delete the incorrect item and create a replacement when a tracking number, provider, or shipped date needs to change.