July 13, 2007

Shipping Hack: Track The Big Four

Need to be able to generate a link to track a package from any of the four majors out there (UPS, USPS, FedEx and DHL)?

Use String.Format to insert your tracking number into the following constants...

const string UPSTrackingUrl =
"http://wwwapps.ups.com/WebTracking/processInputRequest?sort_by=status&tracknums_displayed=1&" +
"TypeOfInquiryNumber=T&loc=en_US&InquiryNumber1={0}&track.x=0&track.y=0";
const string FedExTrackingUrl =
"http://fedex.com/Tracking?action=track&tracknumber_list={0}&cntry_code=us";
const string DHLTrackingUrl =
"http://track.dhl-usa.com/TrackByNbr.asp?ShipmentNumber={0}";
const string USPSTrackingUrl =
"http://trkcnfrm1.smi.usps.com/PTSInternetWeb/InterLabelInquiry.do?CAMEFROM=OK&strOrigTrackNum={0}";

These worked as of noon on Friday, July 13, but there is no guarantee that they'll work later.

No comments: