Vous êtes sur la page 1sur 111

UPS OnLine® Tools

Tracking
Developers Guide
30 October 2008
UPS OnLine Tools Tracking Important Information

Notice
In all communications with UPS concerning this document, please refer to the document date
located on the cover.
Copyright
The use, disclosure, reproduction, modification, transfer, or transmittal of this work for any
purpose in any form or by any means without the written permission of United Parcel Service is
strictly prohibited.
© Copyright 2008 United Parcel Service of America, Inc. All Rights Reserved.
Trademarks
UPS OnLine® is a registered trademark of United Parcel Service of America, Inc. All other
trademarks are the property of their respective owners.
Some of the UPS corporate applications use U.S. city, state, and postal code information obtained
by United Parcel Service of America, Inc. under a non-exclusive license from the United States
Postal Service.

30 October 2008 Page 2


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Important Information

Important Information
UPS OnLine Tools Tracking Tool:

Your development of an application using the UPS OnLine Tools Tracking Tool is
governed by the UPS Technology Agreement or UPS Customer Technology Agreement
you entered into with UPS. The following are key legal requirements from these
agreements for the UPS OnLine Tools Tracking Too). For more information on all
requirements for the UPS OnLine Tools Tracking Tool, please refer to the UPS
Technology Agreement or the Customer Technology Agreement.

Key Legal Requirements for UPS OnLine Tools Tracking Tool:

Permitted Territories. This document can only be used in the countries listed in Exhibit
C of the UPS Technology Agreement or UPS Customer Technology Agreement.

Use. The application must not be designed to allow distribution of information received
through the UPS OnLine Tools Tracking Tool to third parties, other than to persons
having a bona fide interest in such information (e.g., the shipper, consignee or the third
party payer).

Tracking Information. You must conspicuously display the following language, or such
other language provided by UPS from time to time, in reasonable proximity to the
tracking input and output information screens (which may include in a pop-up or
daughter window browser accessed through a hypertext link located in reasonable
proximity to the tracking input and output screens (See Tracking Information Section of
this document):
"NOTICE: The UPS package tracking systems accessed via this service (the
"Tracking Systems") and tracking information obtained through this service (the
"Information") are the private property of UPS. UPS authorizes you to use the
Tracking Systems solely to track shipments tendered by or for you to UPS for
delivery and for no other purpose. Without limitation, you are not authorized to make
the Information available on any web site or otherwise reproduce, distribute, copy,
store, use or sell the Information for commercial gain without the express written
consent of UPS. This is a personal service, thus your right to use the Tracking
Systems or Information is non-assignable. Any access or use that is inconsistent with
these terms is unauthorized and strictly prohibited."
You shall further design the application such that any Person must be required to
affirmatively acknowledge acceptance of the language provided above before
submitting a tracking transaction to the UPS Systems. (See Tracking Information
Section of this document).

Consent to Use of UPS Mark.

30 October 2008 Page 3


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Important Information

• All screens or forms generated by your application including information


received through the UPS OnLine Tools Tracking Tool must include (1) the UPS
Mark positioned in reasonable proximity to the Information and of an appropriate
size to readily identify the source of the Information as UPS and (2) the
following language at the bottom of every screen that displays the UPS Mark:
"UPS, the UPS brand mark, and the Color Brown are trademarks of United Parcel
Service of America, Inc. All Rights Reserved". Except as set forth in the
preceding sentence, you have no right to use the UPS Mark without the prior
written approval of UPS.
• You shall not use the UPS Mark in association with any third party trademarks in
a manner that might suggest co-branding or otherwise create potential confusion
as to source or sponsorship of the application, or ownership of the UPS Mark.
• The UPS Mark shall be used only as provided by UPS electronically or in hard
copy form. The UPS Mark may not be altered in any manner, including
proportions, colors, elements, etc., or animated, morphed or otherwise distorted
in perspective or dimensional appearance.
• The UPS Mark may not be combined with any other symbols, including words,
logos, icons, graphics, photos, slogans, numbers or other design elements. A
minimum amount of empty space must surround the UPS Mark separating it
from any other object, such as type, photography, borders, edges, etc. The
required area of empty space around the UPS Mark must be 1/3x, where x equals
the height of the UPS Mark.
Copyright and Proprietary Notices. You must include in your application and any POD
Letters you prepare a prominent reproduction of UPS’s copyright and proprietary notices
in a form and format specified by UPS (See Copyright Section of this document).
Display of Information. The application must not display information concerning any
other provider of shipping services or such other shipping services on any page, whether
comprising one or more frames, displaying information your application receives from
the UPS OnLine Tools Tracking Tool. Your application must present all data within each
field received through the UPS OnLine Tools Tracking Tool without amendment, deletion
or modification of any type.

30 October 2008 Page 4


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Contents

Table of Contents
Important Information ................................................................................................................. 3

Welcome to UPS OnLine® Tools.................................................................................................. 7

How to Use this Guide.............................................................................................................. 7


What's New for January 2008 ................................................................................................... 8

Required Steps for Integrating with UPS OnLine Tools............................................................ 9

Planning Your Applications ........................................................................................................ 10

Online Tools Applications....................................................................................................... 10


Licensing the UPS OnLine Tools.............................................................................................11
Branding Requirements.....................................................................................................11
UPS Review of Applications ............................................................................................ 12
Developing Client Applications for OnLine Tools ................................................................. 12
Microsoft Visual Studio.................................................................................................... 12
Java Standard Edition and Enterprise Edition .................................................................. 12
Open Source ..................................................................................................................... 12
Getting Technical Support ...................................................................................................... 13
Within the United States................................................................................................... 13
Outside of the United States ............................................................................................. 13
Testing and Deploying Applications ....................................................................................... 14
Keeping Up-to-Date................................................................................................................ 14

UPS OnLine Tools Technologies................................................................................................. 15

Hypertext Transfer Protocol and Secure Sockets Layer 3 ...................................................... 15


Working with HTTP and SSL in Application Programs ......................................................... 16
Microsoft Visual Studio.................................................................................................... 17
Java Standard Edition and Enterprise Edition .................................................................. 17
Open Source ..................................................................................................................... 17
Extensible Markup Language (XML)..................................................................................... 18
Working with XML in Application Programs......................................................................... 20
Microsoft Visual Studio.................................................................................................... 20
Java Standard Edition and Enterprise Edition .................................................................. 21
Open Source ..................................................................................................................... 22

Understanding Tracking ............................................................................................................. 24

Identifying a Package or Shipment to Track........................................................................... 24


Tracking Numbers ............................................................................................................ 24
Shipment Identification Numbers..................................................................................... 24
Reference Numbers .......................................................................................................... 24

30 October 2008 Page 5


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Contents

PRO numbers and Air Waybill numbers .......................................................................... 25


Candidate Bookmarks ...................................................................................................... 25

Tracking Reference...................................................................................................................... 27

Authenticating Client Applications......................................................................................... 27


AccessRequest.................................................................................................................. 27
Tracking .................................................................................................................................. 27
TrackRequest.................................................................................................................... 28
TrackRequest ................................................................................................................. 29
TrackResponse ................................................................................................................. 36
TrackResponse .............................................................................................................. 36
Error Codes ............................................................................................................................. 89

Customer Integration Environment .......................................................................................... 91

System Availability .......................................................................................................... 91


Server Availability Check ................................................................................................ 91
Tracking Usage Guidelines .............................................................................................. 92

Appendix A: UPS Service Codes............................................................................................. 93

Appendix B: Reference Number Codes ................................................................................. 95

Appendix C: Country Codes ................................................................................................... 96

Appendix D: Currency Codes ............................................................................................... 101

Appendix E: Tracking Test Numbers................................................................................... 108

Appendix F: State/Province Codes....................................................................................... 109

Index 110

30 October 2008 Page 6


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Welcome to UPS OnLine® Tools

Welcome to UPS OnLine® Tools


Welcome to the UPS OnLine Tools Developers Guide. This guide provides the
information you need to begin using UPS OnLine Tools.
The UPS OnLine Tools offer a fast and convenient way to access UPS service
information using the Internet. With these tools, UPS lets you easily incorporate
UPS technology in your own applications or your own web site. Your users—
running your applications or visiting your web site—can have up-to-the-minute
access to UPS services.

How to Use this Guide


If you are an experienced developer, you can begin developing applications
quickly after reviewing “Required Steps for Integrating with UPS OnLine Tools”
for a brief overview of the tools.
If you would like a more step-by-step guide to developing and deploying UPS
OnLine Tools, “Planning Your Applications” provides advice and describes
options for developing and deploying applications and web sites that use UPS
OnLine Tools.
The "UPS OnLine Tools Technologies" section explains key technologies on
which the UPS OnLine Tools rely. That section also includes hints for using those
technologies in various software development environments.
If you would like to learn more about what UPS OnLine Tools can do for your
applications, “Understanding Tracking” explains the services that this tool offers.
For a complete technical reference to the OnLine Tools, “Tracking Reference”
includes a complete programming reference.
Additional material, including reference tables and lists, may be found in the
appendices.

30 October 2008 Page 7


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Welcome to UPS OnLine® Tools

What's New for January 2008


Defect corrections for January 2009:
 The CustomerContext element has been added back to the TrackRequest (see
page 29)

Tracking Usage Guidelines:


 Please refer to page 92 for Tracking Usage Guidelines

30 October 2008 Page 8


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Required Steps

Required Steps for Integrating with UPS OnLine Tools

1. Review the UPS Technology Agreement available at www.ups.com. This


agreement requires that you follow certain procedures and practices in using
UPS OnLine Tools. Among other requirements, these procedures include
acquiring a Developer’s Key and Access Keys.
2. Develop applications that make use of standard HTTP communications
protocols, SSL security, and XML-based document representations.
3. Test your application and/or web site using the designated UPS staging
environment.
4. If you are a UPS Ready developer, review your application with UPS.
5. Deploy your application for your customers.

30 October 2008 Page 9


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Planning Your Applications

Planning Your Applications


Planning is a key part of any successful development activity, and UPS OnLine
Tools applications are no exception. This section helps that planning by
describing the important activities of any UPS OnLine Tools application project.
It provides an overview of the steps required to develop applications, and it
describes key factors and choices necessary to deploy those applications.

Online Tools Applications


Many different types of applications can take advantage of UPS OnLine Tools.
Those application types include dedicated desktop applications, databases, web
applications, and documents. The following figures illustrate some of the
possibilities for applications using UPS OnLine Tools. The only essential
requirement for all of these applications is that they must have access to the
Internet.

UPS Desktop
OnLine Tools Internet Applications

Figure 1: Dedicated applications that users run on their desktops can access UPS
OnLine Tools.

Database Database
Applications Clients

UPS
OnLine Tools Internet

Figure 2: Database applications can access UPS OnLine Tools and return
information to their clients.

30 October 2008 Page 10


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Planning Your Applications

Web Users

UPS
OnLine Tools Internet

Web Site
Figure 3: Web sites can access UPS OnLine Tools and return information to users'
web browsers.

UPS Web-Enabled
Internet Document
OnLine Tools

Figure 4: Non-traditional applications such as Microsoft Office or Adobe Acrobat


documents can use UPS OnLine Tools to automatically update their content.

The UPS OnLine Tools support all of these types of applications and many
others. Virtually any software that needs instant, up-to-date access to UPS
services can take advantage of UPS OnLine Tools.

Licensing the UPS OnLine Tools


As part of the UPS Technology Agreement, users of the tools have certain
obligations that are spelled out within the service agreement and its exhibits.
Regardless of the manner in which the UPS OnLine Tools are integrated into
your specific e-commerce web site or enterprise application, you must adhere to
appropriate usage requirements.

Branding Requirements
UPS should receive attribution and branding in all applications (including
websites and software applications) that use the OnLine Tools. No End User,
Third Party Developer or Access User should be permitted to use the OnLine

30 October 2008 Page 11


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Planning Your Applications

Tools without providing branded recognition to UPS. Your use of the UPS logo
can in no way imply endorsement, sponsorship or certification of your e-
commerce web site or enterprise application by UPS. You are not allowed to use
or alter the information returned by the UPS OnLine Tools in a way that
misrepresents the information or the functionality of the service.

UPS Review of Applications


If you distribute your application as software, please provide UPS access to or a
copy of your application (and/or any updates). If you host your application for
the benefit of others, please provide the Uniform Resource Locator (URL) for
each location of your application. If you build your own application, UPS might
request the URL in order to review your application. UPS may review each
application for compliance with the UPS Technology Agreement.

Developing Client Applications for OnLine Tools


When you develop software that uses the UPS OnLine Tools, you are building a
client application. Because the UPS OnLine Tools rely on standard Internet-based
technology, you can develop those applications using a wide variety of software
development platforms, including Microsoft's Visual Studio, the Java Standard
Edition and Enterprise Edition distributions, and many open source projects. This
section introduces important technologies available in each of these development
environments. Later sections of this document include more details on using each
platform. Look for the icons in the left margin, which identify information
relevant to a particular development environment.

Microsoft Visual Studio

Visual Developers using the Microsoft Visual Studio environment can rely on the
Studio Microsoft XML Core Services (MSXML) for interacting with UPS OnLine
Tools. Those services include functions to help applications create requests for
and interpret responses, and they include functions to manage the
communications between applications and UPS.

Java Standard Edition and Enterprise Edition


Java developers can find all the classes they need for UPS OnLine Tools in the
Java
Java Standard Edition and Enterprise Edition distributions. The URL class in the
java.net package provides the functions required for communication with UPS
servers, and the Java API for XML Processing (JAXP) services let programs
create requests and interpret responses from UPS.

Open Source

Open There are a number of open source efforts that include technology useful for
Source creating OnLine Tools client applications; open source developers may find two
particular projects to be especially helpful. The libcurl project is a library of

30 October 2008 Page 12


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Planning Your Applications

functions that can manage the communications with UPS servers. For creating
requests and interpreting responses, the xerces project provides essential
functions in a variety of software languages.

Getting Technical Support


UPS provides technical support for developers who are using the UPS OnLine
Tools Web Services. To get in touch with a UPS technical support engineer, fill
out the technical support request form on the UPS web site.

Within the United States


Effective July 2007, there is a phone number for External Customer
Technology Support (ECTS): 1-877-289-6420 for customers who have
completed testing in the Customer Integration Environment and are ready
to process live shipments..

For developers in the United States, the request form may be found by selecting
“Contact UPS” from the www.myups.com web site, or from www.ups.com from
the steps below.

1. Navigate to the UPS website http://www.ups.com.


2. Select a language, (ex. United States – English).
3. Log into www.ups.com with your User ID and Password.
4. Click the “Support” tab.
5. Click “UPS OnLine Tools” , and then click “Support” on the left-hand
navigation window.
6. Click the link for technical support.
7. Complete the e-mail form. Please explain details about errors that are
being returned, and under what circumstances.

Outside of the United States


Developers outside the United States can find the technical support request in the
OnLine Tools page within the Support section of their country's UPS web site.

1. Navigate to the UPS website http://www.ups.com.


2. Select your country’s home page and language (ex. United States –
English).
3. Click “UPS OnLine Tools”, on the left navigational pane.
4. Click the “Support” tab.

30 October 2008 Page 13


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Planning Your Applications

5. Click “Support,” on the left navigational pane.


6. Select “Technical Support Question”.
7. Complete the e-mail form. Please explain details about errors that are
being returned, and under what circumstances.

For more information or assistance with UPS technical support, please contact
your UPS OnLine Tools representative.

Testing and Deploying Applications


UPS maintains a special environment to support testing and staging of
applications that rely on UPS OnLine Tools. This environment lets developers
test and debug their applications by simulating transactions with UPS. This
special environment responds to requests just like the UPS production site;
however, it does not initiate actual UPS business services.
For example, if you send a shipping request to the UPS production environment,
a UPS driver may show up at your location expecting to pick up a package (and
expecting payment for the service.) Sending the shipping request to the Customer
Integration Environment will avoid this problem.
The environment for testing and staging is the UPS Customer Integration
Environment (CIE). You can access this test environment by using the domain
name of wwwcie.ups.com.

