Skip to main content

JSONCargo

Blog

What is a Container Number, Prefixes & How to Track Containers via API

When shipping goods internationally, every container has a unique ID known as a container number. It’s not just random digits – this number follows a global standard that helps carriers, shippers, and logistics companies identify, locate, and track containers. If you’ve ever wondered how to make sense of those numbers or how to automate the process, this guide explains it step by step — and shows how a container tracking API by container number can simplify global logistics.

What is a Container Number?

A container number is the unique identification code assigned to every shipping container. It follows the ISO 6346 standard and usually looks something like MSCU1234567.

The structure is always the same:

  • Prefix (4 letters): Identifies the owner/operator (e.g., MAEU for Maersk, MSCU for MSC).

  • Serial number (6 digits): Unique ID within the fleet of that operator.

  • Check digit (1 digit): Used for validation.

This number is printed on the doors and sides of containers and is the key to accessing tracking information.

Understanding Container Prefixes

The prefix is the most important part of the container number because it tells you the shipping line or owner. For example:

  • MSCU → Mediterranean Shipping Company (MSC)

  • MAEU → Maersk

  • CMAU → CMA CGM

Knowing the prefix makes it much easier to identify which carrier operates the container and where to track it. However, the manual process of checking each carrier’s website is time-consuming.

How to Track Shipping Containers by Number

Traditionally, to track a container, you’d visit the shipping line’s portal, enter the container number, and manually check status updates. That’s fine for one or two containers. But if you manage dozens or hundreds across different shipping lines, this quickly becomes inefficient.

That’s where APIs come in. With a container tracking API by container number, you can:

  • Automatically fetch real-time container statuses (in transit, discharged, at port).

  • Access historical movement data for analysis.

  • Integrate tracking directly into your TMS, ERP, or customer-facing applications.

This eliminates the need for manual tracking and gives logistics teams a single, reliable data source.

Container Tracking is Simple through API:

At JsonCargo, we provide structured container data accessible through our API. Instead of logging into multiple carrier websites, you can query any container number and instantly retrieve:

  • Current location & port updates

  • Estimated arrival times (ETA)

  • Shipping line details

  • Historical movement records

 

Example: How to Track a container using Container Number

To track a container with the container number, just make an API request with the container number to our API endpoint (Tracking with Bill of Lading):

				
					GET http://api.jsoncargo.com/api/v1/containers/{tracking_number}
				
			
Example Response:
				
					"data": {
        "container_id": "MSCU5285725",
        "container_type": "40' HIGH CUBE",
        "container_status": "Full Transshipment Discharged",
        "shipping_line_name": "Mediterranean Shipping Company",
        "shipping_line_id": "0015",
        "tare": null,
        "shipped_from": "Liverpool, GB",
        "shipped_from_terminal": "Maritime Liverpool Cd",
        "shipped_to": "Jakarta, JAVA",
        "shipped_to_terminal": null,
        "atd_origin": "2025-08-30 00:00",
        "eta_final_destination": null,
        "last_location": "Le Havre, FR",
        "last_location_terminal": "Tn Msc",
        "next_location": "Singapore, SG",
        "next_location_terminal": "Tuas Terminal",
        "atd_last_location": "2025-09-15 00:00",
        "eta_next_destination": "2025-10-25 00:00",
        "timestamp_of_last_location": "2025-09-07 00:00",
        "last_movement_timestamp": "2025-09-07 00:00",
        "loading_port": "Liverpool, GB",
        "discharging_port": "Jakarta, JAVA",
        "customs_clearance": null,
        "bill_of_lading": null,
        "last_vessel_name": "MSC SPRING III",
        "last_voyage_number": "RS534A",
        "current_vessel_name": "MSC SPRING III",
        "current_voyage_number": "RS534A",
        "last_updated": "2025-09-08 22:42"
    }
}
				
			

Understanding container numbers and prefixes is essential for anyone working in global logistics. But while the numbers themselves are standardized, tracking them shouldn’t be a manual job. With a container tracking API by container number, you can streamline the process, reduce manual work, and integrate container visibility into your systems

why to use a container tracking API

Common Questions About Container Tracking Data via API:

Q1: Can I track shipments with JsonCargo even if I don’t have the container number yet?
Yes. Using the Master Bill of Lading. JsonCargo lets you begin tracking as soon as the carrier issues the MBL, often days before container numbers appear in EDI systems.

Q2: Does JsonCargo work with all carriers?
JsonCargo integrates both carrier data feeds and AIS vessel tracking, which means you can track shipments across all major shipping lines worldwide, and you can check the covered Shipping Lines.

Q3: Is JsonCargo only for large enterprises?
No. JsonCargo is designed for both small and large businesses. Startups, retailers, freight forwarders, and manufacturers all use JsonCargo because the API is simple to integrate into existing workflows.

Q4: How do I start using JsonCargo?
Just get an API key, make your first call with a Master B/L number, and you’ll instantly see containers assigned in real time.