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/bol_info/get/bol

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. Please note that container events are not provided on this endpoint. Instead, this endpoint exclusively returns the list of containers identified as being associated with the Bill of Lading in question. As such, once all containers have been identified accordingly, the output of this endpoint will not change. 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.

{
     "result": {
         "AAAA7618468": "Tracked",
         "BBBB5649690": "Tracked"
     }
 }

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/bol_info/ABCD123456789",
    headers={"Content-Type": "application/json"},
    auth=HTTPBasicAuth("user", "pass"))
  
print(json.loads(response.content))