Benefit of using APIs

Our APIs connect directly to our terminal operating system, so you'll always benefit from real-time data. We'll maintain and manage our APIs, so once you've set them up, you can be confident that you'll continue to reap the benefits, including:

  • Increased accuracy - container data is transferred automatically removing the chance of human error or reliance on outdated information
  • Time saving & cost effective - enables large volumes of data to be handled with no manual intervention
  • Improved planning - guarantees you’re using the most up-to-date information available in the supply chain

 

What data will I have access to?

Based on the Container ID or Bill of Lading, the following information will be available (some may be terminal specific):

  • Ready for Delivery: Advises if the container is ready for delivery.
  • Bill of lading: It is the legal document issued to the customer, which confirms the carrier's receipt of the cargo from the customer acknowledging goods being shipped and specifying the terms of delivery (Except Aarhus).
  • Container Status: Advised; Inbound; Yard; Loaded; Departed; Retired
  • Discharge date: Date and local time when equipment was discharged from the vessel.
  • Yard Location: Current location of the equipment in the yard (Except Aarhus).
  • Container Holds: Identifies freight or customs holds.
  • Storage Paid Through Date: The last free day, charges will start occuring after this date (Except Aarhus)
  • Demurrage Owed: Dollar amount owed to pickup the container (Except Aarhus).
  • Size/Type/Height: Container dimensions.
  • ISO Code: ISO code of the container.
  • Gross Weight: Container Gross weight in kilos or pounds.
  • Hazardous: Hazardous class of the container (if applicable)
  • Facility Out: Date and local time that the container gates out of the facility.
  • Vessel Name:  Name of vessel that the container will be discharging from.
  • Vessel Estimated Time of Arrival: Estimated date and local time that the vessel will arrive at port.
  • Shipping Line: Name of the shipper or container operator.
  • Stripping Date: Date that the container stripping completed.
  • Appointment: Advises if appointment has been made to pick up container.
  • Appointment Date: Date and local time of appointment to pick up container.
  • Hold description: The description regarding container holds (Aarhus only).
  • Container Modality: Onward modality train or truck (Gothenburg only).
  • Train Location: When the onward journey is by train - position on the train (Gothenburg only).
  • Train Position Slot: When the onward journey is by train - position on the rail car (Gothenburg only).
  • Train Destination: When the onward journey is by train - final destination (Gothenburg only).

 

For which terminals is data available?

Data is available for the following terminals and will be gradually rolled out to our fully owned terminals. Register for updates and we'll let you know as soon as data is available for the terminal(s) you're interested in. Terminal code shown between ():

  • Algeciras, Spain (ESALG)
  • Apapa, Nigeria (NGAPP)
  • Aqaba, Jordan (JOAQB)
  • Bahrain (BHKBS)
  • Buenos Aires, Argentina (ARBUE)
  • Gothenburg, Sweden (SEGOT)
  • Lázaro Cárdenas, Mexico (MXLZC)
  • Los Angeles, USA (USLAX)
  • Maasvlakte II, Rotterdam (NLMSV)
  • Medport Tangier, Morocco (MATNG)
  • Monrovia, Liberia (LRMLW)
  • Mobile, USA (USMOB)
  • Moin, Costa Rica (CRPMN)
  • Mumbai, India (INNSA)
  • Onne, Nigeria (NGONN)
  • Pecém, Brazil (BRPEC)
  • Pipavav, India (INPAV)
  • Port Elizabeth, USA (USNWK)
  • South Florida Container Terminal, Miami, USA (USMIA)
  • Suez Canal Container Terminals - SCCT, Egypt (EGPSD)
  • Tangier, Morocco (MAPTM)
  • Vado, Italy (ITVDL)
  • Valencia, Spain (ESVLC)
  • Yucatán, Mexico (MXPGO)

