Mastering the UPS Shipping API: Getting Started

Written by Mark Sanborn: Sep 19, 2008

This article is here to help you get a jump start on using the UPS Shipping API. This article is part 1 of the series that will help you get all the required tools to get you up and running. Later the series will expand upon each service the API has to offer as well as go into detail on how to create your custom programs using various languages and show you examples with both PHP and Perl programming languages.

Update: For a no fuss, 100% complete UPS Online Tools script with label printing support, integration support and automatic certification generation (required by UPS), I have created, RocketShipIt.

What is the UPS API?

The UPS API is a tool to allow you to communicate with the UPS servers using pretty much any programming language you want. This allows us to send our information, like addresses and weight and receive shipping rates and other information form UPS. UPS provides access to this API for free so developers can interact with their services to provide UPS information through their own custom apps. Whether it be through your web based ecommerce system to accurately determine shipping costs or display tracking information through your website.

Why is this cool?

I have used all kinds of shipping programs and pre-built ecommerce systems for businesses what always have their limitations. The shipping programs that I have used have never displayed the accurate rate. Although most will come close they are never truly accurate because they use shipping zones and routing tables to determine weight. They also usually need to be updated with the current fuel surcharge since the surcharge varies monthly which is a huge pain in the neck. If these limitations weren’t enough they pre-built systems usually lack flexibility and customization. By using the UPS Shipping API you call the shots.

Communicating with the UPS API

XML is the standard means of communication between web APIs and this is exactly what UPS uses. The great news is that XML is simple technology. Just about any programming language can easily communicate with XML and most of these languages have modules that make is really easy. PHP and Perl for example both have a module called SimpleXML. So I will show you example code in these languages to get you started.

Tools available in the UPS API

Here are the services that are offered by UPS and the topics that I will be covering in subsequent articles in this series.

  • UPS Tracking Tool - Track packages or allow customers login to your website to check on the status of their recent purchase with in house tracking.

  • UPS Signature Tracking - Get signature information for your in house systems

  • UPS Rates & Service Selection Tool - Probably the most popular tool. Allows you to look up the actual rate for a package

  • UPS Address Validation Tool - Check user entered addresses for typos or mistakes

  • UPS File Download for Quantum View - Download images of signatures and other documents

  • UPS Shipping Tool - An all encompassing tool for enterprises. This allows you to actually ship things and printed labels

  • UPS Time in Transit Tool - Find out what services you can ship with to a certain area

  • UPS TradeAbility - Generate cost estimates for duties, taxes, and transportation

How to get access

Getting access to the UPS developer tools is pretty easy. The first thing you will want to do is:

Register for UPS Online Tools

Once you are registered you will get a UPS Access Key. You will use this access key in your XML requests to UPS.

Once you are registered and you have your XML access key you will be ready to start making your first UPS API request.

Need to print shipping labels on your site?

Checkout my product RocketShipIt for simple easy-to-use developer tools for UPS™ FedEx™ USPS™ and more.

Share: