Click here to Skip to main content
Click here to Skip to main content

.NET UPS XML Tracking Interface DLL

, 20 Jan 2005
Rate this:
Please Sign up or sign in to vote.
A .NET DLL and sample application that interfaces with UPS's XML API to retrieve tracking information. You can also use it to generate an RSS feed..

The latest version along with additional information will always be available at Tracking/Shipper Interface.

Shipper Interface Screenshot

Note: The above information is not valid, it is only for display purposes. You will need to get your own information to use it. Please see below:


This application demonstrates the .NET DLL that can be used to interface with the UPS API. Right now, UPS is the only supported shipper, and only tracking information is supported. The only viable alternatives are to write your own, or use an expensive commercial version.

Using the code

There are two main components to this demo. There is a DLL that is used to interface with the UPS system, and there is a sample application that demonstrates its use.

To use the interfacing DLL, you will need to get a developer account with UPS. To request tracking information, you will need the following:

  • Username
  • Password
  • License Number

The following code is used to retrieve a DataTable of tracking steps:

AccessRequest ar;
TrackingRequest tr;
TrackingResponse trackResponse;

tr = new 
  YTech.ShipperInterface.UPS.Tracking.TrackingRequest(txtTrackingNumber.Text, "1");
ar = new AccessRequest(txtLicenseNumber.Text, txtUserName.Text, txtPassword.Text);

trackResponse = tr.MakeRequest(ar);
dgTrackingInfo.DataSource = trackResponse.GetTrackingInfo();


There are many valuable ways to use this interface. If you have an eCommerce website, you can use it to provide tracking information right from your website.

Another excellent way to get your tracking information is through an RSS feed. Instead of checking for tracking updates, you can use your favorite RSS reader to notify you when your package status has changed. For more information, check out my page about UPS Tracking With RSS.

Related Links

  • This component inspired Yakov Shafranovich to write a utility that uses XSLT to transform the XML from UPS directly into RSS. If you want an RSS feed directly, I recommend checking it out. I have more information posted on my blog.


  • 1/19/2004 - First version released.


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

Web Developer
United States United States

By day, I work as a software engineer for one of the largest companies in the word. By night, I take care of my son, and work on personal projects.

My personal blog is located at

Many of the projects I work on are published at

Comments and Discussions

GeneralDoesn't work PinmemberFigmo29-Jan-08 2:29 
GeneralRe: Doesn't work Pinmemberkenh1-Jul-08 10:01 
I did get this to work with a few changes.
First: In the AccessRequest class I had to add a paramaterless constructor so objects of that class can be serialized.
Second: Also in the AccessRequest class I changed the Seralize function to match the one in the TrackingRequest class so it actually returns an XML string rather than blanks. The code looks like this:
public string Serialize()
        XmlSerializer ser = new XmlSerializer(typeof(AccessRequest));
	StringBuilder sb = new StringBuilder();
	StringWriter writer = new System.IO.StringWriter(sb);
	ser.Serialize(writer, this);
	return sb.ToString();
Third: In TrackingRequest class, in the MakeRequest function I changed the req = (HttpWebRequest)WebRequest.Create call to take in the serverUrl paramater passed in, rather than the harcoded value. That way if you set the MakeRequest function use the DEV_URL for testing purposes, it will use that test URL for the test tracking numbers UPS supplies.
AnswerRe: Doesn't work PinmemberNuwan Niroshana16-Nov-08 23:10 
QuestionDevelopers License PinmemberMidnightRider31122-Apr-07 18:39 
AnswerRe: Developers License Pinmemberdddon12324-May-07 17:53 
GeneralEmpty Serialize() in AccessRequest Pinmembershobalk19-Feb-07 12:45 
GeneralRe: Empty Serialize() in AccessRequest PinmemberSuperJason2k14-Mar-07 15:09 
GeneralWorks great ! [modified] Pinmemberdapoussin20-Jun-06 1:20 
GeneralRe: Works great ! Pinmemberdddon12324-May-07 17:52 
Generalxml header error Pinmemberjohnxt13-Jan-06 17:01 
GeneralRe: xml header error PinmemberSuperJason2k14-Jan-06 2:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web04 | 2.8.140721.1 | Last Updated 20 Jan 2005
Article Copyright 2005 by SuperJason2k
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid