This article describes how to retrieve one or more arrival, departure or noon reports.
Step 1: Get the list of available reports
As a first step, you need to get a list of all reports. The list contains the identifier (formGuid) which you need to request a particular report.
Call the GetFormDataInfoList function:
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<GetFormDataInfoList>
<body>
<apiIdentifier>
<companyGuid>{{companyGuid}}</companyGuid>
<clientGuid>{{clientGuid}}</clientGuid>
</apiIdentifier>
<timeFrameRequestFilter>
<startDate>2023-02-01T00:00:00</startDate>
<endDate>2023-02-28T00:00:00</endDate>
</timeFrameRequestFilter>
<ffFolderTemplateTypeTag>ARRIVALREPORT</ffFolderTemplateTypeTag>
</body>
</GetFormDataInfoList>
</s:Body>
</s:Envelope>
Set the following parameters:
- companyGuid: This is your company credential
- clientGuid: This is your client credential
- startDate: The begin of the time period you are looking data for
- endDate: The end date and time of the time period you are looking data for
- ffFolderTemplateTypeTag: This can be
- ARRIVALREPORT = Arrival Report
- DEPARTUREREPORT = Departure Report
- PERFORMANCEREPORT = Noon Report
The result may look like this:
The ship is identified by its IMO number (imoNumber).
Pick the formGuid to identify a particular report. In this example, the ship with the IMO number 91234567 has an arrival report with the form GUID "9a80ce4e-2f25-4ee7-ab5f-464d8c959ea3".
Note: Each report may have different revisions. The lastRevisionDate is the timestamp when the latest revision of the report has been created.
Step 2: Retrieve the report
Now, you can use the GetFormData function to lownload the report:
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<GetFormData>
<body>
<apiIdentifier>
<companyGuid>{{companyGuid}}</companyGuid>
<clientGuid>{{clientGuid}}</clientGuid>
</apiIdentifier>
<formGuid>6ca3da7e-a0e2-41a6-a0e3-6be856b0df3b</formGuid>
</body>
</GetFormData>
</s:Body>
</s:Envelope>
The result:
The variables are:
- Destination (provided for arrival and departure reports):
- name: port name
- UNLocationCode: UN Location code of the port/anchorage
- countryCode: Country code
- destinationType:
- HARBOUR = port call
- ANCHORAGE = Anchorage
- DRIFTING = Drifting
- CANAL = Canal passage
- RANGE = Range
- revisionDate = The date when the report was created
- endPeriod = The timestamp of the report
- Form data:
- value: The value
- unit: The unit
- name: The identifier of the input variable (widget)