1. Home
  2. Container Tracking Demo
  3. Check a Bill of Lading

Check a Bill of Lading

In order to retrieve containers associated with a specific Bill of Lading, a GET request must be submitted to

https://containerdemo.ghmaritime.com/api/container_info/get_bol/<bol_id>

where bol is replaced by the BoL of interest.

We only accept GET requests on Bill of Ladings already submitted to our system which are associated with your account. For a newly tracked Bill of Lading the output may return empty, after some time containers will be added to the Bill of Lading as we gather for information about the specific Bill of Lading. This process generally takes less than an hour, after which events for any specific container may begin to be retrieved on demand.

Additionally, including Content-Type: application/json in the headers is necessary.

Note that Basic Authentication in the form of a username and password is necessary to submit a successful request. If you do not have any authentication details, please contact us.

Response

Requesting a Bill of Lading returns the list of associated containers and their current tracking status. If containers are still being processed, they will be marked as Untracked whereas containers with matched and validated data are marked as Tracked. All container related data is located in the container property.

{
    "result": {
        "AAAA7618468": {
            "container_status": "Tracked",
            "container: {
                "shipment": {
                    "equipment": { ...
                    },
                    "container_events": [ ...
                    ],
                    "voyage_events": [ ...
                    ],
                    "generated_at: 1234567890
                }
            }
        },
        "BBBB5649690": "Tracked": {
            "container_status": "Tracked",
            "container: {
                "shipment": {
                    "equipment": { ...
                    },
                    "container_events": [ ...
                    ],
                    "voyage_events": [ ...
                    ],
                    "generated_at: 1234567890
                }
            }
        }
    }
}

Errors

If you attempt to check a Bill of Lading which has not been submitted, or submit an incorrectly formatted Bill of Lading, the following error is returned:

{
    "error": "ABCD123456789 is not actively being tracked"
}

Please note that the due to the nature of the demo system, it is subject to continuous updates alongside ongoing development. This means that maintenance and upgrades occur unannounced and may require some GET requests to be resubmitted later. If you are experiencing any prolonged issues, please contact us.

Python Example

The following code snippet returns containers for Bill of Lading ABCD123456789.

import json
import requests
from requests.auth import HTTPBasicAuth

response = requests.get(
    "https://containerdemo.ghmaritime.com/api/container_info/get_bol/ABCD123456789",
    headers={"Content-Type": "application/json"},
    auth=HTTPBasicAuth("user", "pass"))
  
print(json.loads(response.content))