Documentation

Integration guidelines for the Certified Pick up API for the stakeholders with role Terminal

Terminal Integration guidelines

Introduction

This document describes how stakeholders of type “Terminal” should integrate the Certified Pick up process within their applications.

When an import container is commercially released, a Ship’s Agent typically sends a PIN code to the Terminal and shares this code with the next party in the release chain (e.g. Forwarder, Transporter,…). This code, which is required to be granted access to the terminal and release the container, is distributed further in the supply chain until a party, which knows the PIN code, claims the container for pick up at the terminal.

By using the Certified Pick up platform, a Ship Agent will not create and distribute a PIN code to the Terminal, increasing the security of the release chain. Instead, the Ship Agent sends the commercial release information towards the Certified Pick up platform, which vouches for a secure transfer of the “Release Right” until it is assigned to an entitled transporter to pick up the container at the terminal. The code to release the container will be sent via a secured and audited communication channel towards the Terminal.

Integrate using existing messages

The Certified Pick up (CPu) process consists of multiple data elements and actions. Most of these will be provided through dedicated API’s. However, to facilitate the integration of CPu with existing processes, it is possible for Ship Agents and Terminals to communicate with existing message types to the CPu Backbone.

Read more about integrating with existing message types (Coarri & Codeco).

Integrate using API's

Release Lights vs Release Rights

To ensure a secure container release at the terminal, three questions are vital: “Is it okay for the terminal that the container leaves the yard?” ,“Is it okay for the ship agent that a container leaves the terminal?” and “Which party is authorised to pick up the container?”.

Release Lights

Just like traffic lights indicate that you can cross a street, the Release Lights API is used to obtain/capture information about the “release status” of a container, i.e. can this container leave the terminal or not.
At this moment, two parties will need to give their permission concerning this departure, being the Terminal and the Ship Agent. Only these two parties will use the Release Lights API.

NxtPort is also integrating the Customs Release Light (CCRM). Until the direct link with Customs is functional, this light is included in the Terminal Release.

Release Rights

To know which party has the right to pick up a container at the terminal (assuming that both Terminal and Ship Agent have given their consent with the Release Lights API), a different API is used. When a commercial release has occurred, a “Release Right” is created and can be transferred from one party to another.

Your role as a Terminal

The Terminal provides crucial information that is required to release the container from the terminal: the Terminal Release. It covers

  • The container is physically available on the terminal (it has been discharged from the vessel)
  • The container is not blocked by any instance (terminal, customs, authorities, …)

The most straightforward way to implement this, is by using the Release Lights API.

In addition, the Terminal will provide the information needed to “close” the release chain: the Gate-Out event.

Process

Swagger files

Hostnames

Release Lights

Submit terminal release

The Terminal release is required to allow a Certified Pick up. To perform a Terminal release, use the following information.
Endpoint - Release Light

PUT - {Host}/certifiedpickup/v1/{port-locode}/containers/{equipment-number}/import/terminal-release

Swagger link

Parameters

  • port-locode: the UN/Locode of the operational port. For Antwerp this is BEANR. Mandatory parameter.
  • equipment-number: the container number. This number will be used onwards in the process. Mandatory parameter

Headers

  • externalReferenceId (optional); Your own reference (string)

Body

{
  "terminalCode": "string",
  "actionType": "Release",
  "releaseDateTimeUtc": "2020-09-17T09:35:25.189Z",
  "equipmentNumber": "string",
  "portLoCode": "string"
}
Field name
Type
Mandatory
Allowed value
Field Description
equipmentNumber String Yes Free text Container number
portLoCode String Yes UNLocode Use the UNLocode of the port. For Antwerp, this is BEANR
terminalCode String Yes Free text The terminal where the container will be available for pickUp. Can be updated later on in the process.
actionType Enum Yes Release You can only use the value Release when you wish to do a terminal release
releaseDateTimeUtc DateTimeUTC Yes Date Time Date from which the Terminal release will be active

When the 200 result is returned, the state of the container will be set to “Released” or “SelectedForScan”.

{
    "publicReferenceId": "GUID",
    "externalReferenceId": "string"
}

Notifications

A successful request will generate a notification of type Release-Light with action terminalRelease that will be sent to

  • Your own notification channel and
  • Towards the Ship agent
  • Towards the Release Right owner

To get the current state of a container, please refer to the "Get status of the release light" section of this document.

The Certified Pick up API uses an async mechanism that does not allow to return a full json body. To verify the information that was stored, you can process the notification that will be sent to your notification channel(s) or use the "Get status of the release light" request.

Something in your call wasn’t what we were expecting. Please:

  • Verify if you have included all mandatory fields
  • Verify if you are following the restrictions as defined in the above fields description