Once you have Signed Up for an account, Accepted a Plan and registered your App to generate your own API keys, you are ready to start testing our APIs. Everything you need is detailed below, starting with Step 1.  Sandbox - Import Availability.  Once you are satisfied with your own development and testing, migration to production can be found in Step 2. Production -  Import Availability. It's here that you will learn about our OAuth 2.0 authorisation which is needed to generate a bearer token for subsequent calls.  Finally, feel free to read our Open API spec found below via our Import Availability .yaml file.

 

Step 1. Sandbox - Import Availability

To get you started, we've created a simple GET request API for you:  

  • https://api-sandbox.apmterminals.com/import-availability

To call this API, you will need to add Container or B/L numbers to the assetId query parameter, along with a Facility code, e.g. USLAX for Pier 400, Los Angeles. This API uses test data only. Go ahead and make calls using the any of the examples below;

  • Test Containers = WFHU5080179, EGHU9044403, TRLU7641472, HMCU9188157, MRKU2121896
  • Test Facility = USLAX

Your GET request should look something like this:

  • https://api-sandbox.apmterminals.com/import-availability?assetId=WFHU5080179,EGHU9044403&facilityCode=USLAX

 

Step 2. Production - Import Availability

To access our Production APIs we have a base security policy enforcing the OAuth2.0 Client Credentials Grant. This means that you must request an access token from us which is then used in subsequent calls to the APIs. The access token is added to the "Authorization" header with a "Bearer " prefix. So, the full Authorization header looks like - "Authorization: Bearer {access_token}". This access token expires after 30 minutes, so you will need to repeat this request to get a new token.

How to request an access token?

  • Issue a POST request to https://api.apmterminals.com/oauth/client_credential/accesstoken?grant_type=client_credentials
  • Please ensure your POST body is x-www-form-urlencoded and includes the two following key:value pairs created when you register your App
    • client_id = your Consumer Key
    • client_secret = your Consumer Secret
  • In the response you will see a key called "access_token", this is what you will include in the Authorization header for the Import Availability API

How to access the Production Import Availability API?

As with our Sandbox API you can issue a simple GET request, to the endpoint listed below, but this time you will need to add your access token.

  • https://api.apmterminals.com/import-availability
  • Headers: Authorization: Bearer Token {access_token}

The production API is connected directly to our terminal operating systems for real-time data. As such, when calling this API, you will need current container or B/L IDs, along with the appropriate facility code, e.g. USLAX for Pier 400, Los Angeles. Terminal codes shown between ():

  • Algeciras, Spain (ESALG)
  • Apapa, Nigeria (NGAPP)
  • Aqaba, Jordan (JOAQB)
  • Bahrain (BHKBS)
  • Buenos Aires, Argentina (ARBUE)
  • Gothenburg, Sweden (SEGOT)
  • Lázaro Cárdenas, Mexico (MXLZC)
  • Los Angeles, USA (USLAX)
  • Maasvlakte II, Rotterdam (NLMSV)
  • Medport Tangier, Morocco (MATNG)
  • Monrovia, Liberia (LRMLW)
  • Mobile, USA (USMOB)
  • Moin, Costa Rica (CRPMN)
  • Mumbai, India (INNSA)
  • Onne, Nigeria (NGONN)
  • Pecém, Brazil (BRPEC)
  • Pipavav, India (INPAV)
  • Port Elizabeth, USA (USNWK)
  • South Florida Container Terminal, Miami, USA (USMIA)
  • Suez Canal Container Terminals - SCCT, Egypt (EGPSD)
  • Tangier, Morocco (MAPTM)
  • Vado, Italy (ITVDL)
  • Valencia, Spain (ESVLC)
  • Yucatán, Mexico (MXPGO)
Attachment Size
APMT Import Availability_9.yaml (9.09 KB) 9.09 KB

Check here for version history

Our Import Availability API is currently version 1.0.  As and when the API evolves to provide more customer value and new iterations become available, our version history will be documented here.

There is currently no additional information required for this API. Please see the Specification tab for Technical Implementation details