The Import Availability API provides information on inbound containers, in particular their availability status and hold information. Users must provide the container number and the associated bill of lading number in the request.
In addition to retrieving availability data, users can receive a message when a container's availability status changes by subscribing to a container with a callback URL.
Endpoints
POST /import-availability
POST /import-availability/subscriptions
GET /import-availability/subscriptions
DELETE /import-availability/subscriptions/:id
Get Import
Requests for import availability must include a valid bill of lading that is associated with the container.
Query Parameters
equipmentId
referenceId
Returns
Status 200
The import availability object.
GET /import-availability
RESPONSE
{
"container": "GLDU1234567",
"billOfLading": "AAA123999",
"category": "IMPRT",
"freightKind": "LADEN",
"iso": "22G0",
"terminal": "NIT",
"shipmentStatus": "Available",
"shipmentAction": "UV",
"carrierScac": "CMDU",
"carrierName": "CMA",
"yardBlock": null,
"isHazardous": false,
"isReefer": false,
"holds": [],
"freeTimeExpiration": null,
"voyageLloyds": "9321263",
"voyageCode": "COUR-1247",
"voyageVesselName": "MOL COURAGE",
"weight": "18750",
"weightUnit": "K",
"weightQualifier": "N",
"chassis": "CHAZ123456",
"outTime": "2022-02-15T18:16:13.973",
"emptyReturnTime": "2022-02-17T17:46:38.769"
}
Get Imports (Bulk)
Get import availability data for up to 100 containers.
Requests for import availability must include a valid bill of lading that is associated with the container.
The endpoint takes a JSON encoded list of up to 100 import availability request objects in the POST body and returns a list of import availability response objects.
Parameters
A list of import availability request objects (100 max). Each object must contain the following properties:
equipmentId
referenceId
Returns
Status 200
A list of import availability response objects.
equipmentId
referenceId
data
message
POST /import-availability
RESPONSE
[
{
"equipmentId": "GLDU1234567",
"referenceId": "AAA123999",
"data": {
"container": "GLDU1234567",
"billOfLading": "AAA123999",
"category": "IMPRT",
"freightKind": "LADEN",
"iso": "22G0",
"terminal": "NIT",
"shipmentStatus": "Available",
"shipmentAction": "UV",
"carrierScac": "CMDU",
"carrierName": "CMA",
"yardBlock": null,
"isHazardous": false,
"isReefer": false,
"holds": [],
"freeTimeExpiration": null,
"voyageLloyds": "9321263",
"voyageCode": "COUR-1247",
"voyageVesselName": "MOL COURAGE",
"weight": "18750",
"weightUnit": "K",
"weightQualifier": "N",
"chassis": "CHAZ123456",
"outTime": "2022-02-15T18:16:13.973",
"emptyReturnTime": "2022-02-17T17:46:38.769"
},
message: null
}
]
Create Subscriptions
Subscribe to availability statuses. Each time the status changes, the import availability object will be POST-ed to the callback URL provided.
The endpoint takes a JSON encoded list of up to 100 import availability request objects in the POST body and returns a list of import availability response objects.
Parameters
A list of import availability request objects (100 max). Each object must contain the following properties:
equipmentId
referenceId
callback
Returns
Status 200
A list of import availability response objects.
equipmentId
referenceId
data
message
POST /import-availability/subscriptions
RESPONSE
[
{
"equipmentId": "GLDU1234567",
"referenceId": "AAA123999",
"data": {
"subscriptionId": "0382b97e-0a51-4b10-883e-a5e822d18d3f",
"callbackUrl": "https://www.portofvirginia.com/availability-events",
"equipmentId": "GLDU1234567",
"referenceId": "AAA123999",
"terminal": "NIT"
},
"message": null
}
]
Get Subscriptions
This endpoint returns import availability subscriptions. A maxmium of 100 subscriptions are returned at a time.
Query Parameters
page
Returns
Status 200
A list of subscription objects.
GET /import-availability/subscriptions
RESPONSE
[
{
"subscriptionId": "0382b97e-0a51-4b10-883e-a5e822d18d3f",
"callbackUrl": "https://www.portofvirginia.com/import-availability-events",
"equipmentId": "GLDU1234567",
"referenceId": "AAA123999",
"terminal": "NIT"
}
]
Remove Subscription
This endpoint removes an import availability subscription. Once the subscription is removed, you will no longer receive events at your endpoint for the specified container. Removing subscriptions is not required, as they will automatically expire after the container leaves the terminal. Use this endpoint if you need to remove a subscription before the container leaves the terminal.
Query Parameters
None
Returns
Status 200
DELETE /import-availability/subscriptions/{id}
RESPONSE
None