Keeping Up-to-Date
As UPS adds new services and features, UPS OnLine Tools will evolve, offering
more features and service benefits. Once you register to use UPS OnLine Tools,
UPS will notify you by e-mail of updates and changes to the OnLine Tools. It is
essential that an accurate e-mail address for your company be maintained. In
addition, UPS recommends that you complete the secondary contact information
to ensure that your organization receives the latest updates.
You should update your profile when changes occur or responsibilities for the
OnLine Tools shift within your company. You can also return to the UPS Support
area of ups.com for the latest updated information about UPS OnLine Tools.

30 October 2008 Page 14


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking UPS OnLine Tools Technologies

UPS OnLine Tools Technologies


The foundation technologies for UPS OnLine Tools are the same underlying
technologies in use on the Internet today They include the Hypertext Transfer
Protocol (HTTP) with Secure Sockets Layer 3 (SSL3) security and the Extensible
Markup Language (XML). Because these technologies are critical to the Internet,
most software development tools provide many powerful features that make it
easy for application programs to use them. This section provides a quick
introduction to the technologies and to the tools that can support them.

Hypertext Transfer Protocol and Secure Sockets Layer 3


Today's Internet supports a wide variety of applications including email, instant
messaging, web browsing, and voice communications. All of these applications
have a well-defined set of rules that determines how they communicate. Those
rules are known as protocols. As an Internet application themselves, the UPS
OnLine tools also rely on protocols to set the rules for their communications. The
primary protocol for UPS OnLine Tools is the hypertext transfer protocol, or
HTTP.
HTTP is a relatively simple protocol. An application that wants to use an OnLine
Tool acts as an HTTP client. It sends its request to UPS as part of an HTTP POST
message. UPS servers reply to each request using an HTTP response message.
1 POST message

UPS Client
Internet Applications
OnLine Tools

2 Response message
Figure 5. UPS OnLine Tools accept requests from client applications in HTTP POST
messages and reply to the requests with HTTP responses.

As part of the POST message, client applications indicate the type of content the
message contains using an HTTP Content-Type header. For UPS OnLine Tools,
that content type should be application/x-www-form-urlencoded.
In many cases the UPS OnLine tools exchange information that should be kept
private. To protect confidential information, the UPS OnLine Tools rely on the
Secure Sockets Layer 3 (SSL3) protocol in addition to HTTP. When two systems
communicate using SSL, the protocol creates a secure channel between them,
and it encrypts all information that they exchange using this channel. The SSL
protocol that UPS OnLine Tools use is the same protocol used to secure millions
of on-line purchases on the web.

30 October 2008 Page 15


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking UPS OnLine Tools Technologies

UPS Client
Internet Applications
OnLine Tools

Encrypted “channel”
created by SSL
Figure 6: SSL creates a secure channel across a network and protects confidential
communications using that channel.

Working with HTTP and SSL in Application Programs


UPS OnLine Tools are not the only Internet services that rely on the HTTP and
SSL protocols. Both protocols, in fact, were originally developed for web
browsing, and they provide the foundation for the majority of Internet
applications. Because HTTP and SSL are so common, software development
tools make using these protocols very simple.
Because HTTP and SSL are commonly used for web browsing, software
development tools often rely on the same notation and abbreviations as standard
web browsers. In particular, most tools identify a specific service (such as a UPS
OnLine Tool) using a Uniform Resource Locator (URL). URLs begin with an
abbreviation of the communication protocol. For UPS OnLine Tools that
abbreviation will always be "https" to indicate HTTP and SSL. The protocol
abbreviation is followed by a colon, two slashes, and the name of a server.
Additional information about the specific service can follow the server name; it is
written like the path to a file in a directory, with slashes separating individual
folders. Figure 7 shows how a URL combines these individual components.

Figure 7. URLs identify communication protocols, servers, and specific services.

The subsections that follow provide brief introductions to using HTTP and SSL
with various software development tools, including Microsoft Visual Studio, Java
Standard and Enterprise Edition, and popular open source environments.

30 October 2008 Page 16


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking UPS OnLine Tools Technologies

Microsoft Visual Studio

Visual The Microsoft Visual Studio environment includes many tools, classes, and
Studio libraries that simplify the use of HTTP and SSL protocols. A very convenient set
of tools are included in the Microsoft XML Core Services (MSXML). The
following code fragment shows how a Visual Basic program can send a request
and retrieve the response. To keep the example as simple as possible, no
exception handling is included in the figure. Production software should, of
course, appropriately handle all exceptions.
' create the object that manages the communication
Dim oXMLHttp As XMLHTTP
Set oXMLHttp = New XMLHTTP
' prepare the HTTP POST request
oXMLHttp.open "POST", "https://www.server.com/path", False
oXMLHttp.setRequestHeader "Content-Type", _
"application/x-www-form-urlencoded"

' send the request


oXMLHttp.send requestString

' server's response will be available in oXMLHttp.responseXML


Figure 8. Visual Basic programs can use features of the MSXML tools to send and
receive messages using HTTP and SSL.

Java Standard Edition and Enterprise Edition


In a Java SE or EE environment, the URL class in the java.net package provides
Java
a convenient way to manage HTTP and SSL communications. Figure 9 contains a
small code fragment that demonstrates the use of this class. As above, the
fragment doesn't include exception handling that should be inherent in any
production software.
import java.io.*;
import java.net.*;

URL url = new URL("https://www.server.com/path");


HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("POST");
conn.setRequestProperty("Content-Type",
"application/x-www-form-urlencoded");
conn.setDoOutput(true);
PrintWriter out = new PrintWriter(conn.getOutputStream());
out.println(requestString);
out.close();
BufferedReader in = new BufferedReader(
new InputStreamReader(conn.getInputStream()));
/* server response is available by reading the in object */
Figure 9. The URL class from the java.net package is a convenient way for Java
programs to use HTTP and SSL.

Open Source

Open The libcurl project is an open source project that includes support for using
Source HTTP and SSL protocols. The fragment in Figure 10 shows how to set up libcurl
to send a request using HTTP and SSL. It relies on a callback function to accept
the server's response.
CURL *curl;

30 October 2008 Page 17


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking UPS OnLine Tools Technologies

CURLcode res;

/* prepare to send the request */


curl = curl_easy_init();
curl_easy_setopt(curl, CURLOPT_URL, https://www.server.com/path");
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, requestString);
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, fnCallback);
res = curl_easy_perform(curl);
Figure 10. The open source libcurl library simplifies the use of HTTP and SSL.

Extensible Markup Language (XML)


The Extensible Markup Language (XML) is an international standard developed
by the World Wide Web Consortium, the governing body for web standards and
guidelines. XML provides a way to identify the structure of content within a
document or, in the case of UPS OnLine tools, a message. Figure 11 shows how a
simple XML message could describe a book.
<?xml version="1.0" encoding="UTF-8" ?>
<book>
<title>
HTTP Essentials: Protocols for Secure, Scaleable Web Sites
</title>
<author>
<firstname>
Stephen
</firstname>
<lastname>
Thomas
</lastname>
</author>
<publisher>
John Wiley and Sons
</publisher>
<year>
2001
</year>
<isbn>
0-471-398233
Figure 11: XML identifies the structure of documents, as in this document
describing a book.

As the figure illustrates, XML is a text-based format. XML messages contain


regular text, though that text follows specific rules that XML defines. XML
distinguishes different parts of a message with a label known as a tag. Tags in the
example include <book>, <title>, <author>, <firstname>, etc. A tag can indicate
the start of information if it begins with an angle bracket (<), and a tag can
indicate the end of information if it begins with an angle bracket and a slash (</).
A beginning tag, ending tag, and the information between the two make up an
element. In this example the publisher element tells us that the publisher for the
book is "John Wiley and Sons."
The figure also shows how an XML message follows a defined structure.
Elements can be contained within other elements, as <firstname> and <lastname>

30 October 2008 Page 18


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking UPS OnLine Tools Technologies

are included within the <author> element. This structure indicates that firstname
and lastname are "children" of the author "parent."
Although XML elements can contain almost any text, there are two special
characters that cannot appear within an element. Those characters are the less-
than sign (<) and the ampersand (&). Elements that include these contents must
replace the special characters with "&lt;" or "&amp;" respectively. The name of a
large telecommunications company, for example, would appear as "AT&amp;T"
within an XML message.
Because XML is a text-based format, software has to take extra steps to use XML
with binary data. For example, some UPS services return binary image data such
as the image of a shipping label. To include this data in an XML message, UPS
converts it from binary to text format using an algorithm known as Base64
encoding. The "The Base16, Base32, and Base64 Data Encodings" standard, also
known as RFC 3548, defines that algorithm.
Although XML messages consist of a series of text characters, most software
development tools represent XML messages in a tree-like data structure. That
representation clarifies the structure of the message. Figure 12 shows the same
XML message as Figure 11, but it uses a more visual representation to highlight
the message's structure.

book

title author publisher year isbn

HTTP
John Wiley and
Essentials: firstname lastname 2001 0-471-398233
Sons
Protocols for
Secure,
Scaleable Web
Sites

Stephen Thomas

Figure 12. It is often convenient to show XML messages in a tree-like graph to


highlight their structure.

The example of Figure 11 and Figure 12 is a relatively simple XML message


with just a few elements. UPS OnLine Tools rely on XML messages that are
larger than this simple example, and it is difficult to show them in a pure graph
like Figure 12 without losing legibility. Figure 13 shows an alternate way of
depicting the tree-like structure of XML messages; it uses the same example as
before.

30 October 2008 Page 19


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking UPS OnLine Tools Technologies

book
├─title
│ └─"HTTP Essentials: Protocols for Secure, Scaleable Web Sites"
├─author
│ ├─firstname
│ │ └─"Stephen"
│ └─lastname
│ └─"Thomas"
├─publisher
│ └─"John Wiley and Sons"
├─year
│ └─"2001"
└─isbn
└─"0-471-398233"
Figure 13. It is possible to show the tree-like structure of XML messages using text.

A great deal of information on XML is available on the Internet. A good starting


point for further research is the World Wide Web Consortium’s main page on
XML at http://www.w3.org/XML/.

Working with XML in Application Programs


The popularity of Extensible Markup Language means that nearly all
development environments include sophisticated support for creating and
interpreting XML messages. This subsection provides a brief introduction to
working with XML in Microsoft, Java, and Open Source environments. The
examples it contains are only representative approaches; many other approaches
are possible.

Microsoft Visual Studio

Visual The Microsoft XML Core Services (MSXML) offers one way to work with XML
Studio documents in Visual Studio applications. Figure 14 shows one approach for
creating an XML message in Visual Basic, and Figure 15 demonstrates how
Visual Basic programs can interpret XML responses. To remain as simple as
possible, the examples do not include any exception handling. Production
software should, of course, provide full exception handling.
' Define a variable and initialize it to a new XML message
Dim dom
Set dom = New DOMDocument30
' Set properties of the variable
dom.async = False
dom.validateOnParse = False
dom.resolveExternals = False
dom.preserveWhiteSpace = True
' Identify the message as XML version 1.0
Set node = dom.createProcessingInstruction("xml", "version='1.0'")
dom.appendChild node
Set node = Nothing
' Create the root (book) element and add it to the message
Dim root
Set root = dom.createElement("book")
dom.appendChild root

30 October 2008 Page 20


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking UPS OnLine Tools Technologies

' Create child elements and add them to the root


Dim node
Set node = dom.createElement("title")
node.text = "HTTP Essentials: ..."
root.appendChild node
Set node = Nothing
Set node = dom.createElement("author")
Dim child
Set child = dom.createElement("firstname")
child.text = "Stephen"
node.appendChild child
Set child = Nothing
Set child = dom.createElement("lastname")
child.text = "Thomas"
node.appendChild child
root.appendChild node
' And so on
Figure 14. Visual Basic can create XML messages through the DOMDocument
object.

' Define a variable to hold the parsed message


Dim dom As New DOMDocument30
dom.async = False
dom.validateOnParse = False
dom.resolveExternals = False
dom.preserveWhiteSpace = True

' Try to parse the message


If dom.loadXML(messageText) = False Then
' The text did not contain valid XML
End If

' Get the title information from the message


Dim node As IXMLDOMNode
Set node = dom.selectSingleNode("/title")
If node Is Nothing Then
' The message did not contain title information
Else
' Do something with node.text
End If
Figure 15. Visual Basic can read the contents of XML messages after parsing them
with the DOMDocument object.

Visual Basic also has built-in classes to interpret Base64-encoded values. The
Convert.FromBase64String() function converts from a Base64-encoded string
to an array of 8-bit unsigned integers.

Java Standard Edition and Enterprise Edition


The Java API for XML Processing (JAXP) is the preferred approach for working
Java
with XML messages in Java. Figure 16 shows how a BookClass object can be
converted into an XML message, a process that JAXP calls marshalling.
Similarly, Figure 17 shows the reverse process, where an XML message is
converted into a BookClass object. This reverse process is unmarshalling. As
above, exception handling code is omitted from these examples to make them as
clear as possible.
import javax.xml.bind.JAXBContext;
import javax.xml.bind.Marshaller;
import java.io.StringWriter;

30 October 2008 Page 21


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking UPS OnLine Tools Technologies

/* create the book object */


BookClass book = new BookClass("HTTP Essentials...",
new AuthorClass("Stephen", "Thomas"),
"John Wiley and Sons",
"2001",
"0-471-398233");
/* convert it to an XML string */
StringWriter writer = new StringWriter();
JAXBContext context = JAXBContext.newInstance(book.class);
Marshaller m = context.createMarshaller();
m.marshal(book, writer);
Figure 16. JAXP provides a convenient way for Java applications to create XML
messages from Java objects.

import javax.xml.bind.JAXBContext;
import javax.xml.bind.Marshaller;
import java.io.StringReader;
/* xmlMessage contains the XML message */
StringReader reader = new StringReader(xmlMessage);
JAXBContext context = JAXBContext.newInstance(Book.class);
Unmarshaller u = context.createUnmarshaller();
BookClass book = (BookClass) u.unmarshal(reader);

/* access properties of the book */


System.out.println(book.getAuthor().getFirstname())
Figure 17. JAXP also gives Java applications a convenient way to retrieve elements
from an XML message.

Open Source

Open As of this writing, the most popular open source tool for working with XML is
Source the xerces project. That project includes C++, Java, and Perl implementations of
an XML library. The xerces distribution includes extensive sample applications.
The code fragment in Figure 18 demonstrates creating an XML message in C++
with the xerces library. Figure 19 shows sample code for accessing an element
within an XML message. In both cases exception handling is not shown in order
to keep the examples as simple as possible. Production software should always
contain full exception handling.
DOMImplementation* impl =
DOMImplementationRegistry::getDOMImplementation(X("Core"));
DOMDocument* doc = impl->createDocument(0, X("book"), 0);
DOMElement* rootElem = doc->getDocumentElement();

DOMElement* titleElem = doc->createElement(X("title"));


rootElem->appendChild(titleElem);

DOMText* titleVal = doc->createTextNode(X("HTTP Essentials..."));


titleElem->appendChild(titleVal);
Figure 18. The Xerces C++ library includes classes that can create XML messages.

XMLCh* TAG_book;
XMLCh* TAG_title;
xercesc::XercesDOMParser *parser;
XMLPlatformUtils::Initialize();
TAG_book = XMLString::transcode("book");
TAG_title = XMLString::transcode("title");

30 October 2008 Page 22


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking UPS OnLine Tools Technologies

parser = new XercesDOMParser;


parser->parse(inputText);
DOMDocument* xmlDoc = parser->getDocument();
DOMElement* elementRoot = xmlDoc->getDocumentElement();
DOMNodeList* children = elementRoot->getChildNodes();
const XMLSize_t nodeCount = children->getLength();
for (XMLSize_t cnt = 0; cnt < nodeCount; ++cnt ) {
DOMNode* currentNode = children->item(cnt);
if( currentNode->getNodeType() &&
currentNode->getNodeType() == DOMNode::ELEMENT_NODE ) {
DOMElement* currentElement =
dynamic_cast< xercesc::DOMElement* >( currentNode );
if( XMLString::equals(currentElement->getTagName(),
TAG_title)) {
/* do something with the title */
}
}
}
Figure 19. The Xerces C++ library also supports parsing XML messages to find
individual elements.

30 October 2008 Page 23


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Understanding Tracking

