Track live shipments
If you have already created a webhook, labels purchased through Shippo will send tracking events to that webhook. If you did not purchase a label through Shippo and would like to receive tracking updates on your webhook you can register the tracking number with the following example using a tracking number and the name of the carrier.NoteTo use live tracking, you must use your live key. If you want to test tracking with test mode, see the testing tracking guide.
- Create a webhook.
- Set the webhook Event Type to Track Updated.
- Set the webhook Environment to Production.
- Set the webhook URL to an address that can listen to your webhook.
- POST the below to the tracks endpoint.
tracking_status field, and the entire history via the tracking_history field, see a sample response below. Tracking is included for shipments created on Shippo but incurs a cost per tracking number for all other shipments.
Event definitions
The returned response from a tracking request includes astatus. The status is a high-level indication of where in the delivery process your package is.
Below is a list of possible status values with a description of each.
Each
status may also have a substatus. A substatus can give finer details about the current status of your package. Each field’s definition is also available in our API Reference documentation.
The action_required indicates the substatus requires action from the shipper or recipient to complete delivery.
Testing tracking
In our Test environment you are able to review our responses with mock tracking numbers. Using your Shippo Test Token, useshippo as your carrier and the tracking number be one of the following, depending on which tracking event you’re testing: SHIPPO_PRE_TRANSIT, SHIPPO_TRANSIT, SHIPPO_DELIVERED, SHIPPO_RETURNED, SHIPPO_FAILURE, SHIPPO_UNKNOWN.
Follow this example.
Test tracking request
Test tracking response
Track Shippo shipments
For each production label you purchase, Shippo automatically tracks the shipment status through the corresponding carrier’s tracking system. The latest status is accessible via the corresponding Transaction’stracking_status field.
Here’s a sample Transaction object:
Track individual shipments
To submit an individual tracking request for a single shipment, including those created outside of Shippo, you can send a GET request to the Tracking Status endpoint with your shipmentcarrier and tracking_number.
You can find a list of all supported carrier tokens here.
Here’s a sample request.
Adding metadata
You can addmetadata to the tracking request through a POST request. This is a free form field where any user-specific information can be added. By making a POST request to add metadata, all your existing webhooks will also be connected to the tracked shipment.
The POST request’s body needs to consist of your shipment’s tracking_number and carrier:
Including package details
You can include an optional boolean parameter,include_package_details, in the tracking POST request. This parameter is currently supported only for UPS and FedEx. If omitted, it defaults to false. If set to true, Shippo may include weight and dimensions in the tracking API response when those details are available from the carrier’s tracking API. Package details are returned only in the tracking API response; track_updated webhook payloads do not include weight or dimensions. Weight and dimensions may be partial and may be updated over time as the carrier provides additional data. Shippo includes only fields provided by the carrier and does not add default or null values for missing dimension fields. Dimensions are omitted only when the unit is missing and cannot be safely inferred, or when the carrier-provided data is invalid.
Here’s a sample request:
include_package_details=true and the carrier returns package details, the response can include:
Carrier restrictions
Some carriers require that you have an account with them to track shipments being delivered through them. This is only relevant if you are sending your tracking numbers as a POST to get updates via our webhook (where it is required to have a Shippo account). Otherwise, you simply wouldn’t be able to track shipments through the below carriers. To track shipments with the below carriers, add your respective carrier account into your Shippo account:- Australia Post
- BetterTrucks
- Correos España
- GLS US
- Gophr
- GSO
- Hongkong Post
- Jitsu
- LSO
- Mondial Relay
- PCF
- Poste Italiane
- Purolator
- Swyft
- Canada Post
- Colissimo
- Deutsche Post
- DHL eCommerce
- DHL Germany
- DPD UK
- Evri UK
- Lasership
- New Zealand Post
- Ontrac
- Passport
Tracking pages
Tracking pages let retailers share detailed order tracking information through the native look and feel of their own brand. You can brand your own tracking pages within the Shippo web app.- Log in to our Web app to upload assets to the Tracking page in your settings.
- Publish content and retrieve your base URL from the View test link link.
- Send customers to your pages (include this link in your own emails, for example) with the
<baseurl>/<carrier>/<trackingnumber>.
https://track.goshippo.com/tracking/<UserID>/<carrier>/<trackingnumber>