The below error message will be sent to your notification channel(s)


{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string",
  "additionalProp1": {},
  "additionalProp2": {},
  "additionalProp3": {}
}

This error indicates that you do not have the rights to perform the requested action. To overcome this, please make sure that you are:

  • Registered on the Certified Pick up platform
  • You have (at least) a “Terminal” role

The below error message will be sent to your notification channel(s)


{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string",
  "additionalProp1": {},
  "additionalProp2": {},
  "additionalProp3": {}
}

Please ensure that you are using the correct endpoints (eg fill in the {portLocode} variable in the URL). If this is the case, something is probably wrong at our side. Don’t worry, we are already notified, so you don’t have to take action.

Block terminal release

For as long as the container is not yet picked up, the terminal is able to block the container on the terminal. The container will still be present in the Certified Pick up backbone, but no Pick up right can be generated.
Endpoint - Release Light

PUT - {Host}/certifiedpickup/v1/{port-locode}/containers/{equipment-number}/import/terminal-release

Swagger link

Parameters

  • port-locode: the UN/Locode of the operational port. For Antwerp this is BEANR. Mandatory parameter.
  • equipment-number: the container number. This number will be used onwards in the process. Mandatory parameter

Headers

  • externalReferenceId (optional); Your own reference (string)

Body

{
  "terminalCode": "string",
  "actionType": "Block",
  "equipmentNumber": "string",
  "portLoCode": "string"
}
Field name
Type
Mandatory
Allowed value
Field Description
equipmentNumber String Yes Free text Container number
billOfLadingNumbers Array of strings Yes Free text The unique combination of Cointainer/BL will be used for the identification of the Container Release
actionType Enum Yes Block You can only use the value Block when you wish to block a commercial release

When the 200 result is returned, the state of the container will be set to “Blocked”.

{
    "publicReferenceId": "GUID",
    "externalReferenceId": "string"
}

Notifications

A successful request will generate a notification of type Release-Light with action terminalBlocked that will be sent to

  • Your own notification channel
  • The ship agent
  • The Release Right owner (if the right was previously given by the agent)

Something in your call wasn’t what we were expecting. Please:

  • Verify if you have included all mandatory fields
  • Verify if you are following the restrictions as defined in the above fields description

The below error message will be sent to your notification channel(s)


{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string",
  "additionalProp1": {},
  "additionalProp2": {},
  "additionalProp3": {}
}

This error indicates that you do not have the rights to perform the requested action. To overcome this, please make sure that you are:

  • Registered on the Certified Pick up platform
  • You have (at least) a “Terminal” role

The below error message will be sent to your notification channel(s)


{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string",
  "additionalProp1": {},
  "additionalProp2": {},
  "additionalProp3": {}
}

Please ensure that you are using the correct endpoints (eg fill in the {portLocode} variable in the URL). If this is the case, something is probably wrong at our side. Don’t worry, we are already notified, so you don’t have to take action.

Selected for scan

When the container has been selected for scan by customs, the terminal can provide this information to the Certified Pick-up backbone. The container can leave the terminal, but the owner of the Release Right (and if applicable, the driver that owns the Pick-up right) will be informed of the scanning requirement.
Endpoint - Release Light

PUT - {Host}/certifiedpickup/v1/{port-locode}/containers/{equipment-number}/import/terminal-release

Swagger link

Parameters

  • port-locode: the UN/Locode of the operational port. For Antwerp this is BEANR. Mandatory parameter.
  • equipment-number: the container number. This number will be used onwards in the process. Mandatory parameter

Headers

  • externalReferenceId (optional); Your own reference (string)

Body

{
  "terminalCode": "string",
  "actionType": "Scanning",
  "releaseDateTimeUtc": "2020-09-17T09:35:25.189Z",
  "equipmentNumber": "string",
  "portLoCode": "string"
}
Field name
Type
Mandatory
Allowed value
Field Description
equipmentNumber String Yes Free text Container number
portLoCode String Yes UNLocode Use the UNLocode of the port. For Antwerp, this is BEANR
terminalCode String Yes Free text The terminal where the container will be available for pickUp.  
actionType Enum Yes Scanning You can only use the value Scanning when the container needs to be transported to the scanner
releaseDateTimeUtc DateTimeUTC Yes Date Time Date from which the Terminal release will be active

When the 200 result is returned, the state of the container will be set to “SelectedForScan”.

{
    "publicReferenceId": "GUID",
    "externalReferenceId": "string"
}

Notifications

A successful request will generate a notification of type Release-Light with action terminalScan that will be sent to

  • Your own notification channel and
  • Towards the Ship agent
  • Towards the Release Right owner

To get the current state of a container, please refer to the "Get status of the release light" section of this document.

