How does the JSON output and object description table of Flexport container legs API work?

In this article, I will provide a detailed clarification of the object table and JSON output of Flexport's container legs API. As a programmer, you are already familiar with the concept of object tables and JSON outputs, but understanding the specific format and structure of the data provided by Flexport's API is crucial for working efficiently with their container legs data. By the end of this article, you will have a clear understanding of the data structure of Flexport's container legs API, which will allow you to use this data effectively in your programming projects.

Object table

ObjectsDescription
data
_object
prev
next
shipment_container
ref_type
link
id
leg
dates
actual_loaded_on_board_date
  • data: This object contains the data of the container legs, including information about the shipments, containers, and legs.

  • _object: This object provides additional metadata about the container legs data, such as its resource type, the URL for accessing the data, and pagination information.

  • prev: This object contains the URL for the previous page of container legs data, if any.

  • next: This object contains the URL for the next page of container legs data, if any.

  • shipment_container: This object contains information about the container being shipped, including its size, type, and weight.

  • ref_type: This object specifies the type of reference used to identify the shipment or container, such as a bill of lading or a booking number.

  • link: This object contains URLs for related resources, such as the shipment or container associated with the container leg.

  • id: This object contains a unique identifier for the container leg.

  • leg: This object contains information about the leg of the container's journey, such as its origin, destination, and carrier.

  • dates: This object contains dates relevant to the container leg, such as the estimated arrival and departure dates.

  • actual_loaded_on_board_date: This object contains the date on which the container was actually loaded onto the vessel.

The information provided in the table is essential for working with Flexport's container legs API. By understanding the structure and format of the data, programmers can efficiently extract and use the information they need to integrate Flexport's container legs data into their projects. The objects listed in the table provide a comprehensive view of the container legs data, including metadata, container and shipment information, dates, and leg details. This information is useful for tracking shipments, managing inventory, and optimizing supply chain logistics. Additionally, understanding the object structure of the container legs data allows programmers to parse and manipulate the data effectively, enabling them to develop customized solutions that fit their specific needs.

JSON output explained

This JSON output contains data related to shipment container legs, provided by Flexport's API. The output is structured in key-value pairs, where the keys represent the object name and the values represent the object's data. The "_object" key specifies the resource type and its URL. The "self" key provides the URL of the current resource, and the "version" key specifies the version of the API being used. The "data" key contains an array of shipment container legs, each of which is represented by an object. Each shipment container leg object contains information about the shipment container, leg, and dates relevant to the container leg. The "prev" and "next" keys contain the URLs of the previous and next pages of container legs data, respectively, since the data is paginated. Overall, this JSON output provides a comprehensive view of the container legs data, which can be useful for tracking shipments, managing inventory, and optimizing supply chain logistics.

{
"_object": "/api/response",
"self": "https://api.flexport.com/ocean/shipment_container_legs",
"version
": 2,
"data": {
"_object": "/api/collections/paginated",
"prev": "https://api.flexport.com/ocean/shipment_container_legs?page=1",
"next
": "https://api.flexport.com/ocean/shipment_container_legs?page=3",
"data
": [
{
"_object": "/ocean/shipment_container_leg",
"shipment_container": {
"_object": "/api/refs/object",
"ref_type": "/ocean/shipment_container",
"link": "https://api.flexport.com/ocean/shipment_containers/123",
"id
": 123
},
"leg": {
"_object": "/api/refs/object",
"ref_type": "/shipment_leg",
"link": "https://api.flexport.com/shipment_legs/123",
"id
": 123
},
"dates": [
{
"actual_loaded_on_board_date": "2019-01-18T22:08:38.599Z"
}
]
}
]
}
}

Finishing

In this article, we discussed the object table and JSON output of Flexport's container legs API. We began by converting an HTML table into a more readable format and then described each object in more detail. We also talked about why the information provided in the table is useful for working with Flexport's API and how it can be used for tracking shipments, managing inventory, and optimizing supply chain logistics. Finally, we examined a JSON output that contained data related to shipment container legs and explained its structure and contents. Overall, this conversation provided an overview of the essential concepts related to Flexport's container legs API, which can be useful for programmers and logistics professionals working in the industry.

Note

It is possible to request access to Flexport's container legs API through the third-party data marketplace of Worldindata. Worldindata provides a platform that enables users to access and integrate data from various sources, including Flexport's container legs API. By using Worldindata's platform, users can easily access and analyze shipment data, track shipments, and optimize supply chain logistics. To request access to Flexport's container legs API through Worldindata, users can visit the Worldindata website and follow the instructions to set up an account and request API access.