Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Note

This guide is intended for developers who want to integrate their own applications with PortConnect.

...

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.

...

  • Valid port codes are: NZAKL, NZTRG, NZTIU or NZLYT
  • Valid category codes are: IMPORT, EXPORT, TRANSHIPMENT, DOMESTIC
  • Facility codes are optional and relate to the port facility where the event takes place. If no facility code is specified, then webhook callbacks will be sent whenever the event occurs, regardless of the location.  For instance, if a subscription is created for an export "gate in", and the container is gated in to both an inland port and the sea port, then two gate in events will be sent as webhook callbacks.
  • Only some event type codes support the use of the facility code, in all other cases a null value should be supplied.  Refer to the table below.

...

  • We only permit one userDefinedReference per container. This is a maximum of 50 characters and designed to support container visit identifiers in calling systems.
  • The user defined reference will be included in the webhook callback payload against the specified container.
  • If you create a new subscription with a different user defined reference, it will overwrite the existing subscription including the user defined reference.
  • If you have already received events against the first subscription you will receive future events against the new subscription with the new user defined reference.


Notification Types

Valid event type codes are shown in the following table, along with event values that are returned in the webhook callback payload:

Code
Description
Supported Facility Codes
Event Value 1Event Value 2
ACTIVEContainer record becomes live in PortConnect systemNZAKL, NZTRG, NZTIU, NZLYT

AVAILABLEAvailability Advice (Container is fully released)NZAKL, NZTRG, NZTIU, NZLYT

AVAILABLECANCELLEDAvailability Advice cancelledNZAKL, NZTRG, NZTIU, NZLYT

BOOKINGDISCREPANCYDiscrepancy: Booking does not match Preadvise/Gate-in detailsNZAKL, NZTRG, NZTIU, NZLYTContainer Visit valueBooking value
CLEAREDCleared Advice (Container is fully cleared)NZAKL, NZTRG, NZTIU, NZLYT

CLEAREDCANCELLEDCleared Advice cancelledNZAKL, NZTRG, NZTIU, NZLYT

CUSTOMSRELEASENotice of Customs ReleaseNZAKL, NZMKL, NZTRG, NZTIU, NZLYT, NZOLT

CUSTOMSRELEASECANCELLEDNotice of Customs Release cancelledNZAKL, NZMKL, NZTRG, NZTIU, NZLYT, NZOLT

DEPARTFacility Departure AdviceNZAKL, NZWII

DISCHARGEDischarge AdviceNZAKL, NZTRG, NZTIU, NZLYT

EXPORTCLEAREDCEDO is in place and there are no other stopsNZAKL, NZTRG, NZTIU, NZLYT

EXPORTCLEAREDCANCELLEDExport Cleared cancelledNZAKL, NZTRG, NZTIU, NZLYT

GATEINGate IN adviceNZAKL, NZMKL, NZTRG, NZWII, NZTIU, NZOLTMode of transport, eg. RoadIdentifier for the truck or train, eg. REL328
GATEOUTGate OUT AdviceNZAKL, NZMKL, NZTRG, NZWII, NZTIU, NZOLT, NZLYT, NZCHCMode of transport, eg. RoadIdentifier for the truck or train, eg. REL328
HAZARDGATERULEHazardous Cargo Gate-in rule appliesNZAKL, NZTRG, NZTIU, NZLYT

LFT24HOURSContainer visit Last Free Time within 24 hoursNZAKL, NZTRG, NZTIULast free time
LFTCHANGEDContainer visit Last Free Time has been changedNZAKL, NZTRG, NZTIUNew last free time
LFTEXCEEDEDContainer visit Last Free Time exceededNZAKL, NZTRG, NZTIULast free time
LOADNotice of item loaded to VesselNZAKL, NZTRG, NZTIU, NZLYT

LOPRELEASENotice of Line Operator ReleaseNZAKL, NZMKL, NZTRG, NZTIU, NZOLT, NZLYT, NZCHC

LOPRELEASECANCELLEDNotice of Line Operator Release - cancelledNZAKL, NZMKL, NZTRG, NZTIU, NZOLT, NZLYT, NZCHC

MPIRELEASENotice of MPI ReleaseNZAKL, NZMKL, NZTRG, NZTIU, NZOLT, NZLYT, NZCHC

MPIRELEASECANCELLEDNotice of MPI Release - cancelledNZAKL, NZTRG, NZTIU, NZLYT

NOCEDONo Cedo WarningNZAKL, NZTRG, NZTIU, NZLYT48, 24, 2 hour warning text
PINAVAILABLEExpressPin AvailableNZAKLExpress Pin number
PINSUSPENDEDExpressPin SuspendedNZAKLExpress Pin number
VESSELARRIVALVessel Visit Actual Time of ArrivalNZAKL, NZTRG, NZTIU, NZLYT

VESSELDEPARTUREVessel Visit Actual Time of DepartureNZAKL, NZTRG, NZTIU, NZLYT

PRIORITYGATEINAutomated Gate-In Notifications when containers arrive at Metroport with a status of Priority (Only available for Imports via Port of Tauranga).NZTRG


...

  • NZAKL - Ports of Auckland 
  • NZMKL - MetroPort Auckland
  • NZCWF - Crawford Street, Hamilton
  • NZTRG - Port of Tauranga, Sulphur Point
  • NZWII - Wiri, Ports of Auckland South Auckland Freight Hub
  • NZTIU - Timaru Container Terminal
  • NZOLT - MetroPort Rolleston
  • NZLYT - Lyttelton Port Company

  • NZCHC - CityDepot

Response

Success will result in a return code of 201 Created. The response to the request will confirm the subscription details. 

...

  • partnerPortCode must be one of NZAKL, NZTRG, NZTIU or NZTRGNZLYT
  • vesselVisit must contain a minimum of vesselName and vesselVoyageNbr
  • valid UN port codes must be used
  • at least one booking item must be supplied

...

  • $0.05NZD per call if not subscribed to Track & Trace
  • Free for Subscribed Track & Trace users

Container Visits

  • $0.05NZD per container/per call (max 10 containers per call) when searching containers directly.

Container Event Subscriptions

  • $0.20NZD per event update (Notification) sent*
  • Includes 1 free callback to the container visit URL to retrieve standing container data (provided in the callback payload).
*High volume users may qualify for preferred customer discounts.

...