The Certified Pick up API uses an async mechanism that does not allow to return a full json body. To verify the information that was stored, you can process the notification that will be sent to your notification channel(s) or use the "Get status of the release light" request.

Something in your call wasn’t what we were expecting. Please:

  • Verify if you have included all mandatory fields
  • Verify if you are following the restrictions as defined in the above fields description

The below error message will be sent to your notification channel(s)


{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string",
  "additionalProp1": {},
  "additionalProp2": {},
  "additionalProp3": {}
}

This error indicates that you do not have the rights to perform the requested action. To overcome this, please make sure that you are:

  • Registered on the Certified Pick up platform
  • You have (at least) a “Terminal” role

The below error message will be sent to your notification channel(s)


{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string",
  "additionalProp1": {},
  "additionalProp2": {},
  "additionalProp3": {}
}

Please ensure that you are using the correct endpoints (eg fill in the {portLocode} variable in the URL). If this is the case, something is probably wrong at our side. Don’t worry, we are already notified, so you don’t have to take action.

Receive and process Certified Pick up notifications

Certified Pick up uses a real-time asynchronous notification mechanism. This means that, once the right to pick up a container is submitted or transferred, a notification is sent towards the other stakeholders. (the new Release Right owner.)

Several notifications, can be received. In the notification, the “Event” field allows to identify one of the following actions:

  • create, in case the commercial release was created by the agent
  • update, in case the commercial release was updated by the agent
  • delete, in case the commercial release was deleted by the agent
  • block, in case the commercial release was blocked by the agent
  • unblock, in case the commercial release was unblocked by the agent
  • terminalRelease, in case you have released the container (should be handled as a confirmation)
  • terminalBlocked, in case you have blocked the container (should be handled as a confirmation)
  • terminalScan, in case you have indicated the container to be sent to the scanner (should be handled as a confirmation)

To setup your notification channels, you can find detailed information on our Wiki pages.

Every notification that is sent by NxtPort will be built up with a generic part, allowing integrators to identify the asset, sender, error or warning messages and a Use case or type specific body.

Get status of release Lights

At any time, stakeholders that are allowed to see the information, can retrieve the status of a specific container.

Endpoint - Release Light

GET - {Host}/certifiedpickup/v1/{port-locode}/containers/{equipment-number}/import/release-lights-status

Swagger link

Parameters

  • port-locode: the UN/Locode of the operational port. For Antwerp this is BEANR. Mandatory parameter.
  • equipment-number: the container number. This number will be used onwards in the process. Mandatory parameter

Headers

  • externalReferenceId (optional); Your own reference (string)

Body

N/A

{
    "publicReferenceId": "GUID",
    "externalReferenceId": "string"
}

When the 200 result is returned, the call was successful and the information of the requested container will be sent to your Notification Channel(s).

{
  "publicRefernceId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "externalReferenceId": "string" 
  "portLoCode": "string",
  "equipmentNumber": "string",
  "billOfLadingNumbers": [
    "string"
  ], 
  "terminalCode": "string",
  "state": "Unknown"
}

Something in your call wasn’t what we were expecting. Please:

  • Verify if you have included all mandatory fields
  • Verify if you are following the restrictions as defined in the above fields description

The below error message will be sent to your notification channel(s)


{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string",
  "additionalProp1": {},
  "additionalProp2": {},
  "additionalProp3": {}
}

This error indicates that you do not have the rights to perform the requested action.To overcome this, please make sure that you are:

  • Registered on the Certified Pick up platform
  • You have (at least) a “Terminal” role

The below error message will be sent to your notification channel(s)


{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string",
  "additionalProp1": {},
  "additionalProp2": {},
  "additionalProp3": {}
}

Please ensure that you are using the correct endpoints (eg fill in the {portLocode} variable in the URL). If this is the case, something is probably wrong at our side. Don’t worry, we are already notified, so you don’t have to take action.

Receive and process Certified Pick up notifications

Certified Pick up uses a real-time asynchronous notification mechanism. This means that, once the right to pick up a container is submitted or transferred, a notification is sent towards the other stakeholders. (the new Release Right owner.)

Several notifications, can be received. In the notification, the “Event” field allows to identify one of the following actions:

  • create, in case the commercial release was created by the agent
  • update, in case the commercial release was updated by the agent
  • delete, in case the commercial release was deleted by the agent
  • block, in case the commercial release was blocked by the agent
  • unblock, in case the commercial release was unblocked by the agent
  • terminalRelease, in case you have released the container (should be handled as a confirmation)
  • terminalBlocked, in case you have blocked the container (should be handled as a confirmation)
  • terminalScan, in case you have indicated the container to be sent to the scanner (should be handled as a confirmation)

To setup your notification channels, you can find detailed information on our Wiki pages.

