Tracking

Tracking works the same way for every carrier RocketShipIt supports: one request shape, one response shape, whether the package is on UPS, FedEx, USPS, DHL or a regional carrier (see Shipping Carrier APIs).

Tracking a package is usually done by providing a tracking number or shipment ID. A shipment ID will return tracking information for all packages associated with that shipment ID. A tracking number tracks the activity of an individual package. Some carriers, like USPS, treat these the same as they don't support multi-package shipments.

Some carriers issue more than one number for the same package. A UPS Mail Innovations shipment, for example, has a UPS tracking number and a USPS Package Identification Code; see UPS Mail Innovations for how to track one and where the second number comes back in the response.

To have UPS or FedEx push new scans to your server instead of polling, see Tracking Webhooks.

Some carriers also allow tracking packages by user provided reference numbers. These can be almost anything but often invoice numbers, PO numbers, or RMA numbers are used. Most carriers require that these packages be created from your carrier account number in order to track them by their reference number.

Request#

A rating request will typically have the following parameters:

{
  "carrier": "UPS-REST",
  "action": "Track",
  "params": {
    "key": "YOUR_KEY",
    "tracking_number": "1Z9A556W0301224626"
  }
}

Response#

See: Track Response Format for the Track Action

Test Tracking Numbers#

To test tracking without a real shipment, send "test": true with one of the carrier's test tracking numbers. See Test Tracking Numbers for the UPS, FedEx and DHL numbers and the status each one returns.

Carrier Specific Considerations#

UPS#

ship_date_end - ship_date_begin must be within 3 months (90 days) when tracking by reference.

FedEx#

On occasion two shipments will share the same tracking number as they are sometimes reused. If this happens a unique_id will be returned in the tracking response without tracking detail. You can use this unique_id value as a tracking_number parameter to request details for this unique shipment.

API Examples#

See: API Examples