Trackers
Create Trackers
Trackers are automatically created for you you generate a shipment or delivery on the PackageX platform. In those cases, however, we encourage you to keep listing to the update for the shipment/delivery because they will have much more complete information, as the trackers generally strip out some details.
When tracking a third party shipment, you'll just need to provide the tracking number and ideally the provider ID, as this can help speed up the request. If you don't provide the provider ID, we'll try to determine the provider based on the tracking number.
In the sandbox environment, you'll need to use sample tracking numbers. Add any tracking number with the following pattern: PKGX-XXXXXXX-XXXXXXX where the X's are any number or capital letter.
Testing Trackers
In the sandbox environment, you may want to test exceptions rather than the "happy path" when a delivery is successfully delivered.
We offer a few way to force those exceptions. The tracker will still go through it's typical progression, but end in your predetermined status.
To trigger the predefined status, you'll update the first seven characters after the PKGX prefix to the fixed amount. The second set of characters can be any random combination of numbers and letters. We recommend something like this:
Create Tracker
Create a tracker by providing the tracking number and optionally the provider ID.
Once the tracker has been created webhooks will be sent anytime the tracker is updated. In the testing environment, the tracker will update approximately once every two minutes.
Update Tracker
While you cannot update trackers for which you are not the provider, you are able to add, update, and delete metadata on the resource
Optional Parameters
When creating or updating a tracker, you can set the tracker type by defining the type
in the body of the request and setting it to inbound
or outbound
Tracker Intercept Status Outstanding Shipments
chained_status TrackingStatusOutstanding
options?.tracker?.chained_status
auto_close_shipments_option TrackerCloseShipmentsOption
options?.tracker?.auto_close_shipments_option
This option determines how to handle outstanding shipments:
on_provider_updates
: Outstanding shipments will be closed only when the provider sends a tracking update to the shipment.
on_all_updates
: Outstanding shipments will be closed on any tracking update to the shipment.
off
: Outstanding shipments will be ignored.
Default: on_provider_updates
auto_close_shipments_status TrackerCloseShipmentsStatus
options?.tracker?.auto_close_shipments_status
When on_all_updates
or on_provider_updates
is active, you can select the following completed non-exception statuses for outstanding shipments: