TrackShipment Method
Returns tracking data for requested TrackingNumber .
Syntax
uspstrack.trackShipment(trackingNumber, [callback])
Callback
The 'callback' parameter specifies a function which will be called when the operation completes (or an error is encountered). If the 'callback' parameter is not specified, then the method will block and will not return until the operation completes (or an error is encountered).
The callback for this method is defined as:
function(err){ }
'err' is the error that occurred. If there was no error, then 'err' is 'null'.
'err' has 2 properties which hold detailed information:
err.code err.message
Remarks
The TrackingNumber parameter identifies the shipment (this must be alphanumeric).
If the request is successful, TrackEvents will contain information about each time the package was scanned in transit.
For a summary of the information set RequestType property to rtSummary. Each TrackEventStatus entry is formatted on a single line and contains the date, status (delivered, enroute, etc), state, and zip code.
If there is a problem with a specific TrackingNumber within the request, the response will raise an error that pertains to the specific TrackingNumber. For more details on errors codes and descriptions, please refer to the Error Messages section.