This guide walks through the structure of the real-time, standardized, and detailed container milestone events delivered by the Vizion API in JSON format.
Vizion API's JSON output is designed to be easily interpreted by both machines and humans alike, making it versatile and convenient to use with any language or system. Once you understand the key components of the payload, the format is intuitive and straightforward to navigate.
This article walks through the structure of the JSON returned via webhook when subscribing to a container by Carrier Code, Auto Carrier Identification, or Bill of Lading. The List Reference Updates endpoint can also be used to retrieve the entire series of update payloads for a given reference.
Top level properties
The top-level properties of the JSON delivered to your callback URL include a unique id to represent the particular update, a reference_id for the container being tracked, and an organization_id that represents your organization's account with Vizion.
When receiving the data via webhook, the status property always equals 'data_received' because data for the container has been found and posted to your callback URL.
If you are not receiving data to your callback URL and want to investigate further, the Show Reference Details endpoint can be used to figure out why you have not received an update. In these cases, the last_update_status property is 'no_data', 'extraction_failed', 'webhook_failed', 'duplicate_payload', or 'auto_carrier_not_found'. See the API documentation for more details on the meaning of each status.
The payload object contains all of the important information related to your container's journey. It describes the container and carrier (container_id, container_iso, carrier_scac), the ID of the reference, and the origin and destination (inland_origin, origin_port, destination_port, inland_destination).
If bill of lading is null as in the example below it means it wasn’t provided and the container is being tracked using the container ID and carrier code.
"container_iso": "40' HIGH CUBE',
The array of milestone objects included within the payload describes the key events of the container. These milestones provide a comprehensive view of the container’s progress and allow for the tracking of its movement from origin to destination.
The description is a standardized and enriched description of the milestone event based on the raw_description, which is provided by the carrier. If Vizion cannot standardize the carrier description and we do not recognize the event, the carrier description is provided instead. We have eight core milestones that we attempt to include in each payload and expect to receive from the carrier, but you may find any events in this comprehensive list within your payload. Below is an example of a milestone object:
"description": "Loaded on vessel at origin port",
"vessel": "CT ROTTERDAM",
When a milestone event has a planned value equal to true, this means that this is an estimated event that has not yet taken place. When planned equals false, this is an event that has already occurred.
"description": "Estimated vessel arrival",
"raw_description": "Estimated vessel arrival",
"vessel": "CT ROTTERDAM",
For more information on ETAs, see How can I find ETA to destination port information within the JSON payload?.
The source property describes the data provider for the milestone and is one of 'ais', 'terminal' or 'carrier'.
A location object is included with each milestone and with the origin/destination ports or inland locations. To generate this object, Vizion takes location information received from the carrier and enriches it.
"name": "Ensenada, Mexico",
"state": "Baja California",
UNLOCODEs are assigned by the UNECE and are used to identify ports, rail and road terminals, airports, and other locations for the purpose of shipping and logistics (see codes by country). Each unlocode property is made up of five letters, with the first two representing the country and the last three further specifying the location.
Also included with the location information is the geolocation object, which contains the coordinates of where the event has occurred.