How do I read the JSON payload?

This article touches on some of the different objects, keys, and values in a JSON payload returned from the Vizion API.

TIP: See our developer object reference for more details.

 

The JSON output provided by the Vizion API is machine-readable for ease of use with any language or system using the output. The format is also easily read by humans as long as you understand what you are looking for.

To help end-users understand what to look for, a JSON update providing the latest information about a container shipment has been broken into sections and defined below.

 

The top section of the payload will provide the user with the [reference_id], the input provided by the user, and origin and destination information as available (inland origin, origin port, destination port, inland destination). Details for each location will also be provided.

Screen Shot 2021-04-16 at 8.16.38 PM

 

Once you have identified the [milestones] array you should now be looking for each event accompanied by details such as location, vessel, planned flag, and raw event provided by the carrier.

Screen Shot 2021-04-16 at 8.18.33 PM

 

This is another example of an event that is contained further down in the [milestone] array. Notice the events [planned] value is true, meaning this is an estimated event.

Screen Shot 2021-04-16 at 8.19.28 PM

 

Below the list of events found in the [milestone] array, you will find a small block containing information generated and provided by Vizion including the unique update [id] and when the update was created and updated.

Screen Shot 2021-04-16 at 8.19.46 PM