Every notification that is sent by NxtPort will be built up with a generic part, allowing integrators to identify the asset, sender, error or warning messages and a Use case or type specific body.

Generic notification fields

Field name Type Allowed values Field Description
timestamp DateTime UTC datetime stamp The timestamp when the notification was created by the Certified Pick up platform
PublicReferenceId GUID GUID Automatically generated response
externalReferenceId String String Your own reference, as provided in the request header (optional). Will be empty in case the notification was triggered by another party.
senderId String APCS code The APCS code of the owner that generated the notification. If a 3rd party triggered the event, this information will still be the owner of the original source that will be listed here.
receiverId String APCS code This should always be your APCS code as you are the receiver of this message.
asset String Free Text Name of the asset that generated the notification. For the Certified Pick up this will always be “Certified Pick up”.
id String Free Text For the Certified Pick up, this value will list the Equipment number, allowing integrators to quickly process the json message
type String Release-Right or pick up-right Will always contain Release Right
event Enumeration release, update, delete, block, unblock, terminalRelease, terminalBlocked and terminalScan for Release Lights See above
errors Array Free text list of descriptive errors and warnings in the form of USECASE_ERROR|WARNING_SPECIFIC_DESCRIPTION
warnings Array Free text list of descriptive errors and warnings in the form of USECASE_ERROR|WARNING_SPECIFIC_DESCRIPTION

Body fields for the notifications of type Release Light

Field name Type Allowed Values Field description
sender> tinNumber String TIN number The TIN (VAT) number of the entity that caused the notification. This is the number that is stored in the NxtPort entity database. Will always contain a value.
sender> name String Free text The name of the entity that caused the notification. This is the name that is stored in the NxtPort entity database. Will always contain a value.
sender> eori String EORI number The EORI number of the entity that caused the notification. This is the EORI nu,ber that is stored in the NxtPort entity database. Can be empty
releaseIdentification String Free text Unique release identification (per carrier)
releaseOrderReference String Free text Release Order Reference
equipmentNumber String Free text Container number
equipmentType String Free text In most cases, this will be “Container”
billOfLadingNumbers Array of strings Free text The unique combination of Cointainer/BL will be used for the identification of the Container Release
portLoCode String UNLocode The UNLocode of the port. For Antwerp, this is BEANR
terminalCode String Free text The terminal yard where the container will be available for pickUp.
actionType Enumeration release, update, delete, block, unblock, terminalRelease, terminalScan, terminalBlocked Identifies the action that was taken to trigger the Release Light notification.
carrier> tinNumber String TIN number The TIN (VAT) number of the carrier. This is the number that is stored in the NxtPort entity database. Will always contain a value.
carrier> name String Free text The name of the carrier. This is the name that is stored in the NxtPort entity database. Will always contain a value.
carrier> eori String EORI number The EORI number of the carrier. This is the EORI nu,ber that is stored in the NxtPort entity database. Can be empty
releaseDateTimeUtc DateTimeUTC Date Time Date from which the Commercial release will be active

expirationDateTimeUtc DateTimeUTC Date Time Date until which the Commercial release will be active. If not entered, there is no expiration date applied
errors Array Free text list of descriptive errors and warnings in the form of USECASE_ERROR|WARNING_SPECIFIC_DESCRIPTION
warnings Array Free text list of descriptive errors and warnings in the form of USECASE_ERROR|WARNING_SPECIFIC_DESCRIPTION

Notification example

{
    "timestamp": "2019-08-28T09:41:18Z",
    "publicReferenceId": "6d113ff6-4805-430f-be32-d8918fab83f1",
    "ExternalReferenceId": "your-reference-here"
    "senderId": "APCS001",
    "receiverId": "APCS002",
    "asset": "CPU",
    "id": "ABCU1234560",
    "type": "Release-Light",
    "action": "create",
    "body": {
      "sender": {
        "tinNumber": "BE0123456789",
        "name": "Shipping agent name",
        "eori": ""
      }
      "releaseIdentification": "xxxxx",
      "releaseOrderReference": "Ref001",
      "equipmentNumber": "ABCU1234560",
      "equipmentType": "Container",
      "billOfLadingNumbers": [
        "ABCUAA123456"
      ],
      "portLoCode": "BEANR",
      "terminalCode": "123",
      "actionType": "Release",
      "carrier": {
      "tinNumber": "BE0123456789",
          "name": "Shipping agent name",
          "eori": ""
      },
      "releaseDateTimeUtc": "2020-04-30T17:42:18.251Z",
      "expirationDateTimeUtc": "2020-04-30T17:42:18.251Z",
      "errors": [],
      "warnings": []
    },
    "errors": [],
    "warnings": []
}
Register your company