Integrating Shipment Tracking: Shipping APIs and EDIs from Major Carriers and Aggregators
What happens from the time an online order is made and then delivered to the customer? It’s shipment – something all parties involved want to track. They want to be well-informed about its movements, how soon it will reach its destination, and whether any delays are expected.
Whether you’re involved in regional, national, or international shipping, you have to learn the ropes of shipment tracking. And in this article, we’ll teach you how to untangle its mysteries.
We’ll describe the main ways to integrate shipment tracking into your system:
- direct integration with each carrier
- integration with shipment data aggregators and tech providers
- integration with shipment providers that connect with multiple carriers
A provider in the last description can also be a freight forwarder that matches your shipment with the most efficient or cost effective carrier, or a third party logistics provider (3PL) if you need a full package of logistics services.
The main method to integrate shipment tracking functionality is via an API. Working in the background, a shipping API will pull in data from external servers and display shipping information to you or your customers.
How shipment tracking works
Once a customer places an order, that’s when the shipment tracking process begins.
First, settle on a carrier. Applying such criteria as sender and addresses, parcel or cargo volume, and transit time should remove inapplicable variants leaving you with the right carriers to choose from. That’s, for example, how the Shippo API retrieves available shipping rates.
Available rates retrieval via the Shippo API. You can specify a list of carriers to retrieve rates only from them
After you’ve made the decision, you’ll be able to generate a shipping label from a chosen carrier. A shipping label is a unique ID with all the details related to the ordered item: pickup and destination, buyer and receiver contacts, etc.
At each stop en route, the label is scanned to determine the package’s whereabouts. Stored in the carrier’s tracking system, this data can be retrieved from there via API or another method for data exchange.
Summing up shipment tracking operations, we get the following step-by-step list:
- order placement
- available rates retrieval
- choice of carrier
- label generation
- locating the parcel by scanning the label
- storing data in the carrier’s tracking system
- retrieving data via API to enable shipment tracking from a third-party’s side.
Let’s have a look at the major sources of shipment tracking information.
There’s a large variety of options to choose from
Shipment platforms and tech providers
There’s a variety of tech providers that connect with different carriers and tracking systems. They can serve as a single source of tracking information from multiple carriers. Connecting to them via API, you can monitor carrier delivery performance and display the corresponding tracking details on your side, whether it’s a tracking module in eCommerce or any other system.
As a rule, the solutions are multi-functional, but our focus is primarily on their tracking features.
Shippo: ground shipping of containers and parcels
Shippo, a shipping software provider, has a number of out-of-the-box integrations with parcel carriers . It helps integrate shipping with multiple carriers through their APIs and web application. Their solution compares carrier rates, generates labels, validates address, provides branded tracking pages, and notification emails for customers.
The Shippo carrier network includes carriers that provide regional, national, and international delivery. Among the carriers there are those who support overnight deliveries – DHL Express, FedEx, UPS, AxleHire, and CDL, to name a few.
Shippo APIs perform the following operations:
- validate address specifying the precision of the returned address
- prepare international shipping documents
- provide tracking status
- refund unused labels
- set up reverse-logistics and returns
API connection. The Shippo Tracking REST API enables you to track shipments across all the available carriers. The API tracks from labels purchased on Shippo. It can also check the tracking status for shipments created outside of the platform, if provided with the carrier and a tracking number (given that the carrier is supported). Shippo offers full tracking history and fetches live tracking data. You can also set up push notifications from the carrier.
Conditions. Shippo offers three pricing plans with an API accessible for each of them. Pay As You Go plan starts at five cents per every order. Professional plan starts at $10 per month and provides you with five user accounts. Premier plan serves 15 accounts of yours and assists you in tech implementations.
AfterShip: support of over half thousand carriers
AfterShip is a Hong Kong startup that tracks shipments and handles returns. AfterShip can be integrated directly with your control panel. It pulls shipment deets into the system and alerts at every step of the transit journey ridding you of redundant customer service inquiries.
Integrating AfterShip RESTful API, you’ll get tracking updates from any carrier supported by AfterShip which now numbers 586 couriers.
API connection. Before you get going with the AfterShip REST API, you have to create an account with AfterShip. Then, when you’re logged in, you’ll be able to generate your API key. Once it’s done, you’re all set to request data from AfterShip in JSON string. It’s worth mentioning that AfterShip users note poor documentation on integrating the tracking page and on the API in general.
Prior to tracking, the API matches you with a fitting carrier based on validation of tracking number format and selected couriers. API performs the following tracking manipulations requiring a tracking number to identify a shipment:
- get tracking results
- return to the the last checkpoint
- retrack an expired tracking
The API functionality also updates customers on any changes in the tracking status. It can retrieve user contacts, and add or remove them from the tracking number.
Unified delivery statuses in AfterShip across all the carriers they support
Conditions. But keep the limit in mind: 10 requests per second from one account. To be on the safe side, AfterShip advises authenticating users to keep limits outside the reach for each of them. Alternatively, you can choose the Enterprise plan with custom API rate limits. As for the other pricing plans, AfterShip has quite an assortment of them. Your choice will depend on the number of trackings you perform monthly. You get access to the API even with a free Starter plan that allows for 100 trackings.
AfterShip also has a tracking widget called Track Button that you can simply add to your site with a few lines of code. With Track Button on your website, your visitors just have to enter their tracking number to track their shipment.
Easyship: free API to track shipment with 250+ couriers in five areas
Launched in Hong Kong and later expanded to Singapore, today Easyship is an eCommerce-focused shipping platform that also tracks couriers in the US, Canada, and Australia. With their APIs, you can integrate Easyship’s real-time shipping rates into your website for free. Easyship has the Rates API, the Shipment and Label APIs, the Pickup API, and the Track API which is our primary concern.
API connection. The Track API fetches tracking information based on your Platform Order Number or Easyship Shipment ID. The responses give the most recent status update for the shipment as well as a history of all checkpoints.
The list of possible status messages are:
- Pending Tracking Event
- Tracking Information Received
- In Transit to Customer
- Out For Delivery
- Pending Refund
- Cancelled and Refunded.
Conditions.To avoid being blocked, stay within the endpoints limit which is 60 requests per minute and 10 requests per second. If you’d like to access Easyship APIs, become their partner first.
EasyPost: SOAP XML tracking APIs for 100+ carriers
EasyPost is a dedicated supplier of shipping APIs that works with more than 100 carriers worldwide.
API connection. Take the first step by registering an account with EasyPost. You can test the EasyPost tracking solution prior to making any decision. SOAP / XML Carrier Tracking APIs with tracking, rating, address verification, and insurance features.
For tracking, EasyPost generates a Tracker object with all the tracking information related to a package. That’s the case if you purchase shipping labels through EasyPost. Otherwise, you’ll have to create Tracker yourself to enable tracking through the EasyPost API. For that you’ll need to provide a tracking code and the carrier associated with it. The latter is optional and can be auto-detected.
As the package moves along, a Tracker is updated on its whereabouts accordingly. So, the Tracker contains the following info:
- city, state, country, and zip information about the location where the package was scanned
- current status of the package (“unknown,” “pre transit,” “in transit,” “out for delivery,” “delivered,” “available for pickup,” “return to sender,” “failure,” “cancelled,” or “error”), as well as previous updates
- additional deets (service, container type, local delivery day and time) provided by the carrier
Conditions. Tracking packages not shipped through EasyPost will cost you one penny per package. If you ship 10K packages a month, EasyPost has special discounts for you.
Searates: shipping rate search engine with API for container tracking
Searates is a global aggregator of container shipment services that provides container tracking, along with freight and load calculators. The search covers all types of container shipments: less than container load, full container load, and bulk load.
Besides tracking, Searates allows you to generate tracking codes, if you provide your customers with shipment tracking details, and it supports document exchange.
API connection. Searates uses JSON-based API for container tracking. You can request your container by sealine ID and container number. In return, you get:
- Container status
- Type of transportation (rail, air, sea, truck)
- Distance from the previous point to this one
- Geographical location
- Vessel name
- Tracking ID, etc.
Conditions. Contact Searates directly for API use and payment terms. You can also integrate the service via iFrame for $65 per month. The integration will include all information: from container tracking to reports and statistics.
Shipment marketplaces and freight forwarders
There are also marketplaces and freight forwarders that specialize in shipment tracking. However, you should expect to use their core services to access tracking APIs. If this works for you, check these two options.
uShip: shipment marketplace that covers a broad variety of shipments from vehicles to standard freight
uShip is a service provider that connects carriers of any size with shippers. Unlike the businesses we described above, consider uShip a one-stop solution since it only allows you to track shipments that happen over uShip’s portal. This means that your other shipment operations must happen over uShip.
API connection. uShip uses RESTful API for all its operations. In terms of shipment tracking uShip has three shipment statuses:
- Picked up
Additionally, you can retrieve data on punctuality (e.g. on time, delayed), time of tracking record, and geographical coordinates.
Conditions. The API is free to use, but first you must register as a developer and directly specify API use conditions with uShip.
Flexport: interact with freight data using the Flexport APIs
Since 2013, Flexport has been providing air, ocean, and ground freight forwarding services through their cloud-based platform. They deal with both full-container and less-than-container load shipments, have direct contracts across the major ocean alliances and carriers, provide Private Air Service, and ensure instant access to the information for the carriers to deliver the cargo.
API connection. Using Flexport Shipment REST API, you can get the following data:
- a list of shipments with filtering options (e.g. associated with the given purchase order number)
- the details of a single shipment:transportation mode, container/freight type, weight and volume, pickup date, estimated/actual arrival date, shipment status, money spent on delivery including customs and duty, origin/destination address, etc.
- a list of shipment route legs (transportation connection points)
- a list of containers and their legs
Conditions. To access the API, you can generate a key in your Flexport account. Then, include it with every API request in a header. For security purposes, Flexport APIs accept calls only over HTTPS.
Global cargo carriers and their shipment tracking solutions
You also have cargo carriers. Describing all of them is way beyond the scope of this article, but we’ll mention a few that have decent technology support for tracking your shipments. Keep in mind, that using these APIs and other connectivity solutions also entails that you get data only from these carriers and must source the rest from somewhere else.
Maersk: shipping solutions from the largest container ship and supply vessel operator
Don’t think of Maersk as only an ocean freight carrier. Besides large vessels and barges, they also provide point-to-point deliveries by truck, and transport high-capacity cargo by rail. There are ocean prices and rates for inland transportation. In case of oversized cargo, contact Maersk directly to discuss their terms.
Web solution. Once logged into the platform, you can manage your shipping online: find a price, book shipments, submit documents, and track cargo.
The Maersk Shipment app. This mobile solution has features like instant booking, shipment management, quote requests, scheduling, tracking and sharing transportation plans and container lists
Maersk’s Electronic Data Interchange (EDI) suite. EDI links Maersk systems to yours, enabling you to manage your shipments from your own system. It empowers faster and easier data exchange like transport and customs documents.
Not sure what EDI is? Check our article.
End-to-end supply chain operations with integrated Maersk’s EDI
To use any of the above solutions, you have to be registered with a Maersk brand (Maersk Line, Safmarine, MCC, Seago Line, or Sealand).
Bring: shipments to and from the Nordics
With Bring you can deliver parcels, mail, and cargo mainly by road and rail (sea and air transport is available on demand) within the following countries: Norway, Sweden, Denmark, Finland, Holland, Belgium, and the UK. Bring provides local courier services, express and next-day deliveries from the Nordic countries to the rest of the world, and vice versa. Shipping prices depend on many variables: destination and origin countries, urgency, shipment weight, and transport type.
Price list for mail deliveries from/within Norway
The Tracking API facilitates integration of shipment details from their tracking site into your system. Use it to enable tracking based on a tracking number, shipment number, or reference. Besides tracking, Bring APIs can choose shipping methods on checkout, generate reports, and book a shipment.
CMA CGM: global carrier with EDI and API integrations
CMA CGM is a French container shipping company with about 445 vessels.
EDI connection. Similar to other large players in the market, the company provides EDI to track containers and get other shipping information, including scheduling, booking confirmation, bill of landing, etc.
API connection. Besides EDI, the company offers an API solution. Unfortunately, the documentation isn’t available online, so you must contact CMA CGM directly.
Top four parcel couriers and their tracking APIs
And, finally, you have parcel carriers. We covered integration with the most influential parcel carriers in another article. So here we’ll give a brief overview of their shipment tracking solutions only.
DHL Global Forwarding: access to tracking services via Shipment Tracking and Shipment Status APIs
This global carrier has established its presence in about 220 countries. However, DHL doesn’t handle domestic shipments within the US, since it’s no longer a US company. So they delegate these services to other providers.
Shipment tracking API. Using this API, you can request the latest shipment details, as well as all travel history with timestamps. Queries can be made using DHL shipment number, customer’s reference, container number, or master bill number.
Shipment Status API. If you don’t need all the shipment’s events but only the latest status update – use the Shipment Status API. Besides the most recent whereabouts, its response will also include the package’s origin, destination, count, and weight.
To use DHL APIs, you must have an eligible tracking code for the shipment and an API subscription key.
FedEx solutions to integrate shipment tracking
FedEx is one of the largest international courier services with operating units spanning air, sea, and road lines. FedEx offers two major solutions to integrate shipment tracking along with other capabilities:
FedEx Web Services. It’s a white-label solution, so no hosting on your side. It offers FedEx shipping functionality including shipment status tracking that you can integrate directly into your business software system.
FedEx Compatible Tier Program. You can pick a business software solution you need – from point-of-sale systems to warehouse management solutions – with FedEx already integrated to enable shipping functionality.
UPS Tracking Tools: empower your customers to track their shipments
United Parcel Service or UPS operates in 220 countries worldwide. Their primary business is the time-definite delivery of packages and documents. Their position is strong in the US and rates – negotiable. UPS divide their operations into US domestic and international package operations, along with supply chain and freight operations that they have recently included into the service portfolio.
UPS Developer Kit includes:
The Tracking API – provides accurate status on shipments to your customers.
The Signature Tracking API – obtains valuable Proof of Delivery information including a digital signature and delivery address.
After you sign up with UPS and log into the system, you’ll be able to select an API and obtain its documentation. You’ll also need to request a key to access it.
USPS Web Tools: Tracking/Delivery Confirmation Label APIs
The United States Postal Service has one of the largest civilian fleets and serves as the postal service for the United States. It delivers mail and smaller packages both domestically and internationally. When it comes to packages of less than 13 lbs. (5.8 kg), USPS offers better rates than the other major carriers. At the same time, it lacks the same variety of short-term expedited options.
Package Tracking APIs. They provide delivery status and tracking data. On top of that, you can connect your customers (if you use the data in B2C scenarios) to aUSPS rep to answer questions about their shipment status. The exchange limits is 35 packages per transaction.
You can use USPS APIs for free after registering for a Web Tools user account. Once you’ve done so, you’ll receive a Web Tools User ID to enable API access.
Which shipment tracking provider to choose
Before you move on to check a provider’s documentation and contact their agents, we suggest a couple of key takeaways.
Choose a shipment management solution that supports tracking out of the box. If you choose off-the-shelf software to manage your shipments, it’s worth checking their tracking options as this service usually comes with other features. And providers like Shippo support API integration if you need to connect tracking info with some other system that you use (e.g. customer portal on the eCommerce platform).
Start with aggregators and dedicated solutions. If you need shipment tracking across the widest variety of providers, the best option is to check the key shipment aggregators like AfterShip, Searates, and others. While they work mostly with parcel services, there is also container (freight) shipment tracking.
Connect to carriers if you work with a handful of them. If you’re a small business that cooperates with one or two parcel carriers, you don’t need to integrate third parties for tracking data. Most likely, your carrier already supports tracking. This may be slightly trickier with freight shipments. Many carriers still use EDI exchange and paper-based documentation. It’s always worth contacting a carrier directly to know all the options available.