Versions Compared

Key

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

...

For long TC out voyages you might want to make it possible to add port calls from you vessel client. This section will explain how to do that.

To insert a port call the following API call can be used

Code Block
POST ws/rest/PortCall

{
    "port": 100949,
    "reasonForCall": "D",
    "portCallSequence": 3,
    "voyage": 8807674,
    "eventLogs": [
        { "event": "BRT", "eventLogDate": "2023-05-09T16:02:13" },
        { "event": "DEP", "eventLogDate": "2023-05-09T16:02:13" },
        { "event": "ARR", "eventLogDate": "2023-05-09T16:02:13" }
    ]
}


Field explanation:

Port
A port key. Get a list of all ports with the below API call. There are over 10000 ports. Please keep the number of requests to this endpoint as low as possible with caching. We do add new ports so if the vessel needs a newly added port it must be possible to update the cache, this will not happen often.
GET ws/rest/Port?filter=rpCode(NULL)&sort=portName(ASI)
HTTP header
disablemaxlimit: YES
Reason for call 
Any of the codes from this list.

Port Call Sequence
Should be port call sequence from last port call + 1. The port call sequence is returned in this API call to get port calls.
Voyage
A voyage key. The voyage key is returned in this API call to get port calls.

Event Logs
There needs to be one eventLog for ARR (arrival), BRT (berthing), DEP (departure). Set the dates to todays date, they will then be calculated by the server. After inserting the port call, get the list of port calls again to get the ETA, ETB and ETD calculated by the server.