Menu
Home Private: Container Tracking Demo 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. Kindly note that submitting a GET request immediately after initiating tracking will produce an incomplete result. Only once all containers associated with the Bill of Lading have been checked and verified will get_bol return the complete result. All container related data is located in the container property. In the event that some containers have yet to start their journey for one reason or another, the container_status will mark  them as Untracked.

{
    "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))
Updated on 23 August, 2021