Understanding Tracking
The Track OnLine Tool gives client applications access to UPS tracking
information. With this service, clients query UPS to determine the up-to-the-
minute status of a shipment or a package, including its delivery status and the
time and location of the latest transit scan.

Identifying a Package or Shipment to Track


Applications can request tracking based on a tracking number, shipment
identification number, or reference number. For freight shipments, applications
can also use a candidate bookmark.

Tracking Numbers
UPS uses tracking numbers to identify and track small packages in its system.
Applications can use this tracking number to track, locate, and verify arrival of a
package. A successful query by tracking number returns information for the
specific package within a shipment. For example, if a small package shipment
contained four individual packages, the query response would show a shipment
containing the one package out of four with the associated tracking number.
(Note: Tracking numbers are available up to 18 months after delivery. UPS
makes every effort to ensure that a tracking number uniquely identifies a package
for 18 months; however, it is possible that a tracking number may be reused
within a shorter time period. If this occurs, a query by tracking number returns all
packages matching the tracking number.

Shipment Identification Numbers


UPS uses shipment identification numbers to identify and track every shipment
as it moves through the UPS system. A shipment may be a single transaction
with multiple small packages, or it may be a single freight shipment. For small
package shipments, a successful query by shipment identification number returns
all of the packages within a shipment. For example, if a shipment contained four
packages, the query response would show all four packages. (UPS makes every
effort to ensure that a shipment identification number uniquely identifies a
shipment for up to 18 months. However, it is possible that a shipment
identification number may be reused within a shorter time period. If this occurs, a
query by shipment identification number returns all shipments matching the
shipment identification number.)

Reference Numbers
The ability to track any UPS package or shipment by reference number gives
applications added flexibility and convenience. Reference numbers can be a
purchase order number, job number, or a group of words identifying a shipment
(such as “10 widgets” or “gift for mom”). Applications can assign a reference
number to:

30 October 2008 Page 24


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Understanding Tracking

• an individual package or to
• all packages in a shipment or to
• a single LTL shipment or to,
• an air or ocean freight shipment.
A reference number can contain any combination of letters and numbers up to 35
characters. Applications assign a reference number when they upload electronic
shipping data to UPS. A successful query by reference number returns all of the
packages within a shipment identified by the reference number. For example, if a
shipment contained four packages, and two of the packages were tagged with the
reference number, “10 widgets,” the query response would show a shipment
containing those two packages. Since reference numbers are assigned by
customers, UPS cannot guarantee the uniqueness of a reference number across
all packages shipped through the UPS system. To resolve this ambiguity, a
search specification may contain any of the following qualifiers:
• Pickup date range: A range of dates within which UPS picked up the
package. The default is 30 days before today's date.
• UPS account number: The shipper's UPS account number.
• Destination postal code: A zip code (U.S.) or postal code (international).
• Destination country: The destination country code.
(Note: Reference numbers are available up to 6 months after delivery.)

PRO numbers and Air Waybill numbers


UPS uses PRO numbers to identify and trace a Ground Freight shipment as it
moves through the UPS system. For freight shipments, a successful query by
PRO number returns all of the commodities within a shipment.

UPS uses Air Waybill numbers to identify and trace an Air Freight shipment as it
moves through the UPS system. For freight shipments, a successful query by Air
Waybill number returns all of the commodities within a shipment.

Candidate Bookmarks
When an application requests tracking information for a freight shipment using a
reference number, it is possible that more than one shipment may match that
reference number. In such cases, UPS returns identifying information about each
shipment, and it marks each shipment with a unique candidate bookmark. Client
applications (or their users) can examine the list of candidates to identify the
desired shipment. Once the candidate is identified, the application can issue
another tracking request. By including the candidate bookmark information for

30 October 2008 Page 25


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Understanding Tracking

the appropriate shipment in this second request, the application eliminates


ambiguity and can receive correct tracking results.

30 October 2008 Page 26


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Tracking Reference

Tracking Reference
This section documents the details of the XML messages, including the requests
that clients send to UPS and the responses that UPS returns. The first subsection
explains the notation that this section uses. It is followed by a section that describes
how UPS verifies that client applications are authorized to use the tracking tool.
The next two subsections define the messages used for small package and for
freight tracking. The final subsection provides a list of error codes.

Authenticating Client Applications


UPS OnLine Tools Shipping Services are only available for authorized UPS
customers. To enforce this policy, UPS requires that every message that a client
application sends include important authentication information. That information is
contained in an AccessRequest XML document that must begin each message.

AccessRequest
AccessRequest
├─AccessLicenseNumber::string
├─UserId::string
└─Password::string
Each AccessRequest contains three child elements: an AccessLicenseNumber, a
UserId, and a Password. The following figure shows an example AccessRequest
document.
<?xml version="1.0" ?>
<AccessRequest xml:lang='en-US'>
<AccessLicenseNumber>
YOURACCESSLICENSENUMBER
</AccessLicenseNumber>
<UserId>
YOURUSERID
</UserId>
<Password>
YOURPASSWORD
</Password>
</AccessRequest>

Tracking
Tracking relies on a single request and response. Client applications request
tracking information by sending a TrackRequest message to UPS. UPS replies with
a TrackResponse message.

30
October 2008 Page 27
© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Track Request

TrackRequest
The TrackRequest message consists of two complete XML documents. The first document is an AccessRequest. It is immediately
followed by (concatenated to) a TrackRequest. When a client application is undergoing testing and integration, the document
combination should be sent to the URL:
https://wwwcie.ups.com/ups.app/xml/Track
The TrackRequest document in the request must conform to the following XML structure.

TrackRequest XML Details:

Note: The “Required” Column has four potential values:

Yes: Always required


No: Always optional
Yes*: Conditionally required
Cond: Conditional

30 October 2008 Page 28


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Track Request

SMALL PACKAGE
MAXALLOWED
REQUIRED

FREIGHT
LENGTH
TYPE
NAME XPATH DESCRIPTION VALIDATION RULES

Container
Yes

Yes

Yes
N/A
Container for the root Track Request N/A

1
TrackRequest /TrackRequest

Container
*Yes
/TrackRequest

Yes

Yes
N/A
Request Container for the Track Request N/A

1
/Request

Container
/TrackRequest
TransactionReference identifies
Yes

N/A
TransactionReference
1
/Request
transactions between client and server.
/TransactionReference

/TrackRequest
Customer provided data. If this data is
0…512
String

/Request
No

CustomerContext present in the request, it is echoed back


1

/TransactionReference
to the customer.
/CustomerContext

/TrackRequest
String

/Request
No

ToolVersion Current Tracking Tool Version.


1

/TransactionReference
/ToolVersion

30 October 2008 Page 29


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Track Request

SMALL PACKAGE
MAXALLOWED
REQUIRED

FREIGHT
LENGTH
TYPE
NAME XPATH DESCRIPTION VALIDATION RULES

/TrackRequest

String

1..15
Indicates the action to be taken by the The only valid action for

Yes

Yes

Yes
RequestAction

1
/Request
XML service. tracking is "Track".
/RequestAction

/TrackRequest “none” – “ “ or “0”= Last Activity

String

1..15

Yes

Yes
No
RequestOption Optional processing.

1
/Request “activity” or “1” - all activity
/RequestOption

The package’s tracking number.

For small package when the Tracking


Number element is supplied, details of
the package corresponding to the

11..21
String
Cond

Tracking Number will be returned.

Yes

Yes
/TrackRequest
TrackingNumber
1

N/A
/TrackingNumber
For freight Tracking Number will be
treated as the Shipment Identification
Number regardless of it is supplied in the
ShipmentIdentificationNumber element or
Tracking Number element

/TrackRequest Reference the UPS guide to


11..21
String
Cond

ShipmentIdentificationNumbe

Yes

Yes
The shipment’s tracking number. barcoding for valid Shipment
1

/ShipmentIdentificationNumbe
r
r Identification Numbers.

30 October 2008 Page 30


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Track Request

SMALL PACKAGE
MAXALLOWED
REQUIRED

FREIGHT
LENGTH
TYPE
NAME XPATH DESCRIPTION VALIDATION RULES

During Tracking and Reference Number


searches, it is possible that duplicate
shipments will be found. If duplicate
shipments are found, then a Candidate
Summary with a corresponding
"Candidate Bookmark" for each of the
Shipments will be returned in the

String

0..15
response. The Candidate Bookmark can

Yes
/TrackRequest

No

No
CandidateBookmark

1
/CandidateBookmark be passed back to the Tracking Tool in a
separate transaction to retrieve tracking
information about the particular Shipment
of interest.

The Candidate Bookmark can be used to


return detailed information about the
shipment.

The reference number container tag.


Container

/TrackRequest Required if a Shipment Identification

Yes

Yes
N/A
No

ReferenceNumber N/A
1

/ReferenceNumber Number or Tracking Number is not


present.

The customer assigned reference


/TrackRequest
1…35
String

number. Required if a Shipment

Yes

Yes
No

Value None
1

/ReferenceNumber
Identification Number or Tracking
/Value
Number is not present.

30 October 2008 Page 31


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Track Request

SMALL PACKAGE
MAXALLOWED
REQUIRED

FREIGHT
LENGTH
TYPE
NAME XPATH DESCRIPTION VALIDATION RULES

Container
/TrackRequest

Yes

Yes
N/A
No
PickupDateRange Container for pickup date range. None

1
/PickupDateRange

/TrackRequest

String
The begin pickup date used to narrow a

Yes

Yes
No
BeginDate YYYYMMDD

8
/PickupDateRange
reference number search.
/BeginDate

/TrackRequest

String
The end pickup date used to narrow a

Yes

Yes
No
EndDate YYYYMMDD
1

8
/PickupDateRange
reference number search.
/EndDate

10-Jun
String
Cond

/TrackRequest The UPS account number used to narrow

Yes

Yes
ShipperNumber None.
1

/ShipperNumber a reference number search.

A ZIP Code (United States) or postal The destination country code


String

1..16

/TrackRequest

Yes

Yes
No

DestinationPostalCode code (international destination) also is required if the destination


1

/DestinationPostalCode
narrows the search postal code is present.

30 October 2008 Page 32


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Track Request

SMALL PACKAGE
MAXALLOWED
REQUIRED

FREIGHT
LENGTH
TYPE
NAME XPATH DESCRIPTION VALIDATION RULES

String
/TrackRequest A country code used to narrow a

Yes

Yes
2..3
No
DestinationCountryCode None.

1
/DestinationCountryCode reference number search.

Postal Code of the origin country used to

String

1..16
/TrackRequest narrow the reference number search.

Yes
No

No
OriginPostalCode

1
/OriginPostalCode
For freight Reference tracking Only

String
/TrackRequest Country code of the origin country used

Yes
2..3
No

No
OriginCountryCode
1
/OriginCountryCode to narrow the reference number search.

Container for the type of Shipment when


Container
Cond

/TrackRequest doing a Reference Number search. If this

Yes

Yes
N/A
ShipmentType
1

/ShipmentType container is not present, tracking defaults


to small package.

30 October 2008 Page 33


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Track Request

SMALL PACKAGE
MAXALLOWED
REQUIRED

FREIGHT
LENGTH
TYPE
NAME XPATH DESCRIPTION VALIDATION RULES

This element will be used to indicate the


type of the shipment being tracked during
a Reference tracking.
01 - Small Package
02 - Freight.
When no value is supplied this element

Zero or One
/TrackRequest defaults to ‘01’

String
*Yes

Yes

Yes
Code

2
/ShipmentType Default value - 01
/Code During reference number tracking, the
value of this element should be 01 in
order to be small package.

During reference number tracking, the


value of this element should be 02 in
order to be freight.

Description of the type of the shipment


/TrackRequest
String

0..15
being tracked during Reference tracking.

Yes

Yes
No

Description
1

/ShipmentType
01 - Small Package
/Description
02 - Freight

Flag to indicate whether to include Defaults to small package


Freight while searching for the only. Only when this flag is
String

information. The valid values for this flag set to ‘01’, Freight is included

Yes

Yes
/TrackRequest
No

IncludeFreight
1

/IncludeFreight are:- in the search. For all other


“02” – Small package Only values, the search defaults to
“01”- Small Package and Freight. Small Package only.

30 October 2008 Page 34


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Track Request

Example TrackRequest Message:


<?xml version="1.0" ?>
<AccessRequest xml:lang='en-US'>
<AccessLicenseNumber>YOURACCESSLICENSENUMBER</AccessLicenseNumber>
<UserId>YOURUSERID</UserId>
<Password>YOURPASSWORD</Password>
</AccessRequest>
<?xml version="1.0" ?>
<TrackRequest>
<Request>
<TransactionReference>
<CustomerContext>guidlikesubstance</CustomerContext>
</TransactionReference>
<RequestAction>Track</RequestAction>
</Request>
<TrackingNumber>1Z9999999999999999</TrackingNumber>
</TrackRequest>

30 October 2008 Page 35


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Track Response

TrackResponse
The TrackResponse message contains a single XML document that conforms to the following XML structure.

TrackResponse XML Details:

Note: The “Required” Column has four potential values:

Yes: Always required


No: Always optional
Yes*: Conditionally required
Cond: Conditional

SMALL PACKAGE
MAXALLOWED
REQUIRED

FREIGHT
LENGTH
TYPE
NAME XPATH DESCRIPTION VALIDATION RULES

Container
Yes

Yes

Yes
N/A

Container for root Track response


1

TrackResponse /TrackResponse
Container
*Yes

/TrackResponse

Yes

Yes
N/A

Response Container for Track Response


1

/Response

30 October 2008 Page 36


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Track Response

SMALL PACKAGE
MAXALLOWED
REQUIRED

FREIGHT
LENGTH
TYPE
NAME XPATH DESCRIPTION VALIDATION RULES

Container
/TrackResponse
TransactionReference identifies

Yes

Yes
N/A
No
TransactionReference

1
/Response
transactions between client and server.
/TransactionReference

The client uses CustomerContext to


/TrackResponse synchronize request/response pairs. The

1..512
String
client establishes CustomerContext,

Yes

Yes
/Response

No

1
CustomerContext
/TransactionReference which can contain any information you
/CustomerContext want, as along as it is valid XML; it is
echoed back by the server.

/TrackResponse

String
/Response

Yes

Yes
No
XpciVersion 1 Message version. Defaults to ‘1.0001’.

4
/TransactionReference
/XpciVersion

/TrackResponse
String

Identifies the success or failure of the


Yes

Yes

Yes
ResponseStatusCode
1

/Response
transaction. 1 = Successful0 = Failure
/ResponseStatusCode

/TrackResponse
1…35
String

Describes Response Status Code.


Yes

Yes

Yes
ResponseStatusDescription
1

/Response
Returns text of "Success" or "Failure"
/ResponseStatusDescription

30 October 2008 Page 37


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Track Response

SMALL PACKAGE
MAXALLOWED
REQUIRED

FREIGHT
LENGTH
TYPE
NAME XPATH DESCRIPTION VALIDATION RULES

If an error is encountered during the


interchange, the Response contains an

Container
/TrackResponse

Cond
error.

Yes

Yes
1
Error /Response
If the error is present, then the
/Error
ErrorSeverity and ErrorCode are
required.
Describes the severity of the
error.
TransientError - Customer’s data has not
been processed due to system
unavailability. The customer has to wait
/TrackResponse and try again.

String

1..15
*Yes
HardError - The error was

Yes

Yes
/Response
1
ErrorSeverity
/Error encountered processing the
/ErrorSeverity customer’s data and that the data needs
correction.
Warning - The customer’s data
was successfully processed;
however, there were warnings
encountered during processing.
A numeric value that describes
the error.
/TrackResponse
Each tool defines a range of error codes.
String

1..15
*Yes

Yes

Yes
/Response
1

ErrorCode Refer to Error Conditions table in the


/Error
’Programming
/ErrorCode
Information’ chapter for detailed
descriptions of all errors.

30 October 2008 Page 38


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Track Response

SMALL PACKAGE
MAXALLOWED
REQUIRED

FREIGHT
LENGTH
TYPE
NAME XPATH DESCRIPTION VALIDATION RULES

/TrackResponse

String

1..50
/Response

Yes

Yes
No
ErrorDescription Describes the error code.

1
/Error
/ErrorDescription

Number of seconds to wait until retry.


This field is populated on special
/TrackResponse
conditions of the Transient Error only, as

String

Yes

Yes
/Response

1..5
No

1
MinimumRetrySeconds defined
/Error
by the service.
/MinimumRetrySeconds
A number between 1 and
86400 (24 hours)

/TrackResponse

Container
/Response Many

Yes

Yes
N/A
No

ErrorLocation Identifies the element in error.


/Error
/ErrorLocation

/TrackResponse
The XPATH name of the element in
/Response
1..512
String

error. This is a valid

Yes

Yes
No

ErrorLocationElementName /Error
XPATH pointing to an element in the
/ErrorLocation
request document.
/ErrorLocationElementName
/TrackResponse
/Response
String
Yes

Yes

Yes
/Error
1

ErrorLocationElementReference Not Used


/ErrorLocation
/ErrorLocationElementRefere
nce

30 October 2008 Page 39


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Track Response

SMALL PACKAGE
MAXALLOWED
REQUIRED

FREIGHT
LENGTH
TYPE
NAME XPATH DESCRIPTION VALIDATION RULES

/TrackResponse
The name of the attribute in
/Response

String

1..50
error. This is the name of the

Yes

Yes
No

1
ErrorLocationAttributeName /Error
attribute contained by the Error Location
/ErrorLocation
Element.
/ErrorLocationAttributeName

the size of
/TrackResponse

Request
String
Many
/Response The contents of the element in

Yes

Yes
the
No
ErrorDigest
/Error error.
/ErrorDigest

Container
Many
/TrackResponse Yes

Yes

Yes
N/A
Shipment Shipment Container tag.
/Shipment

Container
/TrackResponse
Yes

Yes
N/A

No
InquiryNumber Shipment Inquiry Number Container
1

/Shipment
/InquiryNumber

30 October 2008 Page 40


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Track Response

SMALL PACKAGE
MAXALLOWED
REQUIRED

FREIGHT
LENGTH
TYPE
NAME XPATH DESCRIPTION VALIDATION RULES

Code to indicate the type of Inquiry


Number

/TrackResponse
The codes returned for Freight HAWB -

String

2…6
*Yes

Yes
/Shipment

No
1
Code House Airway BillHBL - House Bill of
/InquiryNumber
Lading
/Code
PRO – PRO Number
SUBPRO – Sub-PRO Number
DO – Delivery Order
Description of the Inquiry Number as
indicated by code
/TrackResponse

String

1..35
*Yes
Description of the codes HAWB - House

Yes
/Shipment

No
1
Description
/InquiryNumber Airway BillHBL - House Bill of Lading
/Description PRO – PRO Number
SUBPRO – Sub-PRO Number
DO – Delivery Order

/TrackResponse
String

1..15
*Yes

/Shipment

Yes
No
Value Value of the Inquiry Number
1

/InquiryNumber
/Value

/TrackResponse
Shipment number to which the package
String

1..21

/Shipment

Yes
No

No
ShipmentIdentificationNumber belongs. This element is not returned for
1

/ShipmentIdentificationNumbe
track requests by Reference Number.
r

30 October 2008 Page 41


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Track Response

SMALL PACKAGE
MAXALLOWED
REQUIRED

FREIGHT
LENGTH
TYPE
NAME XPATH DESCRIPTION VALIDATION RULES

Container
/TrackResponse

Cond
Container for the type of Shipment when

Yes

Yes
N/A
ShipmentType

1
/Shipment
doing a Reference Number search.
/ShipmentType

This element will be used to indicate the


type of the shipment being tracked during
a Reference tracking.
01 - Small Package
/TrackResponse 02 - Freight.

String
*Yes

Yes

Yes
/Shipment

2
Code
/ShipmentType During reference number tracking, the
/Code value of this element should be 01 in
order to be small package.

02 will be returned for a Freight reference


tracking
Description of the type of the shipment
being tracked during Reference tracking.
01 - Small Package
/TrackResponse 02 - Freight.
String

0..15

Yes

Yes
/Shipment
No

Description
/ShipmentType For small package the description will be
/Description “Small Package”

For Freight the description will be


“Freight”

30 October 2008 Page 42


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Track Response

SMALL PACKAGE
MAXALLOWED
REQUIRED

FREIGHT
LENGTH
TYPE
NAME XPATH DESCRIPTION VALIDATION RULES

During Tracking and Reference Number


searches, it is possible that duplicate
shipments will be found. If duplicate
shipments are found, then a Candidate
Summary with a corresponding
/TrackResponse

String

0..15
"Candidate Bookmark" for each of the

Yes
No

No
1
CandidateBookmark /Shipment
Shipments will be returned in the
/CandidateBookmark
response. The Candidate Bookmark can
be passed back to the Tracking Tool in a
separate transaction to retrieve tracking
information about the particular Shipment
of interest.

Container
/TrackResponse

Yes

Yes
N/A
No

Shipper Shipper Container Tag


1
/Shipment
/Shipper

/TrackResponse
String

6..10

/Shipment

Yes

Yes
No

ShipperNumber Shipper’s six or ten digit account number.


1

/Shipper
/ShipperNumber

/TrackResponse
Container

0…1

/Shipment

Yes

Yes
No

Address Shipper’s address Container tag.


1

/Shipper
/Address

30 October 2008 Page 43


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Track Response

SMALL PACKAGE
MAXALLOWED
REQUIRED

FREIGHT
LENGTH
TYPE
NAME XPATH DESCRIPTION VALIDATION RULES

/TrackResponse
/Shipment

String

1..35

Yes

Yes
No

1
AddressLine1 /Shipper Shipper’s address line 1
/Address
/AddressLine1
/TrackResponse
/Shipment

String

1..35

Yes

Yes
No

1
AddressLine2 /Shipper Shipper’s address line 2
/Address
/AddressLine2
/TrackResponse
/Shipment

String

1..35

Yes

Yes
No

1
AddressLine3 /Shipper Shipper’s address line 3
/Address
/AddressLine3
/TrackResponse
/Shipment
String

1..30

Yes

Yes
No

City /Shipper Shipper’s city.


/Address
/City
/TrackResponse
/Shipment
String

Shipper’s state or province code.

Yes

Yes
2..5
No

StateProvinceCode /Shipper
Required for US or Canada.
/Address
/StateProvinceCode

30 October 2008 Page 44


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Track Response

SMALL PACKAGE
MAXALLOWED
REQUIRED

FREIGHT
LENGTH
TYPE
NAME XPATH DESCRIPTION VALIDATION RULES

/TrackResponse
/Shipment

5…16
String

Yes

Yes
No

1
PostalCode /Shipper Shipper’s postal code
/Address
/PostalCode
/TrackResponse
/Shipment

String

2…3

Yes

Yes
No

1
CountryCode /Shipper Shipper’s country code.
/Address
/CountryCode

Container
/TrackResponse

Yes

Yes
N/A
No
ShipTo Consignee’s ship to Container tag.
1
/Shipment
/ShipTo

/TrackResponse
Container

/Shipment

Yes

Yes
N/A
No

Address Consignee’s address Container tag.


1

/ShipTo
/Address

/TrackResponse
/Shipment
String

1..35

Yes

Yes
No

AddressLine1 /ShipTo Consignee’s address line 1


/Address
/AddressLine1

30 October 2008 Page 45


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Track Response

SMALL PACKAGE
MAXALLOWED
REQUIRED

FREIGHT
LENGTH
TYPE
NAME XPATH DESCRIPTION VALIDATION RULES

/TrackResponse
/Shipment

String

1..35

Yes

Yes
No

1
AddressLine2 /ShipTo Consignee’s address line 2
/Address
/AddressLine2
/TrackResponse
/Shipment

String

1..35

Yes

Yes
No

1
AddressLine3 /ShipTo Consignee’s address line 3
/Address
/AddressLine3
/TrackResponse
/Shipment

String

1..30

Yes

Yes
No

1
City /ShipTo Consignee’s city.
/Address
/City
/TrackResponse
/Shipment
String

Consignee’s state or province code.

Yes

Yes
2..5
No

StateProvinceCode /ShipTo
Required for US or Canada.
/Address
/StateProvinceCode
/TrackResponse
/Shipment
5…16
String

Yes

Yes
No

PostalCode /ShipTo Consignee’s postal code


/Address
/PostalCode

30 October 2008 Page 46


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Track Response

SMALL PACKAGE
MAXALLOWED
REQUIRED

FREIGHT
LENGTH
TYPE
NAME XPATH DESCRIPTION VALIDATION RULES

/TrackResponse
/Shipment

String

2…3

Yes

Yes
No

1
CountryCode /ShipTo Consignee’s country code.
/Address
/CountryCode

Container
/TrackResponse

Yes

Yes
N/A
No
ShipmentWeight Shipment weight Container tag

1
/Shipment
/ShipmentWeight

/TrackResponse

Container
/Shipment Shipment weight unit of measurement

Yes

Yes
N/A
No
UnitOfMeasurement
1
/ShipmentWeight Container tag.
/UnitOfMeasurement

/TrackResponse
/Shipment
String
*Yes

Shipment weight unit of measurement

Yes

Yes
1

3
Code /ShipmentWeight
code. Defaults to ‘LBS’.
/UnitOfMeasurement
/Code
/TrackResponse
/Shipment
String
1

Description /ShipmentWeight
/UnitOfMeasurement
/Description

30 October 2008 Page 47


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Track Response

SMALL PACKAGE
MAXALLOWED
REQUIRED

FREIGHT
LENGTH
TYPE
NAME XPATH DESCRIPTION VALIDATION RULES

/TrackResponse

String
/Shipment Shipment’s total weight. Set to 0 for

Yes

Yes
No
Weight

8
/ShipmentWeight shipment with package type of letter.
/Weight

Container
/TrackResponse

*Yes
Container tag for UPS service associated

Yes

Yes
N/A
Service

1
/Shipment
with the shipment.
/Service

30 October 2008 Page 48


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Track Response

SMALL PACKAGE
MAXALLOWED
REQUIRED

FREIGHT
LENGTH
TYPE
NAME XPATH DESCRIPTION VALIDATION RULES

For small package Values are:


‘01’ = Next Day Air
‘02’ = 2nd Day Air
‘03’ = Ground
‘07’ = International Express
‘08’ = International Expedited
‘11’ = International Standard
‘12’ = 3 Day Select
‘13’ = Next Day Air Saver
‘14’ = Next Day Air Early AM
‘54’ = International Express Plus
‘59’ = 2 Day Air A.M.
/TrackResponse
‘60’ = UPS Select

String
*Yes

Yes

Yes
/Shipment
1

2
Code ‘65’ = UPS Saver
/Service
‘82’ = UPS Today Standard
/Code
‘83’ = UPS Today Dedicated Courier
‘84’ = UPS Today Intercity
‘85’ = UPS Today Express
‘86’ = UPS Today Express Saver

For Freight Values returned are:


‘TDCB’ – Trade Direct Cross Border
‘TDA’ – Trade Direct Air
‘TDO’ – Trade Direct Ocean
‘308’ – UPS Freight LTL
‘309’ – UPS Freight LTL Guaranteed
‘310’ – UPS Freight LTL Urgent

30 October 2008 Page 49


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Track Response

SMALL PACKAGE
MAXALLOWED
REQUIRED

FREIGHT
LENGTH
TYPE
NAME XPATH DESCRIPTION VALIDATION RULES

Description of the service For small package


Values are:
‘01’ = Next Day Air
‘02’ = 2nd Day Air
‘03’ = Ground
‘07’ = International Express
‘08’ = International Expedited
‘11’ = International Standard
‘12’ = 3 Day Select
‘13’ = Next Day Air Saver
‘14’ = Next Day Air Early AM
‘54’ = International Express Plus
/TrackResponse ‘59’ = 2 Day Air A.M.

String

1..35

Yes

Yes
/Shipment ‘60’ = UPS Select
No

Description 1
/Service ‘65’ = UPS Saver
/Description ‘82’ = UPS Today Standard
‘83’ = UPS Today Dedicated Courier
‘84’ = UPS Today Intercity
‘85’ = UPS Today Express
‘86’ = UPS Today Express Saver

For Freight Values returned are:


‘TDCB’ – Trade Direct Cross Border
‘TDA’ – Trade Direct Air
‘TDO’ – Trade Direct Ocean
‘308’ – UPS Freight LTL
‘309’ – UPS Freight LTL Guaranteed
‘310’ – UPS Freight LTL Urgent

30 October 2008 Page 50


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Track Response

SMALL PACKAGE
MAXALLOWED
REQUIRED

FREIGHT
LENGTH
TYPE
NAME XPATH DESCRIPTION VALIDATION RULES

Container
/TrackResponse
Shipment reference number Container

Yes

Yes
N/A
No
ReferenceNumber

1
/Shipment
tag.
/ReferenceNumber

30 October 2008 Page 51


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Track Response

SMALL PACKAGE
MAXALLOWED
REQUIRED

FREIGHT
LENGTH
TYPE
NAME XPATH DESCRIPTION VALIDATION RULES

Reference number type code, for


signifying PO #’s, Invoice #’s, etc, for the
entire shipment.

For small package the codes returned


are:-
“28” -“Purchase Order No.”
“33”- “Model Number”
“34”- “Part Number”
“35” -“Serial Number”
“50”- “Department Number”
“51” -“Store Number”
/TrackResponse
“54” -“FDA Product Code”

String

Yes

Yes
/Shipment
No

2
Code “55” -“Acct. Rec. Customer Acct.”
/ReferenceNumber
“56” -“Appropriation Number”
/Code
“57”- “Bill of Lading Number”
“59” -“Invoice Number”
“60” -“Manifest Key Number”
“61”- “Dealer Order Number”
“62” -“Production Code”
“63” -“Purchase Req. Number”
“64” -“Salesperson Number”
“67” -“Transaction Ref. No.”
“RZ” -“RMA”
“9V”- “COD Number”

For freight this can be BL or PO

30 October 2008 Page 52


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Track Response

SMALL PACKAGE
MAXALLOWED
REQUIRED

FREIGHT
LENGTH
TYPE
NAME XPATH DESCRIPTION VALIDATION RULES

/TrackResponse

String

1..35
*Yes
/Shipment

Yes

Yes
Value Customer supplied reference number.

1
/ReferenceNumber
/Value

Container
/TrackResponse

Cond
Container for the current status of the

Yes
N/A

No
CurrentStatus

1
/Shipment
shipment.
/CurrentStatus

Code for the current status of the


shipment.

For Freight only:

The values are:-


/TrackResponse 001 - Billing Information Received
String
*Yes

002 - In Transit

Yes
/Shipment

No
1

3
Code
/CurrentStatus 003 - Exception
/Code 004 - Delivered Origin CFS
005 - Delivered Destination CFS
006 - Warehousing
007 - Out For Delivery
011 - Delivered
111 - Not Available
222 - Not Available

30 October 2008 Page 53


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Track Response

SMALL PACKAGE
MAXALLOWED
REQUIRED

FREIGHT
LENGTH
TYPE
NAME XPATH DESCRIPTION VALIDATION RULES

Description for the current status of the


shipment.

The values are:-


001 - Billing Information Received
/TrackResponse 002 - In Transit

String

1..35
*Yes
003 - Exception

Yes
/Shipment

No
1
Description
/CurrentStatus 004 - Delivered Origin CFS
/Description 005 - Delivered Destination CFS
006 - Warehousing
007 - Out For Delivery
011 - Delivered
111 - Not Available
222 - Not Available

/TrackResponse String
Date shipment was picked-up.

Yes

Yes
No

PickupDate
1

/Shipment 8 YYYYMMDD
/PickupDate
Container

/TrackResponse

Yes
N/A
No

No
DeliveryDetails Container for Delivery Details
1

/Shipment
/DeliveryDetails

/TrackResponse
Container

/Shipment

Yes
N/A
No

No
DeliveryDate Container for Delivery Date and Time
1

/DeliveryDetails
/DeliveryDate

30 October 2008 Page 54


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Track Response

SMALL PACKAGE
MAXALLOWED
REQUIRED

FREIGHT
LENGTH
TYPE
NAME XPATH DESCRIPTION VALIDATION RULES

/TrackResponse
/Shipment

String
Date shipment was delivered.

Yes

Yes
No
1

8
Date /DeliveryDetails
YYYYMMDD
/DeliveryDate
/Date
/TrackResponse
/Shipment

String

Yes
No

No
1

6
Time /DeliveryDetails Time shipment was delivered. HHMMSS
/DeliveryDate
/Time

/TrackResponse

Container
/Shipment

Yes
N/A
No

No
ServiceCenter Container for the Delivery Service Center
1
/DeliveryDetails
/ServiceCenter

/TrackResponse
/Shipment
String

1..30
*Yes

Yes
No
1

City /DeliveryDetails Delivery Service center city


/ServiceCenter
/City
/TrackResponse
/Shipment
String
*Yes

Yes
2..6

No
1

StateProvinceCode /DeliveryDetails Delivery Service Center State


/ServiceCenter
/StateProvinceCode

30 October 2008 Page 55


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Track Response

SMALL PACKAGE
MAXALLOWED
REQUIRED

FREIGHT
LENGTH
TYPE
NAME XPATH DESCRIPTION VALIDATION RULES

Container
/TrackResponse

Yes
N/A
No

No
Volume Container for the volume of the Shipment

1
/Shipment
/Volume

/TrackResponse

String
/Shipment Code indicating the unit of measurement

Yes
No

No
Code

2
/Volume for the volume
/Code

/TrackResponse

String

1..35
/Shipment Description of the unit of measurement

Yes
No

No
Description
1
/Volume as indicated by code
/Description

/TrackResponse
String

1..35
*Yes

/Shipment

Yes
No
Value Value of the total volume of the shipment.
1

/Volume
/Value

/TrackResponse
String

1..35

Name of the person to whom the

Yes
No

No
BillToName
1

/Shipment
shipment is billed to.
/BillToName

30 October 2008 Page 56


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Track Response

SMALL PACKAGE
MAXALLOWED
REQUIRED

FREIGHT
LENGTH
TYPE
NAME XPATH DESCRIPTION VALIDATION RULES

Container
/TrackResponse

Yes
N/A
No

No
PickUpServiceCenter Container for the pickup service center.

1
/Shipment
/PickUpServiceCenter

/TrackResponse

String

1..30
*Yes
/Shipment

Yes
No
City City of the pickup service center.

1
/PickUpServiceCenter
/City

/TrackResponse

String
/Shipment *Yes

Yes
2..5

No
StateProvinceCode State of the pickup service center.
1
/PickUpServiceCenter
/StateProvinceCode

/TrackResponse
String

1..15

Yes
No

No
NumberOfPieces Number of pieces in the shipment
1

/Shipment
/NumberOfPieces

/TrackResponse
String

1..15

Yes
No

No
NumberOfPallets Number of pallets in the shipment
1

/Shipment
/NumberOfPallets

30 October 2008 Page 57


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Track Response

SMALL PACKAGE
MAXALLOWED
REQUIRED

FREIGHT
LENGTH
TYPE
NAME XPATH DESCRIPTION VALIDATION RULES

Container
/TrackResponse
Container for Shipment Service Options.

Yes
N/A
No

No
ShipmentServiceOptions

1
/Shipment
Currently contains COD only
/ShipmentServiceOptions

/TrackResponse

Container
/Shipment

Yes
N/A
No

No
COD Container for COD for the shipment

1
/ShipmentServiceOptions
/COD

/TrackResponse

Container
/Shipment

Yes
N/A
No

No
1
CODAmount /ShipmentServiceOptions Container for COD amount
/COD
/CODAmount
/TrackResponse
/Shipment
String
*Yes

Currency Code for COD. Default value is

Yes
/ShipmentServiceOptions

No
1

2
CurrencyCode
/COD ‘USD’
/CODAmount
/CurrencyCode
/TrackResponse
/Shipment
String

1..30
*Yes

Yes
/ShipmentServiceOptions

No
1

MonetaryValue Currency Value for COD


/COD
/CODAmount
/MonetaryValue

30 October 2008 Page 58


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Track Response

SMALL PACKAGE
MAXALLOWED
REQUIRED

FREIGHT
LENGTH
TYPE
NAME XPATH DESCRIPTION VALIDATION RULES

Container
/TrackResponse

Yes
N/A
No

No
EstimatedDeliveryDetails Container for estimated delivery details

1
/Shipment
/EstimatedDeliveryDetails

/TrackResponse

String
/Shipment Estimated delivery date of the shipment

Yes
No

No
Date

8
/EstimatedDeliveryDetails YYYYMMDD
/Date

/TrackResponse

Container
/Shipment Container for estimated delivery service

Yes
N/A
No

No
ServiceCenter
1
/EstimatedDeliveryDetails center
/ServiceCenter

/TrackResponse
/Shipment
String

1..30
*Yes

Yes
No
1

City /EstimatedDeliveryDetails Estimated delivery service center city


/ServiceCenter
/City
/TrackResponse
/Shipment
String
*Yes

Yes
2..8

No
1

StateProvinceCode /EstimatedDeliveryDetails Estimated delivery service center state


/ServiceCenter
/StateProvinceCode

30 October 2008 Page 59


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Track Response

SMALL PACKAGE
MAXALLOWED
REQUIRED

FREIGHT
LENGTH
TYPE
NAME XPATH DESCRIPTION VALIDATION RULES

/TrackResponse

String

1..35

Yes
No

No
SignedForByName Shipment signed for by name

1
/Shipment
/SignedForByName

Container
/TrackResponse

Many

Yes
N/A
No

No
Activity /Shipment Container for shipment activity
/Activity

/TrackResponse

Container
Many
/Shipment

Yes
N/A
No

No
ActivityLocation Container for shipment activity location
/Activity
/ActivityLocation

/TrackResponse Container
/Shipment
Many

Container for the address of the shipment

Yes
N/A
No

No
Address /Activity
activity location
/ActivityLocation
/Address
/TrackResponse
/Shipment
String

1..30

Yes
/Activity
No

No
1

City Activity city.


/ActivityLocation
/Address
/City

30 October 2008 Page 60


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Track Response

SMALL PACKAGE
MAXALLOWED
REQUIRED

FREIGHT
LENGTH
TYPE
NAME XPATH DESCRIPTION VALIDATION RULES

/TrackResponse
/Shipment

String

Yes
/Activity

2..5
No

No
1
StateProvinceCode Activity State.
/ActivityLocation
/Address
/StateProvinceCode
/TrackResponse
/Shipment

5…16
String

Yes
/Activity

No

No
1
PostalCode Activity postal code
/ActivityLocation
/Address
/PostalCode
/TrackResponse
/Shipment
String

2…3

Yes
/Activity
No

No
1

CountryCode Activity country code.


/ActivityLocation
/Address
/CountryCode

/TrackResponse
1..512
String

/Shipment

Yes
No

No
Description Description of the Activity
1

/Activity
/Description

/TrackResponse
String

/Shipment

Yes
No

No
Date Activity Date. YYYYMMDD
1

/Activity
/Date

30 October 2008 Page 61


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Track Response

SMALL PACKAGE
MAXALLOWED
REQUIRED

FREIGHT
LENGTH
TYPE
NAME XPATH DESCRIPTION VALIDATION RULES

/TrackResponse

String
/Shipment

Yes
No

No
Time Activity Time. HHMMSS

6
/Activity
/Time

/TrackResponse

String

1..30
/Shipment

Yes
No

No
Trailer Trailer Code for the shipment

1
/Activity
/Trailer

Container
/TrackResponse

Yes
N/A
No

No
OriginPortDetails Details of origin port of the shipment
1
/Shipment
/OriginPortDetails

/TrackResponse
String
/Shipment 1..35

Yes
No

No
OriginPort Origin Port of the shipment
1

/OriginPortDetails
/OriginPort

/TrackResponse
Container

/Shipment Container for Estimated Departure Time

Yes
N/A
No

No
EstimatedDeparture
1

/OriginPortDetails Stamp at the origin port


/EstimatedDeparture

30 October 2008 Page 62


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Track Response

SMALL PACKAGE
MAXALLOWED
REQUIRED

FREIGHT
LENGTH
TYPE
NAME XPATH DESCRIPTION VALIDATION RULES

/TrackResponse
/Shipment Date of the Estimated Departure Time

String
*Yes

Yes
No
1

8
Date /OriginPortDetails Stamp at the origin port. YYYYMMDD
/EstimatedDeparture format
/Date
/TrackResponse
/Shipment Time of the Estimated Departure Time

String

Yes
No

No
1

6
Time /OriginPortDetails Stamp at the origin port. HHMMSS
/EstimatedDeparture format
/Time

Container
/TrackResponse
Container for the destination port of the

Yes
N/A
No

No
DestinationPortDetails
1
/Shipment
shipment
/DestinationPortDetails

/TrackResponse
String

1..35
/Shipment

Yes
No

No
DestinationPort Destination port of the shipment
1

/DestinationPortDetails
/DestinationPort

/TrackResponse
Container

/Shipment Container for Estimated Arrival Time

Yes
N/A
No

No
EstimatedArrival
1

/DestinationPortDetails Stamp at the Destination Port


/EstimatedArrival

30 October 2008 Page 63


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Track Response

SMALL PACKAGE
MAXALLOWED
REQUIRED

FREIGHT
LENGTH
TYPE
NAME XPATH DESCRIPTION VALIDATION RULES

/TrackResponse
/Shipment Date of the Estimated Arrival Time Stamp

String
*Yes

Yes
No
1

8
Date /DestinationPortDetails at the Destination Port. YYYYMMDD
/EstimatedArrival format
/Date
/TrackResponse
/Shipment Time of the Estimated Arrival Time

String

Yes
No

No
1

6
Time /DestinationPortDetails Stamp at the Destination Port. HHMMSS
/EstimatedArrival format
/Time

/TrackResponse

1..512
String

Yes
No

No
DescriptionOfGoods Description of Goods in the shipment
1
/Shipment
/DescriptionOfGoods

Container
/TrackResponse

Yes
N/A
No

No
CargoReady Container for cargo ready date and time
1

/Shipment
/CargoReady

/TrackResponse
String
*Yes

/Shipment Cargo Ready date for the shipment.

Yes
No
Date
1

/CargoReady YYYYMMDD
/Date

30 October 2008 Page 64


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Track Response

SMALL PACKAGE
MAXALLOWED
REQUIRED

FREIGHT
LENGTH
TYPE
NAME XPATH DESCRIPTION VALIDATION RULES

/TrackResponse

String
/Shipment Cargo Ready time for the shipment.

Yes
No

No
Time

6
/CargoReady HHMMSS
/Time

Container
/TrackResponse

Yes
N/A
No

No
Manifest Container for Manifest date and time

1
/Shipment
/Manifest

/TrackResponse

String
/Shipment *Yes Manifest date for the shipment.

Yes
No
Date
1

8
/Manifest YYYYMMDD
/Date

/TrackResponse
String
/Shipment

Yes
No

No
Time Manifest time for the shipment. HHMMSS
1

6
/Manifest
/Time
Container

/TrackResponse
Many

Container for carrier activity information

Yes
N/A
No

No
CarrierActivityInformation /Shipment
for the shipment
/CarrierActivityInformation

30 October 2008 Page 65


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Track Response

SMALL PACKAGE
MAXALLOWED
REQUIRED

FREIGHT
LENGTH
TYPE
NAME XPATH DESCRIPTION VALIDATION RULES

/TrackResponse

String

1..30
/Shipment

Yes
No

No
CarrierId Id number of the carrier

1
/CarrierActivityInformation
/CarrierId

/TrackResponse

String

1..35
/Shipment Description of the carrier e.g.:

Yes
No

No
Description

1
/CarrierActivityInformation flight/vessel
/Description

/TrackResponse

String

1..35
/Shipment

Yes
No

No
Status Status of the carrier
1
/CarrierActivityInformation
/Status

/TrackResponse
Container
/Shipment Container for arrival time stamp

Yes
N/A
No

No
Arrival
1

/CarrierActivityInformation information of the carrier


/Arrival

/TrackResponse
/Shipment
String
*Yes

Date of the arrival time stamp.

Yes
No
1

Date /CarrierActivityInformation
YYYYMMDD format
/Arrival
/Date

30 October 2008 Page 66


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Track Response

SMALL PACKAGE
MAXALLOWED
REQUIRED

FREIGHT
LENGTH
TYPE
NAME XPATH DESCRIPTION VALIDATION RULES

/TrackResponse
/Shipment

String

Yes
No

No
1

6
Time /CarrierActivityInformation Time of the arrival time stamp. HHMMSS
/Arrival
/Time

/TrackResponse

Container
/Shipment Container for Departure time stamp

Yes
N/A
No

No
Departure

1
/CarrierActivityInformation information of the carrier
/Departure

/TrackResponse
/Shipment

String
*Yes Date of the Departure time stamp.

Yes
No
1

8
Date /CarrierActivityInformation
YYYYMMDD format
/Departure
/Date
/TrackResponse
/Shipment
String

Time of the Departure time stamp.

Yes
No

No
1

6
Time /CarrierActivityInformation
HHMMSS
/Departure
/Time

/TrackResponse
String

1..30

/Shipment Origin Port of the Carrier’s leg of the

Yes
No

No
OriginPort
1

/CarrierActivityInformation journey
/OriginPort

30 October 2008 Page 67


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Track Response

SMALL PACKAGE
MAXALLOWED
REQUIRED

FREIGHT
LENGTH
TYPE
NAME XPATH DESCRIPTION VALIDATION RULES

/TrackResponse

String

1..30
/Shipment Destination Port of the Carrier’s leg of the

Yes
No

No
DestinationPort

1
/CarrierActivityInformation journey
/DestinationPort

/TrackResponse Date shipment was originally scheduled

String

Yes

Yes
No
ScheduledDeliveryDate for delivery. Will be returned when

8
/Shipment
/ScheduledDeliveryDate available. YYYYMMDD

/TrackResponse

String

Yes

Yes
ScheduledDeliveryTime No HHMMSS
1

6
/Shipment
/ScheduledDeliveryTime

/TrackResponse
String

1..30

Yes
No

No
FileNumber File Number of the shipment
1

/Shipment
/FileNumber
Container

/TrackResponse

Yes
N/A
No

No
Appointment Appointment Details
1

/Shipment
/Appointment

30 October 2008 Page 68


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Track Response

SMALL PACKAGE
MAXALLOWED
REQUIRED

FREIGHT
LENGTH
TYPE
NAME XPATH DESCRIPTION VALIDATION RULES

/TrackResponse

Container
/Shipment Container for Appointment Made Date

Yes
N/A
No

No
Made

1
/Appointment and Time
/Made

/TrackResponse
/Shipment

String
Appointment Made Date

Yes
No

No
1

8
Date /Appointment
YYYYMMDD
/Made
/Date
/TrackResponse
/Shipment

String
Appointment Made Time

Yes
No

No
1

6
Time /Appointment
HHMMSS
/Made
/Time

/TrackResponse
Container

/Shipment Container for Appointment Requested

Yes
N/A
No

No
Requested
1

/Appointment Date and Time


/Requested

/TrackResponse
/Shipment
String

Appointment Requested Date

Yes
No

No
1

Date /Appointment
YYYYMMDD
/Requested
/Date

30 October 2008 Page 69


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Track Response

SMALL PACKAGE
MAXALLOWED
REQUIRED

FREIGHT
LENGTH
TYPE
NAME XPATH DESCRIPTION VALIDATION RULES

/TrackResponse
/Shipment

String
Appointment Requested Time

Yes
No

No
1

6
Time /Appointment
HHMMSS
/Requested
/Time

/TrackResponse

String
/Shipment Appointment Begin Time

Yes
No

No
BeginTime

6
/Appointment HHMMSS
/BeginTime

/TrackResponse

String
/Shipment Appointment End Time

Yes
No

No
EndTime
1

6
/Appointment HHMMSS
/EndTime
Container
/TrackResponse

Yes
N/A
No

No
Package Package Information.
1

/Shipment
/Package

/TrackResponse
1…21
String

/Shipment

Yes
No

No
TrackingNumber TrackingNumber of the package.
1

/Package
/TrackingNumber

30 October 2008 Page 70


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Track Response

SMALL PACKAGE
MAXALLOWED
REQUIRED

FREIGHT
LENGTH
TYPE
NAME XPATH DESCRIPTION VALIDATION RULES

/TrackResponse

String
/Shipment

Yes
No

No
RescheduledDeliveryDate The delivery is rescheduled to this date

8
/Package
/RescheduledDeliveryDate

/TrackResponse

String
/Shipment

Yes
No

No
RescheduledDeliveryTime The delivery is rescheduled to this time

6
/Package
/RescheduledDeliveryTime

When a requestor to intercept US50/PR


/TrackResponse

Container
package at the destination center at any

Yes
/Shipment

N/A
No

No
1
Reroute time before it has been delivered,
/Package
Consignee’s Reroute Container Tag is
/Reroute
provided in the track response.
/TrackResponse
Container
/Shipment
Consignee’s Reroute Address Container

Yes
N/A
No

No
1

Address /Package
Tag.
/Reroute
/Address
/TrackResponse
/Shipment
String

1..30

Yes
/Package
No

No
1

AddressLine1 Address line element of Reroute address


/Reroute
/Address
/AddressLine1

30 October 2008 Page 71


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Track Response

SMALL PACKAGE
MAXALLOWED
REQUIRED

FREIGHT
LENGTH
TYPE
NAME XPATH DESCRIPTION VALIDATION RULES

/TrackResponse
/Shipment

String

1..30

Yes
/Package

No

No
1
AddressLine2 Address line element of Reroute address
/Reroute
/Address
/AddressLine2
/TrackResponse
/Shipment

String

1..30

Yes
/Package

No

No
1
AddressLine3 Address line element of Reroute address
/Reroute
/Address
/AddressLine3
/TrackResponse
/Shipment
String

1..30

Yes
/Package
No

No
1

City Consignee’s City.


/Reroute
/Address
/City
/TrackResponse
/Shipment
String

Yes
/Package
2..5
No

No
1

StateProvinceCode Consignee’s State Or Province Code.


/Reroute
/Address
/StateProvinceCode

30 October 2008 Page 72


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Track Response

SMALL PACKAGE
MAXALLOWED
REQUIRED

FREIGHT
LENGTH
TYPE
NAME XPATH DESCRIPTION VALIDATION RULES

/TrackResponse
/Shipment

5…16
String

Yes
/Package

No

No
1
PostalCode Consignee’s Postal Code
/Reroute
/Address
/PostalCode
/TrackResponse
/Shipment

String

2…3

Yes
/Package

No

No
1
CountryCode Consignee’s Country Code.
/Reroute
/Address
/CountryCode

/TrackResponse

Container
Return to Container tag that will contain
/Shipment

Yes
N/A
No

No
ReturnTo the address information of who the
1

/Package
package is returned to.
/ReturnTo

/TrackResponse
Container

/Shipment

Yes
N/A
No

No
1

Address /Package Return to sender address Container tag.


/ReturnTo
/Address
/TrackResponse
/Shipment
"Return to AddressLine1. It contains
String

0..35

Yes
/Package
No

No
1

AddressLine1 StreetPrefix, StreetName,


/ReturnTo
StreetTypeCode"
/Address
/AddressLine1

30 October 2008 Page 73


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Track Response

SMALL PACKAGE
MAXALLOWED
REQUIRED

FREIGHT
LENGTH
TYPE
NAME XPATH DESCRIPTION VALIDATION RULES

/TrackResponse
/Shipment

String

0..35
Return to AddressLine2. It contains

Yes
/Package

No

No
1
AddressLine2
/ReturnTo building floor, room, suite or PO Box No.
/Address
/AddressLine2
/TrackResponse
/Shipment

String

0..35

Yes
/Package

No

No
1
AddressLine3 Return to AddressLine3
/ReturnTo
/Address
/AddressLine3
/TrackResponse
/Shipment
String

0..30

Yes
/Package
No

No
1

City Return to address city.


/ReturnTo
/Address
/City
/TrackResponse
/Shipment
String

Yes
/Package
0..5
No

No
1

StateProvinceCode Return to state or province code.


/ReturnTo
/Address
/StateProvinceCode

30 October 2008 Page 74


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Track Response

SMALL PACKAGE
MAXALLOWED
REQUIRED

FREIGHT
LENGTH
TYPE
NAME XPATH DESCRIPTION VALIDATION RULES

/TrackResponse
/Shipment

0…16
String

Yes
/Package

No

No
1
PostalCode Return to postal code
/ReturnTo
/Address
/PostalCode
/TrackResponse
/Shipment

String

0…3

Yes
/Package

No

No
1
CountryCode Return to country code.
/ReturnTo
/Address
/CountryCode

/TrackResponse

String
/Shipment

Yes
N/A
No

No
PackageServiceOptions Container for package service options
1

/Package
/PackageServiceOptions

/TrackResponse
Container

/Shipment
Container tag for SignatureRequired

Yes
N/A
No

No
1

SignatureRequired /Package
option.
/PackageServiceOptions
/SignatureRequired

30 October 2008 Page 75


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Track Response

SMALL PACKAGE
MAXALLOWED
REQUIRED

FREIGHT
LENGTH
TYPE
NAME XPATH DESCRIPTION VALIDATION RULES

Client Application receives Special


/TrackResponse
Instructions via the package detail
/Shipment
response indicating Signature Required

String
*Yes

Yes
/Package

No
1

2
Code or Adult Signature Required when a
/PackageServiceOptions
package is delivered. Valid Values:
/SignatureRequired
A=Adult Signature Required
/Code
S=Signature Required
/TrackResponse
/Shipment

String

1..35
*Yes
Description of the Signature Required.

Yes
/Package

No
1
Description
/PackageServiceOptions (Currently not populated).
/SignatureRequired
/Description

/TrackResponse
Container
Many

/Shipment

Yes
N/A
No

No
Activity Activity information
/Package
/Activity

/TrackResponse
Container

/Shipment

Yes
N/A
No

No
1

ActivityLocation /Package Location of activity.


/Activity
/ActivityLocation

30 October 2008 Page 76


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Track Response

SMALL PACKAGE
MAXALLOWED
REQUIRED

FREIGHT
LENGTH
TYPE
NAME XPATH DESCRIPTION VALIDATION RULES

/TrackResponse
/Shipment

Container

Yes
/Package

N/A
No

No
1
Address Address information
/Activity
/ActivityLocation
/Address
/TrackResponse
/Shipment
/Package

1…30
String
AddressLine1 contains street prefix,

Yes
No

No
1
AddressLine1 /Activity
street name, street type
/ActivityLocation
/Address
/AddressLine1
/TrackResponse
/Shipment
/Package
1…30
String
AddressLine2 contains building floor,

Yes
No

No
1

AddressLine2 /Activity
room, suite and PO Box Number.
/ActivityLocation
/Address
/AddressLine2
/TrackResponse
/Shipment
/Package
String

1..30

Yes
No

No
1

AddressLine3 /Activity Additional address information


/ActivityLocation
/Address
/AddressLine3

30 October 2008 Page 77


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Track Response

SMALL PACKAGE
MAXALLOWED
REQUIRED

FREIGHT
LENGTH
TYPE
NAME XPATH DESCRIPTION VALIDATION RULES

/TrackResponse
/Shipment
/Package

String

1..30

Yes
No

No
1
City /Activity Activity location’s City
/ActivityLocation
/Address
/City
/TrackResponse
/Shipment
/Package

String

2…5

Yes
No

No
1
StateProvinceCode /Activity Activity location’s state of province code.
/ActivityLocation
/Address
/StateProvinceCode
/TrackResponse
/Shipment
/Package 1…16
String

Yes
No

No
1

PostalCode /Activity Activity Location’s postal codes.


/ActivityLocation
/Address
/PostalCode
/TrackResponse
/Shipment
/Package
String
*Yes

Yes

No
1

CountryCode /Activity Activity location’s country code.


/ActivityLocation
/Address
/CountryCode

30 October 2008 Page 78


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Track Response

SMALL PACKAGE
MAXALLOWED
REQUIRED

FREIGHT
LENGTH
TYPE
NAME XPATH DESCRIPTION VALIDATION RULES

/TrackResponse
/Shipment

Container

Yes
/Package

N/A
No

No
1
AddressArtifactFormat Address location.
/Activity
/ActivityLocation
/AddressArtifactFormat
/TrackResponse
/Shipment
/Package

0…10
String

Yes
No

No
1
StreetNumberLow /Activity Street Number low
/ActivityLocation
/AddressArtifactFormat
/StreetNumberLow
/TrackResponse
/Shipment
/Package
String

Yes
No

No
1

StreetPrefix /Activity 2 Street Prefix


/ActivityLocation
/AddressArtifactFormat
/StreetPrefix
/TrackResponse
/Shipment
/Package
String

0..50

Yes
No

No
1

StreetName /Activity Street Name


/ActivityLocation
/AddressArtifactFormat
/StreetName

30 October 2008 Page 79


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Track Response

SMALL PACKAGE
MAXALLOWED
REQUIRED

FREIGHT
LENGTH
TYPE
NAME XPATH DESCRIPTION VALIDATION RULES

/TrackResponse
/Shipment
/Package

String

Yes
No

No
1

2
StreetSuffix /Activity Street Suffix
/ActivityLocation
/AddressArtifactFormat
/StreetSuffix
/TrackResponse
/Shipment
/Package

String

Yes

No
1
StreetType /Activity
/ActivityLocation
/AddressArtifactFormat
/StreetType
/TrackResponse
/Shipment
/Package
String

5..16

Yes
No

No
1

PoliticalDivision2 /Activity Activity location's city


/ActivityLocation
/AddressArtifactFormat
/PoliticalDivision2
/TrackResponse
/Shipment
/Package
String

0..30

Yes
No

No
1

PoliticalDivision1 /Activity PoliticalDivision1State province


/ActivityLocation
/AddressArtifactFormat
/PoliticalDivision1

30 October 2008 Page 80


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Track Response

SMALL PACKAGE
MAXALLOWED
REQUIRED

FREIGHT
LENGTH
TYPE
NAME XPATH DESCRIPTION VALIDATION RULES

/TrackResponse
/Shipment
/Package

String

5..16

Yes
No

No
1
PostcodePrimaryLow /Activity Postal Code
/ActivityLocation
/AddressArtifactFormat
/PostcodePrimaryLow
/TrackResponse
/Shipment
/Package

String

Yes
No

No
1

2
CountryCode /Activity Activity location’s country code.
/ActivityLocation
/AddressArtifactFormat
/CountryCode
/TrackResponse
/Shipment
String
*Yes

Yes
/Package

No
1

2
Code Activity location code.
/Activity
/ActivityLocation
/Code
/TrackResponse
/Shipment
String

1..35
*Yes

Yes
/Package

No
1

Description Activity location Description.


/Activity
/ActivityLocation
/Description

30 October 2008 Page 81


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Track Response

SMALL PACKAGE
MAXALLOWED
REQUIRED

FREIGHT
LENGTH
TYPE
NAME XPATH DESCRIPTION VALIDATION RULES

/TrackResponse
/Shipment

0…15
String

Yes
/Package

No

No
1
SignedForByName Name of the person who signed
/Activity
/ActivityLocation
/SignedForByName
/TrackResponse

Container
/Shipment

Yes
N/A
No

No
1
Status /Package Package activity status Container.
/Activity
/Status
/TrackResponse
/Shipment

Container

Yes
/Package

0..1
No

No
1
StatusType Container tag for activity Status type.
/Activity
/Status
/StatusType
/TrackResponse
Code for status type of activity
/Shipment
I = In Transit
/Package
String

D = Delivered

Yes
No

No
1

Code /Activity
X = Exception
/Status
P = Pickup
/StatusType
M = Manifest Pickup
/Code

30 October 2008 Page 82


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Track Response

SMALL PACKAGE
MAXALLOWED
REQUIRED

FREIGHT
LENGTH
TYPE
NAME XPATH DESCRIPTION VALIDATION RULES

/TrackResponse
/Shipment
/Package

1…20
String

Yes
No

No
1
Description /Activity Status type of activity.
/Status
/StatusType
/Description
/TrackResponse
/Shipment

Container

0…1

Yes
/Package

No

No
1
StatusCode Container tag for activity status code
/Activity
/Status
/StatusCode
/TrackResponse
/Shipment
/Package Code for status code of activity.
String

Yes
No

No
1

Code /Activity 2 Describes the activity status type in


/Status greater detail
/StatusCode
/Code
/TrackResponse
/Shipment
String

Yes
No

No
1

Date /Package Date of activity


/Activity
/Date

30 October 2008 Page 83


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Track Response

SMALL PACKAGE
MAXALLOWED
REQUIRED

FREIGHT
LENGTH
TYPE
NAME XPATH DESCRIPTION VALIDATION RULES

/TrackResponse
/Shipment

String

Yes
No

No
1

4
Time /Package Time of activity
/Activity
/Time

/TrackResponse

Container
Many
/Shipment Container provided when the package

Yes
N/A
No

No
Message
/Package has additional delivery information.
/Message

Code describing what type of message


the customer can provide: Valid values:
01 – On Time
02 – Rescheduled
03 – Returned To Shipper
/TrackResponse
Suggested text to provide to the
/Shipment
String

0…2
*Yes

customer when the code equals 01 is

Yes

No
1

Code /Package
"On Time".
/Message
Suggested Text to provide to the
/Code
customer when the code equals 02 is
"Rescheduled".
Suggested Text to provide to the
customer when the code equals 03 is
"Returned To Shipper".

30 October 2008 Page 84


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Track Response

SMALL PACKAGE
MAXALLOWED
REQUIRED

FREIGHT
LENGTH
TYPE
NAME XPATH DESCRIPTION VALIDATION RULES

/TrackResponse
/Shipment Description of the code provided in

String

Yes
No

No
15
1
Description /Package /TrackResponse/Package/Message/Cod
/Message e
/Description

/TrackResponse

Container
/Shipment

Yes
N/A

No
PackageWeight

1
/Package
/PackageWeight

/TrackResponse

Container
/Shipment
Package weight unit of measurement

Yes
N/A
No

No
1
UnitOfMeasurement /Package
Container tag.
/PackageWeight
/UnitOfMeasurement
/TrackResponse
/Shipment
String
*Yes

Package weight unit of measurement

Yes
/Package

No
1

Code
/PackageWeight code. Defaults to ‘LBS’.
/UnitOfMeasurement
/Code
/TrackResponse
/Shipment
String

1..35

Description of the package weight

Yes
/Package
No

No
1

Description
/PackageWeight measurement units.
/UnitOfMeasurement
/Description

30 October 2008 Page 85


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Track Response

SMALL PACKAGE
MAXALLOWED
REQUIRED

FREIGHT
LENGTH
TYPE
NAME XPATH DESCRIPTION VALIDATION RULES

/TrackResponse
/Shipment

String
Packages weight. Set to 0 for package

Yes
7.2
No

No
1
Weight /Package
type of letters.
/PackageWeight
/Weight

/TrackResponse

Container
Many
/Shipment Package reference number Container

Yes
N/A
No

No
ReferenceNumber
/Package tag.
/ReferenceNumber

/TrackResponse
/Shipment

String
Reference number type code, for

Yes
No

No
1

2
Code /Package
signifying PO #’s, Invoice #’s, etc.
/ReferenceNumber
/Code
/TrackResponse
/Shipment
String

1..35
*Yes

Yes

No
1

Value /Package Customer supplied reference number.


/ReferenceNumber
/Value

/TrackResponse
Container

/Shipment

Yes
N/A
No

No
ProductType Container tag for the type of the Product.
1

/Package
/ProductType

30 October 2008 Page 86


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Track Response

SMALL PACKAGE
MAXALLOWED
REQUIRED

FREIGHT
LENGTH
TYPE
NAME XPATH DESCRIPTION VALIDATION RULES

/TrackResponse
/Shipment Code indicating the type of the Product.

String

Yes
No

No
1
Code /Package Its value is returned from the Tracking
/ProductType Component. (Currently not populated).
/Code
/TrackResponse Description of the type of the Product.
/Shipment Valid Value:

String

1..35
*Yes

Yes

No
1
Description /Package “World Ease” (when a shipment with
/ProductType single/multiple packages is associated
/Description with World Ease movement).

30 October 2008 Page 87


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Track Response

Example TrackResponse Message:


<?xml version="1.0" ?>
<TrackResponse>
<Response>
<TransactionReference>
<CustomerContext>guidlikesubstance</CustomerContext>
<XpciVersion>1.0</XpciVersion>
</TransactionReference>
<ResponseStatusCode>1</ResponseStatusCode>
<ResponseStatusDescription>Success</ResponseStatusDescription>
</Response>
<Shipment>
<Shipper>
<ShipperNumber>123X67</ShipperNumber>
</Shipper>
<ShipTo>
<Address>
<City>Timonium</City>
<StateProvinceCode>MD</StateProvinceCode>
<CountryCode>US</CountryCode>
</Address>
</ShipTo>
<Service>
<Code>03</Code>
<Description>Ground</Description>
</Service>
<Package>
<TrackingNumber>1Z9999999999999999</TrackingNumber>
<Activity>
<ActivityLocation>
<Address>
<City>Timonium</City>
<StateProvinceCode>MD</StateProvinceCode>
<CountryCode>US</CountryCode>
</Address>
<Code>DL</Code>
<Description>Delivered</Description>
</ActivityLocation>
<Status>
<StatusType>
<Code>XX</Code>
<Description>Status XX</Description>
</StatusType>
<StatusCode>
<Code>YY</Code>
<Description>Code YY</Description>
</StatusCode>
</Status>
</Activity>
</Package>
</Shipment>
</TrackResponse>

30 October 2008 Page 88


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Error Codes

Error Codes
The following table lists the errors that UPS may return in response to a request.
Errors can have different levels of severity. Warning messages indicate that UPS
was able to process the request; however, there is information in the response about
which the user should know. Transient errors are temporary errors, due to
temporary high server loads or scheduled maintenance, for example. The
application may reissue the request at a later time. Hard errors indicate that an error
existed in the request that UPS could not resolve. Applications should not re-issue
the same request without first correcting the error.
Code Severity Error Message
20011 Hard The Integration indicator is no longer supported
150000 Transient Tracking service unavailable
150020 Hard Invalid pickup date range
150021 Hard Invalid shipment identification number length
150022 Hard Invalid tracking number length
150023 Hard Invalid reference number value length
150024 Hard Invalid destination postal code length
150025 Hard Invalid destination country code length
150026 Hard Invalid begin date length
150027 Hard Invalid end date length
150028 Hard Invalid shipper number length
150029 Hard Duplicate Tracking Numbers found in Package Detail
150030 Hard Invalid Request/ RequestOption
150099 Transient Delivery Change Request System Unavailable
151018 Hard Invalid tracking number
151019 Hard No activity records found for tracking number
151036 Hard Either tracking number or reference number required
151038 Hard Shipment number required with reference number
151040 Hard Both tracking number and reference number invalid
151044 Hard No tracking information available
151045 Hard No information found
151050 Hard Too many records to display
151051 Hard Some Records are not returned
151062 Hard No tracking information available
151068 Hard Invalid Shipper Number
151085 Hard Multiple shipper numbers found
151086 Hard Maximum candidate exceeded for Reference number
search. Use the tracking number search
151091 Hard Multiple reference numbers found, it may be possible to
narrow the search with additional data.
151602 Hard Destination Country Code must be entered
152012 Hard Number of records selected exceeds limit of 175
152100 Hard Enter shipper number - additional shippers used the
reference
152110 Hard No information found for reference number
152315 Hard Multiple reference numbers found, it is not possible to
qualify further.
154010 Hard Invalid inquiry number
154030 Hard No information for this tracking number
154040 Hard Invalid tracking type
154050 Hard Non-unique BCD number - Candidate List returned
154070 Hard Signature Tracking Options not available without
successful login

30 October 2008 Page 89


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Error Codes

Code Severity Error Message


154080 Warning Could not verify Signature rights
154081 Warning Your search returned multiple Shipments. Please select
from the provided results.
154082 Hard The supplied Candidate Bookmark fails validation
154083 Hard Specific Tracking data could not be found. It may be
possible to narrow the search with additional data.
154084 Hard Invalid origin postal code length
154085 Hard Invalid origin country code length
154086 Hard Missing origin country code when postal code supplied

30 October 2008 Page 90


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Customer Integration Environment

Customer Integration Environment

The Customer Integration Environment (CIE) allows customers to test their


application prior to launch. This environment is intended for integration testing of
customer applications with the UPS servers. No stress testing should ever be
performed by customers against any UPS systems.
Once your application has been thoroughly tested, you should redirect the
application to the UPS Production Environment.
Please note that while CIE maintains system availability 24 hours, 7 days each
week, there are occasional system down times to allow for server maintenance.

For integration testing, you should direct your test Tracking software to:
https://wwwcie.ups.com/ups.app/xml/Track

System Availability
The Customer Integration Environment is available 24 hours a day, 7 days a week.

Server Availability Check


All of the UPS services work using HTTPS POST. Using the same URL as you
point your application to, perform an HTTPS GET. If the server is available, it will
reply with the service name, remote user, server port, server name, and servlet path.
To see this in action, type the following URL in your web browser:
https://wwwcie.ups.com/ups.app/xml/Track

The following will be returned:

Service Name: Track


Remote User: null
Server Port: 443
Server Name: wwwcie.ups.com
Servlet Path: /Track

30 October 2008 Page 91


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Tracking Usage Guidelines

Tracking Usage Guidelines


The following guidelines are included so all UPS customers can use UPS
Tracking without delays:
 Insure that tracking requests are valid; if error messages like tracking
number not found, no information available, invalid tracking
number, etc. are received, research the cause of the error before
continuing to track the same number
 When the results of a tracking request indicate a “delivered” status
do not continue to track the package.
 Track packages during “off hours” whenever possible, “off hours”
are from 5:00 pm till 8:00 am East Coast time.
 Use your UPS service level (Early AM, Next Day Air, etc.) to
determine the best time of day to track and receive up to the minute
tracking information.
 Allow for at least two seconds between individual tracking requests.
 Avoid automatic access from 10:00 am through 3:00 pm EST.
However, you may track critical packages during this time.
 Evenly distribute you information requests over the remaining 19
hour window.
 Make every attempt to limit requests for information to no more than
2000 per hour (evenly distributed throughout the hour).
 Do not track the same numbers continually throughout the day. Any
less than 50% unique numbers in a given 24 hour period can result in
termination. For example, if a service level indicates a guaranteed
delivery time of 10:30 AM for your delivery address and the tracking
information guarantee is for 30 minutes after delivery, you should
track that shipment after 11:00 AM.
 If daily/weekly tracking requests exceed daily shipping volume by a
lrge margin, UPS will reserve the right to suspend tracking for that
account until the situation is restified. If a resolution can not be
found and implemented, tracking for that account may be
terminated.

30 October 2008 Page 92


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Appendix A: UPS Service Codes

Appendix A: UPS Service Codes


UPS offers a wide variety of package delivery services. The following tables list
the service code values for these services; they are ordered by the origin of the
shipment. The final table lists service codes for freight shipments. For more
information on UPS services, refer to the latest UPS Rate and Service Guide
available at http://www.ups.com.

Code United States Domestic Shipments


01 UPS Next Day Air®
02 UPS Second Day Air®
03 UPS Ground
12 UPS Three-Day Select®
13 UPS Next Day Air Saver®
14 UPS Next Day Air® Early A.M. SM
54 UPS Worldwide Express PlusSM
59 UPS Second Day Air A.M.®

Code Shipments Originating in United States


01 UPS Next Day Air®
02 UPS Second Day Air®
03 UPS Ground
07 UPS Worldwide ExpressSM
08 UPS Worldwide ExpeditedSM
11 UPS Standard
12 UPS Three-Day Select®
14 UPS Next Day Air® Early A.M. SM
54 UPS Worldwide Express PlusSM
59 UPS Second Day Air A.M.®
65 UPS Saver

Code Shipments Originating in Puerto Rico


01 UPS Next Day Air®
02 UPS Second Day Air®
03 UPS Ground
07 UPS Worldwide ExpressSM
08 UPS Worldwide ExpeditedSM
14 UPS Next Day Air® Early A.M. SM
54 UPS Worldwide Express PlusSM
65 UPS Saver

Code Shipments Originating in Canada


01 UPS Express
07 UPS Worldwide ExpressSM
08 UPS Worldwide ExpeditedSM
11 UPS Standard
12 UPS Three-Day Select®
13 UPS Saver
14 UPS Express Early A.M. SM

30 October 2008 Page 93


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Appendix A: UPS Service Codes

Code Shipments Originating in Mexico


07 UPS Express
08 UPS ExpeditedSM
54 UPS Express Plus
65 UPS Saver

Code Polish Domestic Shipments


07 UPS Express
08 UPS ExpeditedSM
11 UPS Standard
54 UPS Worldwide Express PlusSM
65 UPS Saver
82 UPS Today StandardSM
83 UPS Today Dedicated CourrierSM
84 UPS Today Intercity
85 UPS Today Express
86 UPS Today Express Saver

Code Shipments Originating in the European Union


07 UPS Express
08 UPS ExpeditedSM
11 UPS Standard
54 UPS Worldwide Express PlusSM
65 UPS Saver

Code Shipments Originating in Other Countries


07 UPS Express
08 UPS Worldwide ExpeditedSM
11 UPS Standard
54 UPS Worldwide Express PlusSM
65 UPS Saver

Code Freight Shipments


TDCB Trade Direct Cross Border
TDA Trade Direct Air
TDO Trade Direct Ocean
308 UPS Freight LTL
309 UPS Freight LTL Guaranteed
310 UPS Freight LTL Urgent

30 October 2008 Page 94


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Appendix B: Reference Number Codes

Appendix B: Reference Number Codes


Shipments and packages may include a reference number. The type of reference
number may be indicated by a reference number code. The following table lists
the reference number code values.

Code Reference Number Type


AJ Accounts Receivable Customer Account
AT Appropriation Number
BM Bill of Lading Number
9V Collect on Delivery (COD) Number
ON Dealer Order Number
DP Department Number
3Q Food and Drug Administration (FDA) Product Code
IK Invoice Number
MK Manifest Key Number
MJ Model Number
PM Part Number
PC Production Code
PO Purchase Order Number
RQ Purchase Request Number
RZ Return Authorization Number
SA Salesperson Number
SE Serial Number
ST Store Number
TN Transaction Reference Number

30 October 2008 Page 95


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Appendix C: Country Codes

Appendix C: Country Codes


UPS country code abbreviations generally follow the recommendations of the
International Standards Organization, which publishes a list of currency
abbreviations in ISO Standard 3166. The following table lists the ISO country
codes that ISO had defined when this document was published. The latest
information is available from the ISO web site.
Please note that not all UPS services are available in every country. For more
information on UPS services, refer to the latest UPS Rate and Service Guide
available at http://www.ups.com.

Country Code
Afghanistan AF
Åland Islands AX
Albania AL
Algeria DZ
American Samoa AS
Andorra AD
Angola AO
Anguilla AI
Antarctica AQ
Antigua and Barbuda AG
Argentina AR
Armenia AM
Aruba AW
Australia AU
Austria AT
Azerbaijan AZ
Bahamas BS
Bahrain BH
Bangladesh BD
Barbados BB
Belarus BY
Belgium BE
Belize BZ
Benin BJ
Bermuda BM
Bhutan BT
Bolivia BO
Bosnia and Herzegovina BA
Botswana BW
Bouvet Island BV
Brazil BR
British Indian Ocean Territory IO
Brunei Darussalam BN
Bulgaria BG
Burkina Faso BF
Burundi BI
Cambodia KH
Cameroon CM
Canada CA
Cape Verde CV

30 October 2008 Page 96


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Appendix C: Country Codes

Country Code
Cayman Islands KY
Central African Republic CF
Chad TD
Chile CL
China CN
Christmas Island CX
Cocos (Keeling) Islands CC
Colombia CO
Comoros KM
Congo CG
Congo, The Democratic Republic of CD
Cook Islands CK
Costa Rica CR
Côte D'ivoire CI
Croatia HR
Cuba CU
Cyprus CY
Czech Republic CZ
Denmark DK
Djibouti DJ
Dominica DM
Dominican Republic DO
Ecuador EC
Egypt EG
El Salvador SV
Equatorial Guinea GQ
Eritrea ER
Estonia EE
Ethiopia ET
Falkland Islands (Malvinas) FK
Faroe Islands FO
Fiji FJ
Finland FI
France FR
French Guiana GF
French Polynesia PF
French Southern Territories TF
Gabon GA
Gambia GM
Georgia GE
Germany DE
Ghana GH
Gibraltar GI
Greece GR
Greenland GL
Grenada GD
Guadeloupe GP
Guam GU
Guatemala GT
Guernsey GG
Guinea GN
Guinea-Bissau GW
Guyana GY
Haiti HT
Heard Island and Mcdonald Islands HM

30 October 2008 Page 97


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Appendix C: Country Codes

Country Code
Holy See (Vatican City State) VA
Honduras HN
Hong Kong HK
Hungary HU
Iceland IS
India IN
Indonesia ID
Iran, Islamic Republic of IR
Iraq IQ
Ireland IE
Isle of Man IM
Israel IL
Italy IT
Jamaica JM
Japan JP
Jersey JE
Jordan JO
Kazakhstan KZ
Kenya KE
Kiribati KI
Korea, Democratic People's Republic of KP
Korea, Republic of KR
Kuwait KW
Kyrgyzstan KG
Lao People's Democratic Republic LA
Latvia LV
Lebanon LB
Lesotho LS
Liberia LR
Libyan Arab Jamahiriya LY
Liechtenstein LI
Lithuania LT
Luxembourg LU
Macao MO
Macedonia, The Former Yugoslav Republic of MK
Madagascar MG
Malawi MW
Malaysia MY
Maldives MV
Mali ML
Malta MT
Marshall Islands MH
Martinique MQ
Mauritania MR
Mauritius MU
Mayotte YT
Mexico MX
Micronesia, Federated States of FM
Moldova, Republic of MD
Monaco MC
Mongolia MN
Montenegro ME
Montserrat MS
Morocco MA
Mozambique MZ

30 October 2008 Page 98


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Appendix C: Country Codes

Country Code
Myanmar MM
Namibia NA
Nauru NR
Nepal NP
Netherlands NL
Netherlands Antilles AN
New Caledonia NC
New Zealand NZ
Nicaragua NI
Niger NE
Nigeria NG
Niue NU
Norfolk Island NF
Northern Mariana Islands MP
Norway NO
Oman OM
Pakistan PK
Palau PW
Palestinian Territory, Occupied PS
Panama PA
Papua New Guinea PG
Paraguay PY
Peru PE
Philippines PH
Pitcairn PN
Poland PL
Portugal PT
Puerto Rico PR
Qatar QA
Réunion RE
Romania RO
Russian Federation RU
Rwanda RW
Saint Helena SH
Saint Kitts and Nevis KN
Saint Lucia LC
Saint Pierre and Miquelon PM
Saint Vincent and The Grenadines VC
Samoa WS
San Marino SM
Sao Tome and Principe ST
Saudi Arabia SA
Senegal SN
Serbia RS
Seychelles SC
Sierra Leone SL
Singapore SG
Slovakia SK
Slovenia SI
Solomon Islands SB
Somalia SO
South Africa ZA
South Georgia and The South Sandwich Islands GS
Spain ES
Sri Lanka LK

30 October 2008 Page 99


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Appendix C: Country Codes

Country Code
Sudan SD
Suriname SR
Svalbard and Jan Mayen SJ
Swaziland SZ
Sweden SE
Switzerland CH
Syrian Arab Republic SY
Taiwan, Province of China TW
Tajikistan TJ
Tanzania, United Republic of TZ
Thailand TH
Timor-Leste TL
Togo TG
Tokelau TK
Tonga TO
Trinidad and Tobago TT
Tunisia TN
Turkey TR
Turkmenistan TM
Turks and Caicos Islands TC
Tuvalu TV
Uganda UG
Ukraine UA
United Arab Emirates AE
United Kingdom GB
United States US
United States Minor Outlying Islands UM
Uruguay UY
Uzbekistan UZ
Vanuatu VU
Venezuela VE
Viet Nam VN
Virgin Islands, British VG
Virgin Islands, U.S. VI
Wallis and Futuna WF
Western Sahara EH
Yemen YE
Zambia ZM
Zimbabwe ZW

30 October 2008 Page 100


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Appendix D: Currency Codes

Appendix D: Currency Codes


UPS currency code abbreviations generally follow the recommendations of the
International Standards Organization, which publishes a list of currency
abbreviations in ISO Standard 4217, for which the latest information is available
from the ISO web site. Exceptions are noted in bold in the table below.
Note that countries sometimes change their official currency. UPS may require
some time after the introduction of a new currency before it can fully support that
currency. In addition, UPS may continue to support the older currency for an
interim period in order to provide backwards compatibility. UPS may also require
the use of currencies other than the official currency for some countries. For the
latest information, please contact your UPS OnLine Tools representative.

Country / Region Currency Code


Afghanistan Afghani AFN
Albania Lek ALL
Algeria Algerian Dinar DZD
American Samoa US Dollar USD
Andorra Euro EUR
Angola Kwanza AOA
Anguilla East Caribbean Dollar XCD
Antigua And Barbuda East Caribbean Dollar XCD
Argentina Argentine Peso ARS
Armenia Armenian Dram AMD
Aruba Aruban Guilder AWG
Australia Australian Dollar AUD
Austria Euro EUR
Azerbaijan Azerbaijanian Manat AZN
Bahamas Bahamian Dollar BSD
Bahrain Bahraini Dinar BHD
Bangladesh Taka BDT
Barbados Barbados Dollar BBD
Belarus Belarussian Ruble BYR
Belgium Euro EUR
Belize Belize Dollar BZD
Benin CFA Franc BCEAO XOF
Bermudian Dollar (customarily
Bermuda BMD
known as Bermuda Dollar)
Bhutan Indian Rupee INR
Bhutan Ngultrum BTN
Boliviano BOB
Bolivia
Mvdol BOV
Bosnia & Herzegovina Convertible Marks BAM
Botswana Pula BWP

30 October 2008 Page 101


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Appendix D: Currency Codes

Country / Region Currency Code


Bouvet Island Norwegian Krone NOK
Brazil Brazilian Real BRL
British Indian Ocean Territory US Dollar USD
Brunei Darussalam Brunei Dollar BND
Bulgaria Bulgarian Lev BGN
Burkina Faso CFA Franc BCEAO XOF
Burundi Burundi Franc BIF
Cambodia Riel KHR
Cameroon CFA Franc BEAC XAF
Canada Canadian Dollar CAD
Cape Verde Cape Verde Escudo CVE
Cayman Islands Cayman Islands Dollar KYD
Central African Republic CFA Franc BEAC XAF
Chad CFA Franc BEAC XAF
Chilean Peso CLP
Chile
Unidades de formento CLF
China Yuan Renminbi RMB
Christmas Island Australian Dollar AUD
Cocos (Keeling) Islands Australian Dollar AUD
Colombian Peso COP
Colombia
Unidad de Valor Real COU
Comoros Comoro Franc KMF
Congo CFA Franc BEAC XAF
Congo, The Democratic Republic
Franc Congolais CDF
of
Cook Islands New Zealand Dollar NZD
Costa Rica Costa Rican Colon CRC
Côte D'ivoire CFA Franc BCEAO XOF
Croatia Croatian Kuna HRK
Cuba Cuban Peso CUP
Cyprus Euro EUR
Czech Republic Czech Koruna CZK
Denmark Danish Krone DKK
Djibouti Djibouti Franc DJF
Dominica East Caribbean Dollar XCD
Dominican Republic Dominican Peso DOP
Ecuador US Dollar USD
Egypt Egyptian Pound EGP
El Salvador Colon SVC
El Salvador
US Dollar USD
Equatorial Guinea CFA Franc BEAC XAF
Eritrea Nakfa ERN
Estonia Kroon EEK

30 October 2008 Page 102


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Appendix D: Currency Codes

Country / Region Currency Code


Ethiopia Ethiopian Birr ETB
Falkland Islands (Malvinas) Falkland Islands Pound FKP
Faroe Islands Danish Krone DKK
Fiji Fiji Dollar FJD
Finland Euro EUR
France Euro EUR
French Guiana Euro EUR
French Polynesia CFP Franc XPF
French Southern Territories Euro EUR
Gabon CFA Franc BEAC XAF
Gambia Dalasi GMD
Georgia Lari GEL
Germany Euro EUR
Ghana Cedi GHC
Gibraltar Gibraltar Pound GIP
Greece Euro EUR
Greenland Danish Krone DKK
Grenada East Caribbean Dollar XCD
Guadeloupe Euro EUR
Guam US Dollar USD
Guatemala Quetzal GTQ
Guinea Guinea Franc GNF
Guinea-Bissau Peso GWP
Guinea-Bissau
CFA Franc BCEAO XOF
Guyana Guyana Dollar GYD
Haiti Gourde HTG
Haiti US Dollar USD
Heard Island ond Mcdonald
Australian Dollar AUD
Islands
Holy See (Vatican City State) Euro EUR
Honduras Lempira HNL
Hong Kong Hong Kong Dollar HKD
Hungary Forint HUF
Iceland Iceland Krona ISK
India Indian Rupee INR
Indonesia Rupiah IDR
Iran (Islamic Republic of) Iranian Rial IRR
Iraq Iraqi Dinar IQD
Ireland Euro EUR
Israel New Israeli Sheqel ILS
Italy Euro EUR
Jamaica Jamaican Dollar JMD
Japan Yen JPY

30 October 2008 Page 103


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Appendix D: Currency Codes

Country / Region Currency Code


Jordan Jordanian Dinar JOD
Kazakhstan Tenge KZT
Kenya Kenyan Shilling KES
Kiribati Australian Dollar AUD
Korea, Democratic People's
North Korean Won KPW
Republic of
Korea, Republic of Won KRW
Kuwait Kuwaiti Dinar KWD
Kyrgyzstan Som KGS
Lao People's Democratic Republic Kip LAK
Latvia Latvian Lats LVL
Lebanon Lebanese Pound LBP
Rand ZAR
Lesotho
Loti LSL
Liberia Liberian Dollar LRD
Libyan Arab Jamahiriya Libyan Dinar LYD
Liechtenstein Swiss Franc CHF
Lithuania Lithuanian Litas LTL
Luxembourg Euro EUR
Macao Pataca MOP
Macedonia, The Former Yugoslav
Denar MKD
Republic of
Madagascar Malagascy Ariary MGA
Malawi Kwacha MWK
Malaysia Malaysian Ringgit MYR
Maldives Rufiyaa MVR
Mali CFA Franc BCEAO XOF
Malta Euro EUR
Marshall Islands US Dollar USD
Martinique Euro EUR
Mauritania Ouguiya MRO
Mauritius Mauritius Rupee MUR
Mayotte Euro EUR
Mexican Peso MXN
Mexico Mexican Unidad de Inversion
MXV
(UID)
Micronesia (Federated States of) US Dollar USD
Moldova, Republic of Moldovan Leu MDL
Monaco Euro EUR
Mongolia Tugrik MNT
Montenegro Euro EUR
Montserrat East Caribbean Dollar XCD
Morocco Moroccan Dirham MAD

30 October 2008 Page 104


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Appendix D: Currency Codes

Country / Region Currency Code


Mozambique Metical MZN
Myanmar Kyat MMK
Rand ZAR
Namibia
Namibian Dollar NAD
Nauru Australian Dollar AUD
Nepal Nepalese Rupee NPR
Netherlands Euro EUR
Netherlands Antilles Netherlands Antillian Guilder ANG
New Caledonia CFP Franc XPF
New Zealand New Zealand Dollar NZD
Nicaragua Cordoba Oro NIO
Niger CFA Franc BCEAO XOF
Nigeria Naira NGN
Niue New Zealand Dollar NZD
Norfolk Island Australian Dollar AUD
Northern Mariana Islands US Dollar USD
Norway Norwegian Krone NOK
Oman Rial Omani OMR
Pakistan Pakistan Rupee PKR
Palau US Dollar USD
Balboa PAB
Panama
US Dollar USD
Papua New Guinea Kina PGK
Paraguay Guarani PYG
Peru Nuevo Sol PEN
Philippines Philippine Peso PHP
Pitcairn New Zealand Dollar NZD
Poland Zloty PLN
Portugal Euro EUR
Puerto Rico US Dollar USD
Qatar Qatari Rial QAR
Réunion Euro EUR
Romania New Leu RON
Russian Federation Russian Ruble RUB
Rwanda Rwanda Franc RWF
Saint Helena Saint Helena Pound SHP
Saint Kitts and Nevis East Caribbean Dollar XCD
Saint Lucia East Caribbean Dollar XCD
Saint Pierre and Miquelon Euro EUR
Saint Vincent and The Grenadines East Caribbean Dollar XCD
Samoa Tala WST
San Marino Euro EUR
São Tome and Principe Dobra STD

30 October 2008 Page 105


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Appendix D: Currency Codes

Country / Region Currency Code


Saudi Arabia Saudi Riyal SAR
Senegal CFA Franc BCEAO XOF
Serbia Serbian Dinar RSD
Seychelles Seychelles Rupee SCR
Sierra Leone Leone SLL
Singapore Singapore Dollar SGD
Slovakia Slovak Koruna SKK
Slovenia Euro EUR
Solomon Islands Solomon Islands Dollar SBD
Somalia Somali Shilling SOS
South Africa Rand ZAR
Spain Euro EUR
Sri Lanka Sri Lanka Rupee LKR
Sudan Sudanese Dinar SDD
Suriname Surinam Dollar SRD
Svalbard and Jan Mayen Norwegian Krone NOK
Swaziland Lilangeni SZL
Sweden Swedish Krona SEK
Swiss Franc CHF
Switzerland WIR Franc CHW
WIR Euro CHE
Syrian Arab Republic Syrian Pound SYP
Taiwan, Province of China New Taiwan Dollar TWD
Tajikistan Somoni TJS
Tanzania, United Republic of Tanzanian Shilling TZS
Thailand Baht THB
Timor-Leste US Dollar USD
Togo CFA Franc BCEAO XOF
Tokelau New Zealand Dollar NZD
Tonga Pa'anga TOP
Trinidad And Tobago Trinidad and Tobago Dollar TTD
Tunisia Tunisian Dinar TND
Turkey New Turkish Lira TRY
Turkmenistan Manat TMM
Turks And Caicos Islands US Dollar USD
Tuvalu Australian Dollar AUD
Uganda Uganda Shilling UGX
Ukraine Hryvnia UAH
United Arab Emirates UAE Dirham AED
United Kingdom Pound Sterling GBP
United States US Dollar USD
United States Minor Outlying
US Dollar USD
Islands

30 October 2008 Page 106


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Appendix D: Currency Codes

Country / Region Currency Code


Peso Uruguayo UYU
Uruguay Uruguay Peso en Unidades
UYI
Indexadas
Uzbekistan Uzbekistan Sum UZS
Vanuatu Vatu VUV
Venezuela Bolivar VEB
Viet Nam Dong VND
Virgin Islands (British) US Dollar USD
Virgin Islands (US) US Dollar USD
Wallis And Futuna CFP Franc XPF
Western Sahara Moroccan Dirham MAD
Yemen Yemeni Rial YER
Zambia Kwacha ZMK
Zimbabwe Zimbabwe Dollar ZWD

30 October 2008 Page 107


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Appendix E: Tracking Test Numbers

Appendix E: Tracking Test Numbers


UPS has set aside several shipping and tracking numbers to help developers test
their applications. These special numbers are only valid with the Customer
Integration Environment at wwwcie.ups.com. The following table lists those
special numbers and describes the results that developers should expect when
attempting a TrackRequest.
When using the Customer Integration Environment with tracking numbers other
than those designated for testing, the numbers will be evaluated as production
tracking numbers.

Type Value Option Service Response


Activity
Tracking 1Z12345E0291980793 2nd Day Air Delivered
(All)
None World Wide
Tracking 1Z12345E6692804405 Delivered
(Last) Express
1Z12345E0390515214
None
Shipping (Second Package: Ground Delivered
(Last)
1Z12345E0393657226)
None Next Day
Tracking 1Z12345E1392654435 Transit
(Last) Air Saver
Activity Next Day 2nd Delivery
Tracking 1Z12345E6892410845
(All) Air Saver attempt
None Invalid Tracking
Tracking 1Z12345E029198079
(Last) Number
No Tracking
None
Tracking 1Z12345E1591910450 Information
(Last)
Available
Activity( UPS Freight
Tracking 990728071 Delivered
All) LTL
Activity( Delivered Origin
Tracking 3251026119
All) CFS

30 October 2008 Page 108


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Appendix F: State/Province Codes

Appendix F: State/Province Codes


UPS state/province (for the US and Canada) codes

State/Province Code
Alaska AK
Alabama AL
Arkansas AR
Arizona AZ
California CA
Colorado CO
Connecticut CT
District of Columbia DC
Delaware DE
Florida FL
Georgia GA
Hawaii HI
Iowa IA
Idaho ID
Illinois IL
Indiana IN
Kansas KS
Kentucky KY
Louisiana LA
Massachusetts MA
Maryland MD
Maine ME
Michigan MI
Minnesota MN
Missouri MO
Mississippi MS
Montana MT
North Carolina NC
North Dakota ND
Nebraska NE
New Hampshire NH
New Jersey NJ
New Mexico NM
Nevada NV
New York NY
Ohio OH
Oklahoma OK
Oregon OR
Pennsylvania PA
Rhode Island RI
South Carolina SC
South Dakota SD
Tennessee TN
Texas TX
Utah UT
Virginia VA
Vermont VT
Washington WA

30 October 2008 Page 109


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Appendix F: State/Province Codes

State/Province Code
Wisconsin WI
West Virginia WV
Wyoming WY

Alberta AB
British Columbia BC
Manitoba MB
New Brunswick NB
Newfoundland and Labrador NL
Nova Scotia NS
Northwest Territories NT
Nunavut NU
Ontario ON
Prince Edward Island PE
Quebec QC
Saskatchewan SK
Yukon Territory YT

Index
A
D
AccessRequest..................................................27
Database Application ....................................... 10
Adobe Acrobat
Dedicated Application ..................................... 10
Document.....................................................11
Application E
Database.......................................................10
Element............................................................ 18
Dedicated .....................................................10
Error Codes.................................................89–90
Document.....................................................11
Extensible Markup Language .......................... 18
Type .............................................................10
Example ...................................................... 18
Web..............................................................11
Standard ...................................................... 20
B H
Base64 ..............................................................19
HTTP ................ See Hypertext Transfer Protocol
Branding ...........................................................11
Hypertext Transfer Protocol .......................15–18
C J
Candidate Bookmark ........................................25
Java.................................................12, 17, 21–22
Certification................................................…. 14
Java API for XML Processing ....................12, 21
CIE ........ See Customer Integration Environment
Java Enterprise Edition .................................... 12
Country Codes..........................................96, 109
Java Standard Edition ...................................... 12
Currency Codes ..............................................101
java.net............................................................. 12
Customer Integration Environment ..........14, 108
JAXP ............. See Java API for XML Processing

30 October 2008 Page 110


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
UPS OnLine Tools Tracking Index

L T
libcurl .........................................................12, 17 Tag ................................................................... 18
Technical Support ............................................ 13
M Track................................................................ 24
Microsoft Tracking Number............................................. 24
Office Document .........................................11 Test Values ................................................ 108
Visual Basic .....................................17, 20–21 TrackRequest ..............................................28–34
Visual Studio....................................12, 17, 20 TrackResponse............................................34–88
XML Core Services .........................12, 17, 20
MSXML ........................ See XML Core Services U
Uniform Resource Locator .............................. 16
O URL .................... See Uniform Resource Locator
Open Source .........................................12, 17, 22 URL Class........................................................ 12
Operations User Profile...................................................... 14
Track............................................................24
V
P Visual Basic ..........................................17, 20–21
POST ................................................................15 Visual Studio.........................................12, 17, 20
R W
Reference Number............................................24 Web Application ...............................................11
Reference Number Codes...........................93, 95 Web Services
Track ........................................................... 24
S World Wide Web Consortium .......................... 20
Secure Sockets Layer .................................15–18
Shipment Identification Number ................24, 25 X
Shipping Number xerces..........................................................13, 22
Test Values .................................................108 XML Core Services ..............................12, 17, 20
Small Package ............................................27–88
SSL ..............................See Secure Sockets Layer

30 October 2008 Page 111


© 2008 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary

Vous aimerez peut-être aussi