Tracking RESTful Developer Guide
Tracking RESTful Developer Guide
Permitted Territories
This document can only be used in the countries of the Permitted Territory as defined in the UPS Technology
Agreement, as applicable.
Use
The application must not be designed to allow distribution of information received through the UPS Developer
Kit APIs to third parties, other than to persons having a bona fide interest in such information (e.g., the shipper,
receiver, or the third party payer, or to your service providers authorized by UPS).
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 Developer Kit APIs. Your application must present all data within each field received
through the UPS Developer Kit APIs without amendment, deletion, or modification of any type.
© 2021 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary ii
Notice
In all communications with UPS concerning this document, please refer to the document date located on the
cover.
Copyright
© 2021 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary
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.
Trademarks
Some of the UPS corporate applications use United States 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.
Disclaimer
UPS Freight Less-than-Truckload (“LTL”) transportation services are offered by TFI International Inc., its
affiliates or divisions (including without limitation TForce Freight), which are not affiliated with United Parcel
Service, Inc. or any of its affiliates, subsidiaries or related entities (“UPS”). UPS assumes no liability in
connection with UPS Freight LTL transportation services or any other services offered or provided by TFI
International Inc. or its affiliates, divisions, subsidiaries or related entities.
© 2021 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary iii
Table of Contents
Chapter 1: Introduction ......................................................................................................... 5
Appendices ......................................................................................................................... 16
Error Codes ........................................................................................................................................... 16
HTTP Status Codes ........................................................................................................................... 16
Common Error Codes ........................................................................................................................ 16
Tracking Error Codes ......................................................................................................................... 17
State / Province Codes.......................................................................................................................... 18
Locale Codes ......................................................................................................................................... 21
© 2021 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary iv
UPS Tracking RESTful Developer Guide August 08, 2022
Chapter 1: Introduction
In this document, you will find guidance and instructions for integrating Tracking RESTful into your application,
service, or system.
Intended Audience
This guide is intended for developers who will be integrating the Tracking RESTful API into their application, service,
or system.
© 2021 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary 5
UPS Tracking RESTful Developer Guide August 08, 2022
If daily/weekly tracking requests exceed daily shipping volume by a large margin, UPS reserves the right to
suspend tracking for that account until the situation is rectified. If a resolution cannot be found and implemented,
tracking for that account may be terminated.
Business Rules
General
• UPS expects elements as defined in the request structure without spelling or structural deviations. Elements that
are not defined in the data request or do not conform to the structure will be ignored by UPS.
• Only users that plan to ship packages manifested, tendered, and delivered by UPS can use the API.
• Any customers/developers abusing or data mining the API will have their access revoked.
• To access API documentation the user must have or create a UPS profile.
• To access testing and production sites the user must have an Access Key. To get an Access Key you must have a
UPS profile and an associated shipping account. For additional information, refer to the UPS Developer Kit User
Guide.
© 2021 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary 6
UPS Tracking RESTful Developer Guide August 08, 2022
No stress testing should ever be performed by customers against any UPS systems.
To access testing and production sites the user must have an Access Key. You can request an Access Key after
establishing a UPS profile and associating your shipping account.
System Availability
The Customer Integration Environment is available 24 hours a day, 7 days a week. Note, the system is occasionally
down for server maintenance.
Integration Testing
Production
© 2021 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary 7
UPS Tracking RESTful Developer Guide August 08, 2022
UPS expects elements as defined in the request and presented in the structure i.e., no spelling or structural
deviations. Elements that are not defined or do not conform to the structure will be ignored by UPS.
Name
The element or container name.
Constraints
Required
• Yes – indicates the element must be present in the request or response.
• Yes* - indicates the element must be present in the request if the parent container is present in the request.
• No – indicates the element is optional and may be used if it applies to the request.
Type
• Container – holds a group of related elements.
• Array – collection of values that allows to provide a list of values. An array begins with [ (left bracket) and ends
with ] (right bracket). Its values are separated by , (comma).
Length
• The maximum number of characters that can be present in a String. Length is not applicable (N/A) to Containers.
Max Allowed
• The maximum number of elements or containers that can be present in the parent container.
Description
A description of the element or container. Also any validation rules associated with the element/container.
© 2021 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary 8
UPS Tracking RESTful Developer Guide August 08, 2022
UPS expects elements as defined in the tables and presented in the structure i.e., no spelling or structural
deviations. Elements that are not defined or do not conform to the structure will be ignored by UPS.
Headers
Name Constraint Description
Required: Yes
transId Type: Header An identifier unique to the request
Length: 32
Required: Yes
Customer provided data. Echoed back in the
transactionSrc Type: Header
response if provided.
Length: 512
Required: Cond Authorization: Access Key obtained through on-
AccessLicenseNumber Type: Header boarding process. Contact your UPS
Length: 16 representative for additional information.
Required: Cond
Username Type: Header The customers MyUPS user ID/username.
Length: 16
Required: Cond The customers MyUPS password. Required if
Password Type: Header the AuthenticationToken is not present.
Length: 26
Used to authenticate the API. Can be used in
place of Username and Password
AuthenticationToken Required: Cond
Type: Header example: AuthenticationToken:<value>
URL
https://onlinetools.ups.com/track/v1/details/{inquiryNumber}
URL Parameters
Name Constraint Description
Query Parameters
Name Constraint Description
© 2021 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary 9
UPS Tracking RESTful Developer Guide August 08, 2022
TrackResponse
Name Constraint Description Validation
{“trackResponse”: {} }
TrackResponse Required: Yes The root element/container for the TrackResponse
Type:
Container
Max Allowed: 1
Length: N/A
© 2021 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary 10
UPS Tracking RESTful Developer Guide August 08, 2022
© 2021 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary 11
UPS Tracking RESTful Developer Guide August 08, 2022
© 2021 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary 12
UPS Tracking RESTful Developer Guide August 08, 2022
© 2021 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary 13
UPS Tracking RESTful Developer Guide August 08, 2022
Scenario:
Client application is searching for a restricted trading partner by name.
Method GET
© 2021 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary 14
UPS Tracking RESTful Developer Guide August 08, 2022
“city”: “”,
“stateProvince”: “”,
“postalCode”: “”,
“country”: “US”
}
},
“status”: {
“type”: “M”,
“description”: “Order Processed: Ready for UPS “,
“code”: “MP”
},
“date”: “20200115”,
“time”: “075518”
}
]
}
]
}
]
}
}
Example {
Error
Response “response”: {
“errors”: [
{
“code”: “TV1002”,
“message”: “Invalid inquiry number”
}
]
}
}
© 2021 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary 15
UPS Tracking RESTful Developer Guide August 08, 2022
Appendices
Error Codes
When the UPS system is unable to respond to a request, be it from a malformed request, an illegal or invalid value, or
other issues, the API generates an error response.
400 Bad Request The request was invalid or cannot be served. The exact error should be
explained in the error payload. E.g. The JSON is not valid“
401 Unauthorized The request requires authentication
404 Not found URL does not exist or resource not found
500 An internal server error An internal server error occurred; API developers should avoid this error. If
occurred an error occurs in the global catch blog, the stracktrace should be logged
and not returned as response.
503 Internal Server Error The service/resource is not available. There are external component
DOWN issues that the client will not be able to resolve
10002 400 The request is well formed but the request is not valid.
10006 400 Although the document is well formed and valid, the element content contains values
which do not conform to the rules and constraints contained in this specification.
20002 400 The specified service name, {0}, and version number, {1}, combination is invalid.
20003 400 Please check the server environment for the proper J2EE ws apis.
20012 400 The Client Information exceeds its Maximum Limit of {0}.
250001 401 Invalid Access License for the tool. Please re-license.
© 2021 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary 16
UPS Tracking RESTful Developer Guide August 08, 2022
250006 401 The maximum number of user access attempts was exceeded.
250007 401 The UserId is currently locked out; please try again in 30 minutes.
© 2021 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary 17
UPS Tracking RESTful Developer Guide August 08, 2022
United States
State 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
© 2021 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary 18
UPS Tracking RESTful Developer Guide August 08, 2022
State Code
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
Wisconsin WI
West Virginia WV
Wyoming WY
Canada
Province Code
Alberta AB
British Columbia BC
Manitoba MB
New Brunswick NB
Nova Scotia NS
Northwest Territories NT
Nunavut NU
Ontario ON
© 2021 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary 19
UPS Tracking RESTful Developer Guide August 08, 2022
Province Code
Quebec QC
Saskatchewan SK
Yukon Territory YT
© 2021 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary 20
UPS Tracking RESTful Developer Guide August 08, 2022
Locale codes
The following table lists all supported locale codes (country/territory and language combination). Refer to the
Country/Territory Codes Appendix section for Country/Territory details.
Locale is accepted in below format Example: - Locale - en_US means ‘LanguageCode_CountryCode’
Locale Code
bg_BG
cs_CZ
da_DK
de_AT
de_CH
de_DE
el_CY
el_GR
en_AE
en_AG
en_AI
en_AL
en_AR
en_AT
en_AU
en_AW
en_AZ
en_BA
en_BB
en_BD
en_BE
en_BG
en_BH
en_BL
en_BM
en_BO
en_BQ
en_BR
en_BS
© 2021 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary 21
UPS Tracking RESTful Developer Guide August 08, 2022
en_CA
en_CB
en_CH
en_CI
en_CL
en_CN
en_CO
en_CR
en_CW
en_CY
en_CZ
en_DE
en_DK
en_DM
en_DO
en_DZ
en_EC
en_EE
en_EG
en_ES
en_EU
en_FI
en_FR
en_GB
en_GD
en_GH
en_GI
en_GP
en_GR
en_GT
en_GY
en_HK
en_HN
en_HR
© 2021 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary 22
UPS Tracking RESTful Developer Guide August 08, 2022
en_HT
en_HU
en_ID
en_IE
en_IL
en_IN
en_IT
en_JM
en_JO
en_JP
en_KE
en_KN
en_KR
en_KW
en_KY
en_KZ
en_LB
en_LC
en_LT
en_LU
en_LV
en_MA
en_MD
en_MO
en_MS
en_MT
en_MU
en_MX
en_MY
en_NG
en_NI
en_NL
en_NO
en_NZ
© 2021 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary 23
UPS Tracking RESTful Developer Guide August 08, 2022
en_OM
en_PA
en_PE
en_PH
en_PK
en_PL
en_PR
en_PT
en_PY
en_QA
en_RE
en_RO
en_RS
en_RU
en_SA
en_SE
en_SG
en_SI
en_SK
en_SR
en_ST
en_SV
en_SX
en_TH
en_TN
en_TR
en_TT
en_TW
en_UA
en_US
en_UY
en_VC
en_VE
en_VG
© 2021 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary 24
UPS Tracking RESTful Developer Guide August 08, 2022
en_VI
en_VN
en_ZA
en_ZW
es_AR
es_BO
es_CL
es_CO
es_CR
es_DO
es_EC
es_ES
es_GT
es_HN
es_MX
es_NI
es_PA
es_PE
es_PR
es_PY
es_SV
es_US
es_UY
es_VE
et_EE
fi_FI
fr_BE
fr_CA
fr_CH
fr_DZ
fr_FR
fr_LU
fr_MA
fr_TN
© 2021 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary 25
UPS Tracking RESTful Developer Guide August 08, 2022
he_IL
hu_HU
it_IT
ja_JP
ko_KR
lt_LT
lv_LV
nl_BE
nl_NL
no_NO
pl_PL
pt_BR
pt_PT
ro_RO
ru_RU
sk_SK
sv_SE
tr_TR
vi_VN
zh_CN
zh_HK
zh_MO
zh_TW
© 2021 United Parcel Service of America, Inc. All Rights Reserved. Confidential and Proprietary 26