APM
- Provider Information:
Id |
apm |
Type |
terminal |
Trace Type |
API |
Credentials |
Uses client_id and client_secret and it is Envase based. |
Limits |
Maximum number of bookings per request is 50 |
Status |
draft |
Doc Status |
draft |
Doc Version |
1 |
- URLs:
Type |
URL |
Environment |
---|---|---|
Request |
Production API |
|
Request |
Sandbox API |
- Sites:
Name |
Site Id |
Description |
---|---|---|
Los Angels terminal |
USLAX/LAX |
the description |
Port Elizabeth Terminal |
NWK |
the description |
Mobile Terminal |
USMOB |
the description |
South Florida Container Terminal Miami |
USMIA |
the description |
- Credentials:
Important
Credentials are Envase based.
POST https://api.apmterminals.com/oauth/client_credential/accesstoken?grant_type=client_credentials
Using this endpoint with valid client Id and Secret to generate an access token.
Authorization: Bearer <Access Token>
Query Bookings Response
GET https://api.apmterminals.com/booking-enquiry?facilityCode=<valid-site-id>&assetId=<valid-booking-number>
Next use the token generated from the first request as a bearer token for this request, we need to pass a valid site id in the facilityCode and a valid booking number in the assetId, single or multiple Booking Reference numbers seperated by commas (e.g. 038NY0630872,OHLB374140).
Note
If isContainer is true then the data is for the container and it won’t be considered, if isContainer is false then the data is for the booking.
Note
The value of containerQuantityCount, containersReceivedCount, and emptiesOutCount are summed up if isContainer is false.
[
{
"isContainer": "false",
"bookingReference": "227890125",
"containerISOCode": "22G1",
"shippingLine": "MAEU",
"vesselName": "SEALAND PHILADELPHIA",
"outboundVoyageNumber": "323S",
"beginRecieveDateTimeLocal": "2023-06-02T07:00:00-07:00",
"cargoCutoffDateTimeLocal": "2023-06-09T16:00:00-07:00",
"vesselEtdDateTimeLocal": "2023-06-15T17:00:00-07:00",
"sizeTypeHeight": "20/GP/86 (Sub OK)",
"containerQuantityCount": 1,
"containersReceivedCount": 0,
"emptiesOutCount": 1,
"isReservedOnly": "false",
"containersPreadvisedCount": 1,
"vgmReceivedCount": 1,
"bookingHolds": {},
"hazardous": ""
},
{
"isContainer": "true",
"bookingReference": "227890125",
"containerISOCode": "PONU2088830",
"isoCode": 2210,
"isReadyForLoad": "true",
"shippingLine": "MAEU",
"sizeTypeHeight": "20/GP/86 (Sub OK)",
"isReceived": "",
"isEmptyOut": "true",
"isReservedOnly": "false",
"isPreadvised": "true",
"facilityInDateTimeLocal": "2023-06-02T12:40:23-07:00",
"isVgmReceived": "true",
"containerHolds": "",
"hazardous": {}
}
]
Not found Booking Response
GET https://api.apmterminals.com/booking-enquiry?facilityCode=LAX&assetId=<not-found-booking-number>
If asset id is returned as not found then API returns the next response.
[
{
"AssetName": "not-found-booking-number",
"message": "Asset Details Not Found"
}
]
Vessel Visit Response
GET https://api.apmterminals.com/vessel-visits?assetId=<valid-vessel-name>&facilityCode=<valid-site-id>
Use the token generated from the first request as a bearer token for this request, we need to pass a valid site id in the facilityCode and a valid vesselName in the assetId.
[
{
"vesselName": "MAERSK KINLOSS",
"vesselLloydsCode": 9333022,
"inboundVoyageNumber": "333E",
"outboundVoyageNumber": "333E",
"startReceiveDateTimeLocal": "2023-08-29T06:00:00-04:00",
"scheduledEtaDateTimeLocal": "2023-09-01T08:00:00-04:00",
"latestEtaDateTimeLocal": "2023-09-01T08:00:00-04:00",
"actualEtaDateTimeLocal": "2023-09-01T05:36:00-04:00",
"firstAvailableDateTimeLocal": "",
"scheduledEtdDateTimeLocal": "2023-09-02T04:00:00-04:00",
"latestEtdDateTimeLocal": "2023-09-01T19:00:00-04:00",
"actualEtdDateTimeLocal": "2023-09-02T05:15:00-04:00",
"cargoCutOffDateTimeLocal": "2023-08-30T20:00:00-04:00",
"reeferCutOffDateTimeLocal": "2023-08-30T20:00:00-04:00",
"hazardousCutoffDateTimeLocal": "2023-08-30T20:00:00-04:00",
"berthName": "E92",
"shippingLines": "APL,MAE,MLL,MSC,SAF,SEA",
"vesselOperator": "MLL",
"vesselStatus": "DEPARTED",
"terminalDateTimeLocalStamp": "2023-09-15T10:48:22-04:00"
}
]
Unauthorized Response
GET https://api.apmterminals.com/vessel-visits?facilityCode=<valid-site-id>&assetId=<valid-vessel-name>
If the token is invalid or expired then API returns the next response.
{
"code": "401",
"message": "Unauthorized",
"debugMessage": "Failed to Authenticate, invalid access token"
}
Not found Vessel Response
GET https://api.apmterminals.com/vessel-visits?facilityCode=LAX&assetId=<not-found-vessel-name>
If asset id is returned as not found then API returns the next response.
[
{
"AssetName": "not-found-vessel-name",
"message": "Asset Details Not Found"
}
]
Bad Request Response
GET https://api.apmterminals.com/vessel-visits?facilityCode=LAX
If assetId or facilityCode is not passed on the request the API responses with bad request.
{
"code": "400",
"message": "Mandatory parameters missing",
"debugMessage": "assetId and facilityCode are mandatory inputs for the api"
}
- Data Mapping:
Property |
Source Property |
Description |
---|---|---|
voyage |
outboundVoyageNumber |
Reference number for the voyage. |
reeferCutoff |
reeferCutOffDateTimeLocal |
Refrigerated cargo cutoff date/time. |
hazmatCutoff |
hazardousCutoffDateTimeLocal |
Hazmat cargo cutoff date/time. |
lastProviderUpdate |
terminalDateTimeLocalStamp |
Date/Time the provider updated the data. |