generate tracking number

Published 15 November 2021 | Updated 28 October 2022 | Natalia Kovalchuk

Nowadays, online retailers are actively leveraging the benefits offered by various eCommerce software. Multiple services help e-retailers to automate their daily tasks related to running their stores. Especially, they often use shipping management solutions that minimize the efforts needed to correctly fulfill the orders and send the packages to the e-store customers.

Shipping management software facilitates the shipping process, allowing companies to track orders, generate shipping labels, optimize shipping routes, and manage shipping costs. In addition to these essential functions, shipping management software can also help to automate many tasks related to shipping, reducing errors and minimizing administrative burdens. Overall, shipping management software is invaluable for businesses looking to streamline their shipping processes and maximize efficiency and effectiveness.

For instance, solutions like Orderhive and ShipERP are shipping software allowing e-retailers to receive and track orders and shipments, generate tracking numbers, create shipping labels, etc.

As a shipping software provider, your solution’s ability to generate tracking numbers for all the shipped orders is paramount. It helps both the e-retailers and customers to stay updated on the order status in real-time. While the customers’ trust remains intact with these updates, your clients (the e-retailers) find it easy to manage their orders with tracking numbers.

In this article, we will explore how any shipping software can get data from e-retailers' online stores and use it to generate tracking numbers for orders.

What is a Tracking Number?

To be able to generate tracking numbers for orders, a shipping software developer must understand what a tracking number is and the role it plays in an eCommerce business.

When an order is packed and shipped from the supplier’s warehouse, the shipping software generates a tracking number for that order. It is assigned to every shipped order and helps get real-time updates on the location of the order.

A tracking number is a unique ID number or a code printed on the package as a barcode which you can scan with a barcode reader and smartphones. To generate a tracking number for an order, the software needs to follow a specific format.

The tracking number is a combination of letters and numbers within a range of 8 to 40 characters. It also has special characters like spaces or hyphens that divide these groups of characters into multiple sections. For example, if the software has to generate a tracking number for carriers like FedEx or DHL Express, it has to be of 12 digits (can extend up to 14) with an overall length of 34 digits.

fedex tracking number example

Image source

In addition, tracking numbers for UPS start from “1Z” and contain a total of 18 characters. The last digit is a check digit.

How to Generate Tracking Number Using API2Cart API Methods

For a shipping software to generate tracking numbers, it needs data related to orders from online stores. To retrieve the data, shipping software has to integrate with all the eCommerce platforms on which the online stores are based.

That said, API2Cart is your go-to solution for establishing multiple integrations with eCommerce platforms at once. It is a unified API that lets your shipping software connect with more than 40 shopping platforms and marketplaces at once. The important aspect of API2Cart to note is the availability of different API methods provided to generate tracking numbers that can be used by shipment software. Hence, you can easily fetch the data related to orders so the software can check which orders are shipped and generate tracking numbers for those orders.

API2Cart provides two API methods that allow to generate tracking number and feed it into the order information of the clients’ online store. These methods are:

  • order.shipment.add
  • With this method, the shipping software can add the shipments associated with an order. In API2Cart API documentation, you can find all the parameters for request and response codes. Following is a response example for the above method:

  • order.shipment.tracking.add
  • With this method, the shipping software can add tracking numbers and tracking URLs to the shipments. The parameters for request and response codes are provided in the API2Cart documentation for your ready reference.

    Following is a response structure for the above method:

      "return_code": int,
      "return_message": string,
        "shipment_tracking_id": string

What Other Operations Your Shipping Software Can Do Using API2Cart

Apart from generating tracking numbers with the help of the API methods mentioned above, your shipping software can perform a myriad of operations with API2Cart.

Take a look at the benefits offered by API2Cart for the shipping software vendors:

  • Your software can import orders from multiple sales channels on which your clients have built their online stores.
  • The shipping software can update tracking information and order statuses from the clients’ online stores at a single dashboard for easy availability.
  • With API2Cart, it is easy for the shipping software to create shipping labels.
  • The software can also automate, customize, and schedule the tasks related to shipping so they can run on specific stores without any issues.
  • The methods provided by API2Cart also help shipping software organize the shipping data into detailed reports so the clients can get deep insights into their business.


Shipping management software is a critical tool for eCommerce businesses that want to succeed. This powerful software helps companies streamline their shipping operations, manage inventory, and improve shipping efficiency.

One of the major functions of any high-quality shipping software is the ability to automatically generate tracking numbers for orders. For performing such kind of functionality, shipping solutions need to have integration with various shopping platforms. It allows access to all the data from online stores based on them.

The easiest way to develop the integration with dozens of shopping platforms at once is to use API2Cart unified API.

You can try API2Cart for a month for free by registering your account. If you need to get more info related to API2Cart functionality, contact us by phone, email, or chat.