API Documentation

 

Contents

What is the PortConnect API?

The PortConnect API (Application programming interface) is a new, more modern way of sending and retrieving data from PortConnect.  PortConnect receives container event information 24 hours a day from our partner ports Ports of Auckland, Port of Tauranga, Timaru Container Terminal and Lyttelton Port Company.  Events are received at least every ten minutes.

Our APIs include:


Signing Up

In order to use the PortConnect API, you need to sign up to our Microsoft APIM based developer portal. See our user-guide for the full instructions on signing up, Creating an API account.

Once signed up, you will be able to subscribe to either the Full Access or Trial product variations for the API, via the "Products" menu.  Both products contain the same API endpoints, and both products require you to accept the PortConnect API terms and conditions of use.

image-20240910-020637.png

 

Once you sign up for the Trial, the free 3-month trial will commence.

If you sign-up for the Full Access, charges will apply. Please refer to our Pricing page.

Once the subscription is confirmed, an API key will be generated.  You can see your API key from the Profile menu. 

All calls to the PortConnect API must include either the primary or secondary key in the header Ocp-Apim-Subscription-Key.  You can regenerate your subscription key any time you choose.


Rate Limit

Trial Subscription

Overall cap of 100 calls in a 24hr period. Limited to 100 calls to any endpoint within 60 seconds.

Full Access Subscription

Overall cap of 40,000 calls in a 24 hour period. Limited to 600 calls to any endpoint within 60 seconds.


Pricing

Please refer to our Pricing page.

A free trial subscription is available for 3-months. To register interest in a trial or for a full access subscription, please contact User Support info@portconnect.co.nz

 


Developer Portal

The Developer Portal is a useful tool that provides documentation for endpoints and auto-generated definitions for API object models. It also includes a test function that allows you to test API calls against our live data.

The PortConnect API endpoint to use from your client application is https://api.portconnect.io.  The developer portal can generate sample code in a number of different programming languages:

 

 

 

Feel free to use other API tools such as Postman.  See the resources section below for some Postman tests you can use.

JSON format

The PortConnect API uses JSON language and only supports JSON with double quotes (“).

API Health Check

PortConnect provides an 'About' endpoint which can be called to check whether the API is up and available.

The endpoint is GET https://api.portconnect.io/v1/about. If our API suite is available then a 200 response will be returned. If it is unavailable then a 400 response will be returned.

Resources

Postman is a popular tool for API developers. This zip file contains a collection of tests for the PortConnect API as well as an environment file. Be sure to update the environment file with your own API subscription key.

 

 

© PortConnect 2023