Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
The Dataloy REST API allows for the retrieval, updating and entry of all data in Dataloy VMS.
As the Dataloy API is based on REST principles it is easy to write and simple to use when testing applications.
A typical company uses many applications, of which many or most are not designed to work with one another. Integrating separate, but related, applications help organizations achieve greater levels of operational consistency, efficiency and quality. Integration can be considered if a system generates/consumes data relevant to Dataloy VMS and/or can share data with the VMS.
Dataloy REST API uses a generic search/filtering functionality. In general, all resources supports filtering on all properties of that resource and linked resources (for exceptions, see Limitations).
The filter query parameter has the following format:
<Base URL>/<Resource>?filter=<json property>(OPERATOR)<value>
Example that will return currency information for USD:
localhost/ws/rest/Currency?filter=currencyCode(EQ)USD
For more information see Getting Started with Dataloy REST API
<Resource>
Can be any of the Resources available in the Dataloy API.
<json property>
Can be any json property of the resource (for exceptions, see Limitations).
The operator is always:
surrounded by parenthesis
is always upper case
(EQ)
Equals Exact Value, case sensitive
Get a Document with document number 2707374: Document?filter=documentNo(EQ)2707374
(NE)
Not Equal
Get all Documents not in company 1000: Document?filter=company.companyCode(NE)1000
(GT)
Greater Than
ONLY numeric and date values
Get all Voyages modified since 2014-01-01 00:00:00, not including 2014-01-01 00:00:00: Voyage?filter=modifiedDate(GT)2014-01-01T00:00:00
(GTE)
Greater Than or Equal
ONLY numeric and date values
Get all Voyages modified since 2014-01-01 00:00:00, including 2014-01-01 00:00:00: Voyage?filter=modifiedDate(GTE)2014-01-01T00:00:00
(LT)
Lesser Than
ONLY numeric and date values
Get all Documents that has document amount less than 100000: Document?filter=documentAmount(LT)100000
(LTE)
Lesser Than or Equal
ONLY numeric and date values
Get all Documents that has document amount less than 100000, including 100000: Document?filter=documentAmount(LT)100000
(IN)
Equals One of the Elements in a Given List
Get all Documents that are ready for posting and has status type INI, INO, CRI or CRO: Document?filter=invoicingStatus.statusTypeCode(EQ)RFP&filter=invoicingStatus.statusTypeCode(IN)(INI,INO,CRI,CRO)
(NULL)
Filter for NULL values
2.10
Get all Documents without business partner: Document?filter=businessPartner(NULL)
(NOTNULL)
Filter for NOT NULL values
2.10
Get all Voyages with vessel: Voyage?filter=vessel(NOTNULL)
(LK)
Like operator
3.3
Get all BunkerOrder with externalReferenceNo containing the string "test" case sensitive: BunkerOrder?filter=externalReferenceNo(LK)test
(LKIC)
Like ignore case operator
3.3
Get all BunkerOrder with externalReferenceNo containing the string "test" case insensitive: BunkerOrder?filter=externalReferenceNo(LKIC)test
(NLK)
Not like
8.5
Get all BunkerOrder with externalReferenceNo not containing the string "test" case sensitive: BunkerOrder?filter=externalReferenceNo(NLK)test
(NLKIC)
Not like ignore case
8.5
Get all BunkerOrder with externalReferenceNo not containing the string "test" case insensitive: BunkerOrder?filter=externalReferenceNo(NLK)test
Numeric Values are straight forward. Can be integers or decimal numbers using a dot as decimal point.
Dates must be specified in the format: yyyy-MM-ddTHH:mm:ss
Strings can be surrounded by double quotes, but it is generally not necessary. Even if the string has spaces.
Boolean must be specified with 0 for false and 1 for true.
The filter URL parameter can be added multiple times to filter on multiple properties in one request. To do so, add a new filter parameter to the end of the URL
<Base URL>/<Resource>?filter=<json property>(OPERATOR)<value>&filter=<json property 2>(OPERATOR)<value>
Example:
<Base URL>/Document?filter=invoicingStatus.statusTypeCode(EQ)RFP&filter=invoicingStatus.statusTypeCode(IN)(INI,INO,CRI,CRO)
Invoices ready to be transferred to accounting will be returned.
Filters can be used for sub objects by using a "dot path". Example of a sub object is commodity on Cargo:
To search for cargoes with commodity steel:
<Base URL>/Cargo?filter=commodity.commodityCode(EQ)10000
The following properties are currently not possible for filtering:
self
remarks
A few other properties are unsupported, these are documented for each resource.
Cargo
Get Cargo with freight more than 1000000 and freightCurrency USD or EUR:
/Cargo?filter=freight(GT)1000000&filter=freightCurrency.currencyCode(IN)USD,EUR
Document
Get Documents with documentType "INV" and invoicingStatus "PEN"
/Document?filter=documentType.documentType(EQ)INV&filter=invoicingStatus.statusTypeCode(EQ)PEN
Voyage
Get Voyages for the vessel with vessel code ABRA
/Voyage?filter=voyageHeader.vesselCode.vesselCode(EQ)ABRA
Get Voyage with reference number VES100
/Voyage?filter=voyageHeader.referenceNo(EQ)VES100
Get Voyage with start date > 01.01.2016 and operator is user with userCode "BAK"
/Voyage?filter=voyageHeader.voyageStartDate(GT)2016-01-01T00:00:00&voyageHeader.operator.userCode(EQ)BAK
Get Voyages that are operational for vessel ABRA
/Voyage?filter=voyageHeader.voyageStatus.statusTypeCode(EQ)OPR&filter=voyageHeader.vesselCode.vesselCode(EQ)ABRA
Get all Voyages that has Oslo as Load Port in 2015
/Voyage?filter=portCalls.reasonForCall.reasonForCall(EQ)L&filter=portCalls.port.portName(EQ)OSLO&filter=voyageHeader.voyageStartYear(EQ)2015
Getting Started with Dataloy REST API (Application Programming Interface) provides an introduction to the Dataloy API directed towards developers and IT-personnel. Basics, such as how to obtain, submit and modify data, are explained.
Dataloy’s API uses a REST interface over HTTP/HTTPS. The currently supported payload is application/JSON.
Follow the below steps - they will return USD currency from Dataloy VMS (illustrating that the API works properly):
For POST and PUT requests, the payload must be JSON and the Content-Type be set to application/JSON.
Base URL
The base URL is customer-specific. To obtain the IP-address and port for the specific API installation, please contact Dataloy.
IMPORTANT: All URLs in this documentation is relative to the root URL stated below. The HTTP method will be written in front of the relative URL: Note: The root URL should NOT be hardcoded in your application to allow it to run against multiple servers. The "/ws/rest" part may also change in the future.
Example: When the documentation refers to /Cargo, the full URL is https://[ip]:[port]/ws/rest/Cargo.
Resources (for example: Voyage, Document, ExchnangeRate), have a similar general URL structure. Example: In the table below "/Entity" represents the name of an entity type like "/Cargo" or "/Voyage".
Relative URL
Methods
Description
GET, POST
Represents the collection of entities of the given type.
GET will return a filterable array of entities of that type.
These entities will be "minimized" and sometimes contain only the "key" and "self" properties.
POST will insert a new entity of that type into the collection.
GET, PUT, DELETE
Represents a single entity of the given type, identified by "key".
GET will return the full representation of that entity.
PUT will update the given entity. A PUT request may contain only the changed properties, and will return the full object after the change. From API version 3, PUT will also update Sub-objects, previous versions are limited to object by object updating. For API versions prior to version 3, Sub-objects should NOT be included in PUT requests.
DELETE will return 200 OK and an empty body when successful. Not all entities can be be deleted.
Dataloy's API return HTTP status codes in the HTTP header and provides additional information in the body in JSON format.
This example has been updated for API version 2.0.0 using date format yyyy-dd-MMThh:mi:ss to conform ISO 8601, versions prior to 2.0.0 has the following date format: yyyy-dd-MM hh:mi:ss
Information is retrieved by using a GET request on a URL. Each resource has it’s own URL. The API also supports searching resource specific parameters.
GET request on a URL:
Example: The following GET request on example URL will return the document with ID 2729538.
https://server.com/ws/rest/Document/2729538
Dataloy API is equipped with a strong generic filtering functionality. It is able to filter on almost any field visible in the API and filtering any resources returning an array of objects (see Filtering).
Use PUT to modify data through the API. Specify the URL of a resource and send the content to be modified in the body of the HTTP call. A successful PUT will return the same body as a GET on that resource. Excluded properties will be ignored. Excluded array elements will be removed. From API version 3, PUT will also update Sub-objects, previous versions are limited to object by object updating. For API versions prior to version 3, Sub-objects should NOT be included in PUT requests.
Examples:
Updating properties for a main object. In this case VoyageHeader
Updating properties for a sub-object. In this case, Voyage is the main object and Cargo is the sub-object
Insert an array element
Update an array element by including the key for the array element. The key is generated by the API when inserting a new element.
Insert a second array element by including the key for the first array element. Then add a second array element without a key.
Remove an array element. When having two elements in an array, you can remove one of them by removing the element in the PUT body
Inserting (POST) or updating (PUT) references to sub-objects can be done in different ways: (All the examples below is using VoyageHeader as a main object and the specified company will be linked to the VoyageHeader.)
Specify the key to an existing sub-object
All existing objects has a key that is created by Dataloy API. This can be used for linking an existing object to another object.
Specify the code to an existing sub-object
A lot of the objects in Dataloy API has an unique code that can be used for identifying an object. This code can also be used for linking an existing object to another object.
Specify the sub-object
Another option for linking a sub-object is to provide the object to be linked.
Create a new object
The last option is to create a new sub-object and link it to a object in the same request. When excluding the key property a new object will be created.
Send a POST request to a base resource URL with a body conforming with the minimum requirements of that resource.
Example: POST request URL:
https://ip:port/ws/rest/Document
All the dates are in the format yyyy-dd-MMThh:mi:ss to conform ISO 8601
Body of Document HTTP POST
The following fields exist for all Dataloy VMS API resources:
Field Name
Description
key
The ID of the entity. This can be used to:
request that entity at a URL of the form /Entitytype/{key}
or to represent the entity in a POST or PUT request
The full URL of the entity.
modifiedDate
Last Modified Date
Object Changed by User or Recalculated by System
createdDate
Date for Object Creation
Defines the code property of a resource. The value is the name of another property which can be used to identify the resource and is, in many cases, functionally equivalent to the "key" propery.
Note: Not all resources have a codeProperty.
Example:
When setting a currency either an invoice the key (ID) of that currency or the currencyCode (i.e. the codeProperty of Currency) can be used.
createdById
User key of the Dataloy VMS user that created the resource instnce initially.
changedById
User key of the Dataloy VMS user that updated the resource instance.
remarks[]
Array of remarks connected to the resouce instance
From version 2.0.0 the date format has been changed to conform ISO 8601:
yyyy-MM-ddThh:mm:ss Example: 2014-01-01T00:00:00
Versions prior to 2.0.0:
Date format for JSON messages: yyyy-MM-dd hh:mm:ss Example: 2014-01-01 00:00:00 Date format for filtering: yyyy-MM-ddThh:mm:ss Example: 2014-01-01T00:00:00
A quick introduction to REST is available at http://www.infoq.com/articles/rest-introduction.
JSON is a text format that is natively supported by Javascript. It is less verbose than XML and is easier for users to read. JSON is not written in order, so fields might change position between calls. A quick introduction: http://www.json.org/
Several tools are available to aid the testing of the API. This enables a payload to be sent to a URL with a specific type of request, for example, GET, PUT, POST.
Examples of available tools (but NOT limited to):
Chrome:
Advanced REST client: https://chrome.google.com/webstore/search/advanced%20rest%20client
Firefox:
Note: Dataloy recommends tools like JSONView to Chrome (to browse the API more conveniently when developing).
Documentation of API resources is currently in progress. Presently the reference documentation is manually updated. (More Information: Accounting Integration API).
It is possible sort the result of any search. The following type of sorting are supported:
ASCENDING (ascending order, case - or database sensitive)
ASCENDING INSENSITIVE (ascending order, case-insensitive)
DESCENDING (descending order, case - or database - sensitive)
DESCENDING INSENSITIVE (descending order, case-insensitive)
ASCENDING
http://localhost:8080/ws/rest/Vessel?sort=vesselName(AS)
ASCENDING INSENSITIVE
http://localhost:8080/ws/rest/Vessel?sort=vesselName(ASI)
DESCENDING
http://localhost:8080/ws/rest/Vessel?sort=vesselName(DS)
DESCENDING INSENSITIVE
http://localhost:8080/ws/rest/Vessel?sort=vesselName(DSI)
It is possible use sorting in combination with any filter and pagination:
Authentication and authorization is done through OAuth 2.
To get access to the protected resources OAuth 2.0 uses Access Tokens. An Access Token is a string representing the granted permissions.
To access to Dataloy API, you must request an Access Token.
To obtain an access token you need to do a POST request, to the provided URL, passing the client id and client secret in the payload
Example of POST payload to token URL
grant_type
Set this to "client_credentials".
client_id
Your M2M Client ID.
client_secret
Your M2M Client Secret.
audience
The audience for the token, which is your API. For production environments use "https://dataloy". For test and DEV environments use "https://dataloy.dev"
If all goes well, you'll receive an HTTP 200 response with a payload containing access_token
, token_type
, and expires_in
values:
To call an API endpoint you must pass the retrieved Access Token as a Bearer token in the Authorization header of your HTTP request.
curl https://{URL}/ws/rest/{Resource}-H "Authorization: Bearer eyJ.........qLbZQ"
When an endpoint is invoked with an expired token the server sends a HTTP 401 response with the following payload:
The client should not ask for a new token for each call but use the same token as long as it is valid.
It is possible to adjust the number of fields that have to be returned from a resource. It's possible to both increase and decreases the number of fields from the default view. So if only field A and B from a resource is needed and the other X number of fields can be ignored, it can be specified in the header of the request. This will reduce the overhead of data transferred and improve performance. If more fields are needed in one request, to avoid making a second request to get all the data that is needed, this can also be done. So if fields A, B and C are returned in the default view, but also field D is needed, this can be specified in the header.
Retrieving data from a resource may provide more information than needed. Fields with data to be returned can be specified by first adding a header field and then specifying the fields to be returned in the header field value. The header field value is specified as a JSON message following the same structure as the resource structure that is used when making the request. This enables fields to be specified in main- and sub-objects.
The examples listed illustrate how it is used for a business partner. The procedure is, however, the same for all resources. The key and self attribute will always be returned, but the number of displayed/hidden fields can be customized.
Business Partner without any field restriction will result in ( view example):
Examples
1. Return Business Partner name only:
fields: {"businessPartnerName":"*"}
2. Return address1 only:
fields: {"addresses": {"address1":"*"}}
Note that addresses is an array, but for the fields value it should be treated as a field, so do not include [ ]
3. Return Business Partner name and address1:
fields: {"businessPartnerName":"*", "addresses":{"address1":"*"}}
4. Return all BusinessPartner and its BusinessUnit fields:
fields: {"all":"*", "businessUnit":{"all":"*"}}
To return a defined number of objects for any Dataloy resource it has to be specified in the URL the page number, pageNumber parameter, and the number of objects that the page has to contain, limit parameter. For example:
/ws/rest/Document?pageNumber=1&limit=10&filter=documentAmount(GT)100000
it will return the first page containing at max 10 Document objects having the property documentAmount greater than 100000. In the response will be added an header parameter called totalObjectsNumber that indicates the total number of objects of the endpoint.
From API 5.18 is possible to avoid to get totalObjectsNumber sending the HTTP header parameter noCount = YES, this will allow a bit better performance.
Another example:
/ws/rest/Vessel?filter=flag.countryCode(EQ)HK&pageNumber=4&limit=10
it will return the fourth page containing at max 10 Vessels objects having the countryCode property equals to EQ.
Get updates for nominated and operational voyages in Master scenario:
Get notification when an invoice is posted and ready to be transferred to accounting. Set the status to Posted when it's transferred to accounting. For more information about accounting integration see: https://dataloy-cloud.atlassian.net/wiki/spaces/VMSINT/pages/923414837
Get notified when accruals are posted and and ready to be transferred to accounting. Set the status to Posted when it's transferred to accounting. For more information about accounting integration see: https://dataloy-cloud.atlassian.net/wiki/spaces/VMSINT/pages/923414837
Webhooks are user-defined HTTP callbacks that receive events for the subscribed event types. Webhook notifications are asynchronous, the order is not guaranteed.
Events are categorised into event types. Events occur due to changes in the state of a resource, such as when a voyage is updated. When an event occurs, the registered applications are notified via HTTP POST. The POST contains the event details, including the event type that caused the event.
When an application receives the event, it must respond with a 200-level HTTP status code.
When a webhook subscription is made, through the resource WebhookSubscription, for a Dataloy object, BunkerOrder for instance, the subscribed webhook will be pushed with all the changes that occurred to the subscribed object and its object hierarchy. So if a PortCall of the subscribed BunkerOrder is updated the webhook will be notified.
The Remarks are not part of the webhook process. It is not possible to get notifications of changes in Remarks.
The Dataloy webhook event type is a concatenation of the following attributes:
Resource name (Document, Voyage, ..)
Operation type (C,U, D create, update, delete)
Object key
The user can subscribe to a webhook for a given event, for example:
Cargo.C
Notifies when a Cargo is created
Document.D
Notifies when a Document is deleted.
Voyage.U
Notifies when a Voyage is updated.
Voyage.U.793628
Will notify when voyage, having voyage.key = 793628, is updated.
Automatic Deactivation of subscription
If the subscribing system is unavailable or takes too long to respond, the server will deactivate the subscription after attempting 5 times (once a minute). The number of attempts and the interval between each attempt can be configured.
Deactivated subscriptions cannot be reactivated, a new subscription must be created if needed.
Email alert when a subscription is de-activated: Add the desired email address (e.g. to the IT ops team) to the API user (in User Administration) to receive an email notification if a subscription is de-activated.
The message sent to the subscribed endpoint is set in the body of the POST method. The message is a JSON object and has the following structure:
The attributes have the following meaning:
id
Unique identifier of the notification
eventTime
The time when the event occurred
objectType
Name of the changed Dataloy object
dataloyObject
The primary key of the changed Dataloy object (it can be different from the subscribed object, it can be an object in the hierarchy of the subscribed object )
eventType
C for creation, U for update, D for deletion
dataloyObjectSelf
the Dataloy URL of the changed object
subscription
Subscription data:
resource
The JSON of the DataloyObject that the subscription refers to
With API 3.9 the following new functionalities have been introduced:
Possibility to be notified of changes via email
Possibility to customize the JSON pushed as Adjust Number of Fields to be Returned from a Request
Possibility to filter changes that have to be pushed via expressions
Possibility to filter changes that have to be pushed via scripts
To be notified via email in the WebhookSubscription must be specified the channelInfo property with channelType EMAIL and the URL with the email address:
channelType can be EMAIL or HTTP if HTTP is set the URL attribute must contain the endpoint where to push notifications.
Through the attribute JSON of WebhookSubscription is possible to specify which attributes of the object must be pushed (see Adjust Number of Fields to be Returned from a Request). The value of JSON must be encoded with Base64.
For instance, if the subscription is for the object BunkerOrderLine a possible value for the JSON attribute could be:
that encoded will be
In this way the sub-object in the attribute resource will be smaller:
Through the attribute expression of WebhookSubscription is possible to write a Java expression against the object changed. At runtime If the expression return true the notification will be sent, otherwise no.
For instance, if the subscription is done for the object BunkerOrderLine a possible expression could be:
dlpObject.getUnitPrice()!=null
&& ( dlpObject.getUnitPrice()>10
|| dlpObject.getUnitPrice()<100)
that for any changes at any BunkerOrderLine object will check if the unit price is not null and its value is between 10 and 100, if yes the notification will be sent.
In the expression must be used the variable dlpObject to refer to the changed object, the object will contain the new values. If the expression needs to check also the previous values of the object, the variable oldDlpObject can be used.
For instance:
oldDlpObject.getExtraCost()!=null
&& dlpObject.getExtraCost()!=null
&& dlpObject.getExtraCost()> oldDlpObject.getExtraCost()
that will check if the new extra cost of a BunkerOrder is greater than the previous one.
If you want to be notified when an attribute change value from null to not null:
oldDlpObject.getReferenceNo() == null
&& dlpObject.getReferenceNo() != null
The old values will be accessible only for those Dataloy object changed via Dataloy API.
Contact Dataloy to have info regarding scripts.
In version 3.16 (and later) it is possible to decide if a webhook subscription should only be notified on changes to the object subscribed. So for instance making a subscription for the Voyage object, the changes that will occur to linked objects, like PortCall, Cargo, etc, will be not notified. To achieve this behaviour a new boolean attribute called onlyMainObject in WebhookSubscription has been added, setting it to true only the changes for the subscribed will be sent.
A new endpoint in WebhookSubscription POST:sendFailedNotifications has been added to resend manually the failed webhook notification.
In version 5.23 (and later) it is possible to decide if a webhook subscription should only be notified with the raw object, without the envelope payload. To achieve this behavior a new boolean attribute called rawObject in WebhookSubscription has been added, setting it to true the raw object will be sent.
A new attribute xsl has been added which allows you to store an XSL stylesheet to transform the subscribed object to XML. The value of the field must be encoded with Base64. This is part only of Enterprise API.
In order to not get notified by the changes done by the user of the subscription the attribute notSendMyChanges can be set to true.
GET /WebhookSubscription
Get a list of WebhookSubscription objects. Filter to avoid huge amounts of data (see Filtering documentation for examples).
GET /WebhookSubscription/{key}
Get a single WebhookSubscription object.
Example GET Return Body
since API 3.9:
POST /WebhookSubscription
Create a new WebhookSubscription.
Examples
Create a subscription to get notifications when the BunkerOrder with primary key 243896793 is updated:
Create a subscription to get notifications when any BunkerOrder is updated:
Create a subscription to get notifications when a BunkerOrder is created:
Create a subscription to get notifications when the BunkerOrder with primary key 243896793 is deleted:
Create a subscription to get notifications when any BunkerOrder is deleted:
Create a subscription to get notifications when any BunkerOrder is updated via email, since API 3.9:
Create a subscription to get notifications only when a Voyage object is changed, since API 3.16:
PUT /WebhookSubscription/{key}
Only the following attributes can be updated:
unsubscribed
url
webhookUsername
webhookPassword
Since API 3.9 is possible to change also these other attributes:
channelInfo
json
expression
dlpAlertScript
scriptParameterValues
useMsg
To unsubscribe a subscription the following JSON must be sent. It is not possible to update the subscription if it has been unsubscribed:
DELETE /WebhookSubscription/{key}
To delete a WebhookSubscription first it has to be unsubscribed. It is not possible to delete WebhookSubscription that got Webhook notifications, regardless that it has been unsubscribed or not.
The Dataloy VMS API documentation is intended as the main source of information and answers to queries and issues regarding integration with Dataloy VMS. It provides an overview of how integration with Dataloy VMS may be accomplished and detailed information about each type of integration.
High focus has been placed on quality of standard, substance and user-friendliness. The API knowledge base is kept continuously up-to-date. There is also a questions & answers section and a troubleshooting article section..
To search/navigate either click the links below or use the left-hand navigation panel to search by keyword, category or hierarchy.
API:
Questions & Answers, Troubleshooting Articles:
Since API 3.3 Remark has a new attribute attachments that contains a list of Attachment objects. The Attachment resource has an attribute called file where can be stored the content of the file encoded in Base64.
The attribute fileName is mandatory, the attribute "filesize" is not mandatory but the client should pass it.
The two resources can be manipulated exactly as all other resources.
When a new Remark is posted with attachments in the JSON the source field must be before the attachments field.
When getting an attachment, data can be encoded in base64, but also unencoded. Attachments added from the API will be encoded and attachment added from the Java VMS client may be unencoded.
Some examples
Create a new remark with a file attached:
POST: http://{URL}/ws/rest/Remark BODY:
Attach an Attachment to an existing Remark
PUT: http://{URL}/ws/rest/Remark/244324058 BODY:
The objective of accounting integration is to automate the creation and flow of transactions between the Dataloy VMS and an accounting system. The advantage is, for example, reduced risk of errors as several transactions handled by the Dataloy VMS system generates transactions to be entered in a client accounting system. An integration also allows for synchronizing the basic data entities (or Master Data, i.e. several of the same being stored and maintained in both systems) between systems. Some Master Data, for example, Business Partners, must be synchronized for the integration to work.
Accounting Integration Transactions
Transactions from Dataloy VMS to Accounting:
Sales and purchase invoices are transferred whenever an invoice/invoices is/are posted in the VMS.
Bunker transactions are transferred whenever a bunker transaction is posted in the VMS.
Vessel/Voyage information is sometimes required by Accounting before invoices and/or bunker transactions are transferred. A scheduled task for transferring this type of information to Accounting can be set up (contact Dataloy for more information).
Accruals will be transferred by users when performing period-end-closing (more information: Accruals page and the Period-End-Closing process).
Transactions from Accounting to Dataloy VMS:
Receipts and payments being transferred from Accounting to Dataloy VMS. The transaction to collect and payments and send to the VMS is either triggered by Accounting or by a scheduled task (set up by Dataloy Systems).
Exchange rates will be transferred from Accounting to Dataloy VMS. This transaction is either triggered by Accounting or by a scheduled task (set up by Dataloy Systems) to collect and retrieve the rates.
Actuals is part of the Period-End-Closing process and is usually transferred from Accounting to Dataloy VMS.
The endpoint AuditLog (https://dataloy-systems.stoplight.io/docs/dataloyModel/model/schemas/audit-log) can be used to get all changes of any object in the data model.
To get the changes of a given object with key KEY_X:
{BASE_URL}/ws/rest/AuditLog?filter=source(EQ)KEY_X
In the same request send the HTTP Header parameter fields with this JSON
The response will be an array of AuditLog objects:
The endpoint AuditLog can be used to know all the objects that have been deleted:
/ws/rest/AuditLog?filter=action.actionName(EQ)REMOVE
in combitation with other filters and the HTTP Header parameter fields with this value:
{"entryText":"*","user":"*","actionTime":"*"}
return a response like this one:
where in the field entryText there is the object type and object key that has been deleted-
It is possible to activate and deactivate any Master Data object. A new property has been added for this purpose, isObjectActive.
To deactivate an object the following JSON has to be used in the PUT method:
To activate an object the following JSON has to be used in the PUT method:
Master Data objects has to be deactivated before they can be deleted.
Integration Set-Up
When a payment is registered in the accounting system, it should be transferred as applicable to the Posted sections of either the Accounts Payable or the Accounts Receivable modules (where the matching invoice/s can be found) in Dataloy VMS.
Since a payment in accounting systems may cover multiple Dataloy VMS payments/receipts, extracting payments from accounting means extracting invoices matching to a payment. Only payments/receipts records with a matching invoice in the applicable accounting system and with a required reference to a Dataloy invoice are to be extracted.
In Dataloy VMS all payments must match with the referenced invoice. To insert a payment/receipt in Dataloy VMS use the request under Data Transaction (below).
Data Transaction
A payment record should ONLY ever have one document line. Never more.
Amount Prefix
This matrix is showing which prefix the payment amount should have for the various cases.
Accounts Payable and Hire Payable
Accounts Receivable
Receipt (PMI)
Positive Amount
Negative amount
Payment (PMO)
Negative Amount
Positive Amount
To Post a Payment/Receipt to Dataloy VMS:
Certain integrations need to be in place before the set-up and testing of an invoice integration:
Transfer of voyage related data to the accounting system.
Synchronization of business partners between Dataloy VMS and the accounting system.
Exchange rate transfer to Dataloy VMS.
Map accounts between Dataloy VMS and the accounting system.
When invoices are posted in Dataloy VMS, the document status is automatically set to Ready-for-Posting. Set up a scheduled task and use the request under Data Transaction to extract invoices and credit notes that are ready for posting. When an invoice is transferred to accounting, update the status to Posted.
To reverse a posted invoice you need the document key and POST as in the example below
To dissolve an assembled invoice you need the document key and POST as in the example below
To get invoices that are ready for posting in Webhooks the following subscription can be created:
Alternatively, a scheduled job can be set-up to use the following request:
GET /Document?filter=invoicingStatus.statusTypeCode(EQ)RFP&filter=documentType.documentType(IN)(INI,INO,CRI,CRO)
There will be only one Document object in the API despite two payment terms for an invoice (for example 95/5 percent). However, the Document will have two documentPaymentTerms objects in the Document.documentPaymentTerms list.
To create two documents when integrating:
Loop on paymentTerms and create one document for each payment term.
Calculate the following values:
dueDate: document.documentPaymentTerms.dueDate
documentAmount: document.documentAmount * document.documentPaymentTerms.percentage / 100
companyCurrencyAmount: document.companyCurrencyAmount * document.documentPaymentTerms.percentage / 100
sourceCurrencyAmount: document.sourceCurrencyAmount * document.documentPaymentTerms.percentage / 100
Test data for invoicing integration can be generated in the Dataloy VMS post fixture modules (Accounts Receivable, Accounts Payable and Hire Payable).
When an invoice is successfully transferred to an accounting system, the document status must be updated to Posted in Dataloy VMS. This is done in a PUT request:
The user need not know the attribute names in order to use an expression and will have the possibility to select an attribute from the list of attributes on the given objectType in the subscription and can chose the operators from the list of operators.
This is achieved by the use of special characters as listed below-
using . (Dot) in the expression field will list all the sub objects for the given object type. The list of attributes will be filtered based on the characters typed
$(dollar) will list the operators that can be used
using old or ,(comma) will enable the use of oldDlpObject in the expression
For example, instead of using this in an expression
a simple of achieving this would be to use
The need for the user to create expressions with null checks for the objects is also removed and will be taken care by the platform. Expressions will work the same way if the object is checked for null or not. For example both of the below shall work the same.
Refer Create Expression Webhook Subscription for more details about creating an expression subscription in vms
A new attribute, called doNotUnsubscribe (type boolean), has been added to prevent that the subscription will get unsubscribed, also if the endpoint is not reachable for more time of the max time of attempts set for the given server.
Webhooks is moved out from Setup to Alerts Menu Item on VMS web
Alert menu item has two inclusions - Webhooks and Notifications
Webhooks - shows the list of subscriptions made by the user if the user is a non-administrative role and shows all the subscriptions in the system for an administrator user
Notifications - shows the list of Notifications for all the subscriptions visible for the user.
Clicking one of the rows in webhooks, opens the webhook subscription drawer with three tabs - Overview, Notifications and Comments
While Overview has some new additions to it, Comments remain the same from before.
Notifications tab in the subscription drawer includes the list of notifications filtered for the selected subscription. From 6.10.0, this list is updated to be similar to the other lists on VMS web with enabled filters and sorting.
Further clicking on one of the rows in the notifications list on subscription drawer, we can see the details of the Notification Msg sent for the subscription along with the error msg if the msg sending failed.
Holds the list of notifications for those subscriptions which the user has access to.
Administrator can access all the notifications for all the subscriptions available in the system, while non admin users can access only the subscriptions for the given logged in user. For example,
The possibility for the user to define a message template that should be used when sending notifications for a webhook subscription is introduced.
In order to use this, the user when creating a webhook subscription should provide the necessary input to the field/attribute “templateMsg". Make sure the placeholders are indicated by a '?' followed by the field/attribute directly accessible from the root object type on which the subscription is being made.
For example, when creating a subscription on Bank object , the user can use template_msg like ‘Bank with Name ?bankName is changed by ?changedById’ .
This would result in the below notification for the user (example data, for reference only)
Invoice Integration needs to be in place before setting up and testing actuals integration.
Transfer of actuals (or physicals) from Accounting to Dataloy VMS can either be setup as a manual task through the Period-End-Closing Process or as a scheduled task. Actuals in accounting are actual costs and revenues, and once entered into Dataloy VMS, the actual record will appear in the Posted section of the Accruals module. Bunker transactions in Accounting that has been transferred from Dataloy VMS are not to be transferred, as they are already treated as actuals in Dataloy VMS (more information: actuals and accruals page and the Period-End-Closing process.
To insert an actual in Dataloy VMS:
An actual record should ONLY ever have one document line. Never more.
The document date should be the first day of the period month.
Client can choose to insert actuals one by one or group actuals by period, currency, voyage, account and company
Set a unique document number (documentNo).
Use request:
Updated for API version 2.0.0 using the new required date format yyyy-dd-MMThh:mi:ss to conform ISO 8601, (prior versions has date format: yyyy-dd-MM hh:mi:ss).
Post an actual to Dataloy
No post transaction is required.
No prerequisites.
Accounting systems often require voyage related data before transferring accounting related transactions. Set up a scheduled task and use the request under Data Transaction to gather all voyages that has been modified since the last time a scheduled task was run.
Modify some existing voyages in the Booking and Operations module for testing, for example, changing a date in the schedule (note: changing dates will also affect the schedule for other voyages).
To get new voyages in Webhooks the following subscription can be created:
To get updated for all changes on a voyage the following webhook subscription can be created:
To extract all fixed voyages from Dataloy VMS that has been modified since a given date, use request below in conjunction with the base URL:
Get all fixed voyages modified since given date
No post transaction is required.
Before setting up and testing a bunker transaction integration other integrations need to be in place.
When a bunker transaction is posted in Dataloy VMS, the document status is set to Ready-for-Posting. Set up a scheduled task and use the request under Data Transaction to extract bunker transactions that are ready for posting. When a bunker transaction is transferred to accounting, update the status to Posted.
Test data for bunker transactions can be generated in Booking and Operations > Bunkers-FO tab > Bunker Transactions.
To get bunker transactions that are ready for posting in Webhooks the following subscription can be created:
Alternatively a scheduled job can be setup to use the following request:
Get bunker transactions that are ready for posting to accounting
GET /Document?filter=invoicingStatus.statusTypeCode(EQ)RFP&filter=documentType.documentType(EQ)ACC
Post Transaction
When an invoice is successfully transferred to the accounting system, the document status has to be updated to Posted in Dataloy VMS. This is done in a PUT request:
Update status to posted for a specific invoice
An exchange rate source for extracting data to be inserted in Dataloy VMS.
Base Currency must be set. Note: Locate Base Currency by getting ws/rest/System/1000000, then following relevant country link (Country Currency = the Base Currency).
Set up a task for extracting exchange rates from either an accounting system or from a source delivering exchange rates service. Then insert the exchange rate into Dataloy VMS using the request under Data Transaction (below).
To insert an exchange rate in Dataloy VMS (fields required):
Updated for API version 2.0.0 using the new required date format yyyy-dd-MMThh:mi:ss to conform ISO 8601, (prior versions has date format: yyyy-dd-MM hh:mi:ss)
Post an exchange rate to Dataloy
Post Transaction
No post transaction is required.
When inserting data that in the end will result in an account payable, you might want to post the invoice directly. This can be done with a couple of API calls.
To generate invoice lines you need to know the key of the voyage that your data relates to. If you dont have the voyage key already you need to get it from the API either by getting it at an earlier stage in your integration or with a separate call in this stage. If you for instance already have the port call key you can get the voyage key by doing a GET request on PortCall.
To generate invoice lines post the below request, where key is the voyage key. For multiple voyages, add multiple keys.
Then get the new invoice lines, called document lines in the API
The below endpoint will give you data that can be used when assembling the invoice. Like bank account, issuing company and so on. If you already have the data you can skip this step.
Assemble the invoice with this request
Mandatory fields: documentText, documentDate, issuingCompany, bankAccount, baseLineDate, baseLineTerms, dueDate, paymentTerms and percentage.
If payment terms percentage is 100%, there should only be one entry in documentPaymentTerms
BaseLineTerm is customer specific and needs to be agreed with customer. The baseline terms can be found at /ws/rest/BaselineTerm
PaymentTerms is customer specific and needs to be agreed with customer. The payment terms can be found at /ws/rest/PaymentTerms
The request will return the new invoice, called Document in the API. Keep the Document key to post the document in next step.
The final request will set the status to ready for posting which will cause accounting integrations to pick up the invoice and transfer it to accounting. The Document key is returned the assemble response in previous step.
Synchronization of business partners between Dataloy VMS and the applicable accounting system is required before transferring accounting related transactions. To synchronize business partner updates between systems, decide which system is to be the Master System (where the business partners will be updated). The Master System will then send updated business partner data to the other system.
Dataloy VMS used as master:
Dataloy recommends setting up up a Webhook. As an alternative, setup a scheduled job and use the request under Data Transaction (below) to gather all business partners data having been modified since the last time a scheduled task was run.
Dataloy VMS is not used as master: Use the requests under Data Transaction (below) to insert and update the business partners in Dataloy VMS.
Webhook
Setup Webhook subscriptions for BusinessPartner, Address and ContactInfo. From Address and Contact info there is a reference back to the BusinessPartner key in the source field.
Scheduled Job (If Webhook is not an option)
Extract the business partners whose data has been modified since a selected date from Dataloy VMS using the following request in conjunction with the base URL:
Get business partner information
Set up a scheduled job and gather all voyages that have been modified since the last time a scheduled task was run.
Check if relevant business partner/s is/are already existing in Dataloy VMS by using the following request in conjunction with the base URL:
Get business partner by key
BusinessPartner API documentation
Note: Use the Bank key if the Bank already exists. The below example is showing how to insert a new Bank when inserting a BusinessPartner
Inquiries can be sent to
Create a Voyage with a Loading and Discharging PortCall with one Cargo with a Loading and Discharging CargoPort.
Creating a new Cargo with a Loading and Discharging CargoPort and PortCall. The PortCall objects have EventLogDates that specify Arrival, Berthing, Un-berthing, and Departure dates.
Adding to a Cargo a new Loading or Discharging CargoPort and PortCall
Fixing the date on an EventLog object. Note, only EventLogs with EventLog.EventLogDate from the past can be fixed, otherwise, the returned value of isDateFixed will be false.
The objective of the Service Order integration is to trigger the ordering of port related services and receive updates on estimated, revised and actual cost from parties handling the orders. The costs are internally assigned to the correct port call, vessel and voyage and processed further inside the VMS.
Note: Recommended before proceeding - read: Getting Started with Dataloy REST API.
The endpoints for the Port Service Order process are:
.
.
.
ServiceOrder objects are created by Dataloy VMS with the status Draft, status code DFT.
The integration should use Webhooks to be notified when a new ServiceOrder object is created.
POST.WebhookSubscription:
The JSON sent, when a service order is created, will have this structure:
It is possible to be notified only by the raw object, in this case the WebhookSubscription has to have the following property:
In this case the JSON sent will be like this:
The fields property to customize the messages must be encoded with Base64 and set in attribute json of the WebhookSubscription
If the integration want to be notified also when there are changes to the PortCall connected with the ServiceOrder, a WebhookSubscription like this should be POST:
where “dataloyObject“: 3644213 is the PortCall key.
To add a new line to a a order:
Starting from 7.3.0, invoices can be automatically posted. Ensure your changes are invoiced accurately by including the autoPost = true
HTTP header in your PUT requests.
Service Order statues
Draft, DFT
Estimated, EST
Revised, REV
Final, FIN
Cancel, CAN
Service Order status transitions
Service Order status transitions when Agent nomination is enabled
Before setting up and testing an invoice integration other integrations need to be in place:
When accruals have been verified and posted in Dataloy VMS, the document status is set to Ready-for-Posting.
More information, go to and .
To get accruals that are ready for posting in the following subscription can be created:
Alternatively, a scheduled job can be setup to use the following request:
Get accruals and accrual reversals that are ready for posting to accounting
When an accrual is successfully transferred to an accounting system, the accrual status must to be updated to Posted in Dataloy VMS. This is done in a PUT request:
Update status to posted for a specific invoice
Bank Fields List
PositionReport is used to update the status of an ongoing voyage's port calls.
Position reports update a port call's sailing, arrival, in port, and departure status. Most fields in the PositionReport object will only provide information, while a few affect the port call's results.
The following fields will affect the port call's results:
eventLogs
An captures port events along with their dates and times. The port events include ARRIVAL, BERTHED, UNBERTHED, and DEPARTURE. To record the arrival date of a port call, an event log entry should include the ARRIVAL event along with the corresponding date.
An EventLog is also linked to ROBs to communicate the Remaining on Board (ROB) of a specific bunker during a specific event. For instance, the of Fuel Oil (FO) on arrival will be specified by having the robs
field on the arrival event log entry, containing the key of the FO bunker category.
Fields impacting the port call's results will have Major Change Factor marked as yes, along with a description, on the .
PositionReport can be one of these types:
Noon Report
logs the ship's status at sea, updating the estimated arrival date and ROB info
Arrival Report
logs when the ship arrives in the port, fixing the arrival date and ROB info
Berth Report
logs when the ship has berthed in the port, fixing the berthed date and ROB info
Unberth Report
logs when the ship has unberthed in the port, fixing the unberthed date and ROB info
In Port Report
logs supplementary information such as hours in service, weather, wind direction and average wind direction when the ship is docked.
Departure Report
logs when the ship leaves the port, fixing the departure date and ROB info
The integration can change an existing Service Order through HTTP PUT, see , .
PUT:{ServiceOrder_key}
Test data for accruals integration can be generated in the module in Dataloy VMS. Generate and batch post the accruals.
In order to include a on the position report, a separate API request must be made after the report is created. See for an example.
An example of the response could be found
Example of the response can be found
Example response can be found
Example of the response can be found
GET /Document?filter=invoicingStatus.statusTypeCode(EQ)RFP&filter=documentType.documentType(IN)ACP,ACR
Document Status Code
Document Status Description
Description
PEN
Pending
Invoice is in the Pending section of either Accounts Payable (AP), Accounts Receivable (AR) or Hire Payable (HP) in Dataloy VMS.
INV
Approval
Invoice is in the Assembled section of either Accounts Payable (AP), Accounts Receivable (AR) or Hire Payable (HP) in Dataloy VMS.
RFP
Ready-For-Posting
Invoice is in the Posted section section of either Accounts Payable (AP), Accounts Receivable (AR) or Hire Payable (HP) in Dataloy VMS, but has not yet been transferred to an accounting system.
POS
Posted
Invoice is in Posted section of either Accounts Payable (AP), Accounts Receivable (AR) or Hire Payable (HP) in Dataloy VMS and has been transferred to an accounting system.
Field Name
Description
Not possible to user in filters
documentAmount
For /DocumentTypes INO, INI, CRI, CRO: Amount in order currency/sales currency. The original currency.
For /DocumentTypes PMI, PMO: Amount in Invoice Currency.
For /DocumentTypes ACR, ACP: Amount in Voyage Currency.
For /DocumentTypes APR: Amount in Advance Currency
For /DocumentTypes ACC: Amount in Invoice Currency (use Voyage currency if Invoice Currency is not present)
companyCurrencyAmount
For all /DocumentTypes : Amount in Company Currency for the Document.Company.
sourceCurrencyAmount
For /DocumentTypes INO, INI, CRI, CRO: Amount in order currency/sales currency. The original currency.
For /DocumentTypes PMI, PMO: Amount in Original Payment Currency.
For /DocumentTypes ACR, ACP: Amount in Voyage Currency.
For /DocumentTypes APR: Amount in Advance Currency
For /DocumentTypes ACC: Amount in Voyage Currency
documentCurrency.currencyCode
Currency Code for documentAmount. More information, see documentAmount
sourceCurrencyCode
Currency code for sourceCurrencyAmount. More information see sourceCurrencyAmount
exchangeRate
Exchange Rate between documentAmount and sourceCurrencyAmount
exchangeRateDate
Exchange Rate Date
glAccount
General Ledger Account
X
quantity
Has Different Meaning Depending on Document Type:
Accruals - Onhire Days Within Accrual Period
Bunkers - Bunker Quantity
Freight - Cargo Quantity
Charter Hire - Days
Meals and Cables - Days
VAT - VAT Amount is Quantity * vatRate
Various, Days - Voyage Days
Various, Rate - Cargo Quantity
Offhire - Offhire Days
Deadfreight - Deadfreight Quantity
Demurrage/Despatch - Days
unitPrice
Unit Price. Quantity * Unit Price = Document Amount
invoicingStatus.statusTypeCode
Status Code, see Document Status List
documentLineText
Document Line Text/Description
businessPartner
Business Partner Object. (Value: businessPartnerCode or businessPartner Key).
Invoice and Payment/Receipt:
Outgoing invoice:
document.company is the company in Dataloy VMS issuing the invoice.
document.businessPartner is the business partner receiving the invoice.
On the referring payment, document.company is receiving the payment.
Incoming invoice:
document.businessPartner is issuing the invoice.
document.company is receiving the invoice.
On the referring payment document.company is the one paying the invoice.
isAccountsPayable
false = Accounts Receivable, true = Accounts Payable Inserting Payment/Receipt: For payments referring to Accounts Receivable invoices set value to 0. For payments referring to Accounts Payable invoice set value to 1. This value should always have the same value as for the referring invoice.
refDocument
Referring Document for Reversals, Payments and Receipts. To set refDocument use Document Number or Key.
Payment/Receipts: Setting refDocument for payment receipts, documentLine.voyage will be set equal to the documentLine.voyage of the referring invoice.
vatRate.vatRate
VAT Rate
vatRate.vat.vatCode
VAT Code
freightRate
Freight Rate Object
portCall
portCall Object
handlingCost
handlingCost Object
businessUnit
businessUnit Object
account
Account Object, use glAccount instead
handlingCostCode
handlingCostCode Object, use glAccount instead
billOfLading
billOfLading Object
claim
Claim Object
offhire
Offhire Object
voyage
Voyage Object
Field Name
Description
Required
Unique
Not Possible to Set in Filters
bankName
Bank Name
Yes
swiftAddress
SWIFT Code
Yes
Yes
chip
Chip ID
abaNumber
ABA Code
Address
X
Contact Info
X
Report Type
vesselReportType
Determines the type of vessel report
yes
String
"NOON"
Noon Report Date
reportDateLocal
Date and time of creation of the report
yes
String
should be in this format: "YYYY-MM-DDTHH:mm:ss"
Port Call
portCall
Port to update
yes
Long
key of the port call
Latitude
latitude
Current position
yes
Double
Longitude
longitude
Current position
yes
Double
Estimated Time of Arrival
eventLogs
Date and time of estimated time of arrival
yes
yes, updates PortCall's arrival date
FO ROB
"eventLogs": {"robs": {"key": key of the arrival FO rob, "rob": ROB value}}
Remaining bunkers of type FO at the time of reporting
yes, updates PortCall's arrival FO rob
Double
MGO ROB
"eventLogs": {"robs": {"key": key of the arrival MGO rob, "rob": ROB value}}
Remaining bunkers of type MGO at the time of reporting
yes, updates PortCall's arrival MGO rob
Double
LS FO ROB
"eventLogs": {"robs": {"key": key of the arrival LS FO rob, "rob": ROB value}}
Remaining bunkers of type LS FO at the time of reporting
yes, updates PortCall's arrival LS FO rob
Double
LS MGO ROB
"eventLogs": {"robs": {"key": key of the arrival LS MGO rob, "rob": ROB value}}
Remaining bunkers of type LS MGO at the time of reporting
yes, updates PortCall's arrival FO rob
Double
Wind Direction
windDirection
Determines current wind direction
Average Wind Force
averageWindForce
General wind conditions
Double
Sea Direction
seaDirection
Current sea direction
Average Sea State
averageSeaState
General sea conditions
Double
Weather
weather
Determines current weather
Distance Sailed
distanceSailed
Distance sailed
Double
Hours in Service
hoursInService
Number of hours in operation
Double
Main Engine RPM
rpmFromLastPort
RPM recorded from previous port
Double
Vessel Report Type
vesselReportType
Determines the type of vessel report
yes
String
"ARR"
Port Call
portCall
Port to update
yes
Long
key of the port call
Arrival Date
eventLogs
Date and time of arrival on port
yes
yes, updates and fixes PortCall's arrival date
date should be in this format: "YYYY-MM-DDTHH:mm:ss"
Arrival Report Date
reportDateLocal
Date and time of creation of the report
String
should be in this format: "YYYY-MM-DDTHH:mm:ss"
Actual Distance Sailed Since Departure
distanceSailed
Distance in nm sailed from previous port
yes, updates the PortCall's actual distance sailed
Double
FO ROB
"eventLogs": {"robs": "key": key of the FO rob, "rob": ROB value}
Remaining bunkers of type FO at the time of arrival
yes, updates and fixes PortCall's arrival FO ROB
Double
MGO ROB
"eventLogs": {"robs": "key": key of the arrival MGO rob, "rob": ROB value}
Remaining bunkers of type MGO at the time of arrival
yes, updates and fixes PortCall's arrival MGO ROB
Double
LS FO ROB
"eventLogs": {"robs": "key": key of the arrival LS FO rob, "rob": ROB value}
Remaining bunkers of type LS FO at the time of arrival
yes, updates and fixes PortCall's arrival LS FO ROB
Double
LS MGO ROB
"eventLogs": {"robs": "key": key of the arrival LS MGO rob, "rob": ROB value}
Remaining bunkers of type LS MGO at the time of arrival
yes, updates and fixes PortCall's arrival LS MGO ROB
Double
Hours Stoppage
hoursStoppages
Number of hours in stoppage of operation
Double
Hours In Service
hoursInService
Number of hours in operation
Double
Speed Made Good
speedMadeGood
Net speed when sailing to the port
Double
Draft Aft
draftAft
Vessel's draft aft
Double
Draft Forward
draftForward
Vessel's draft forward
Double
Vessel Report Type
vesselReportType
Determines the type of vessel report
yes
String
"BRT"
Port Call
portCall
Port to update
yes
Long
key of the port call
Berth date
eventLogs
Date and time of berthing on port
yes
yes, updates and fixes PortCall's berthed date
date should be in this format: "YYYY-MM-DDTHH:mm:ss"
Berth Report Date
reportDateLocal
Date and time of creation of the report
String
should be in this format: "YYYY-MM-DDTHH:mm:ss"
FO ROB
"eventLogs": {"robs": "key": key of the berth FO rob, "rob": ROB value}
Remaining bunkers of type FO at the time of berthing
yes, updates and fixes PortCall's berthing FO ROB
Double
LS FO ROB
"eventLogs": {"robs": "key": key of the berth LS FO rob, "rob": ROB value}
Remaining bunkers of type LS FO at the time of berthing
yes, updates and fixes PortCall's berthing LS FO ROB
Double
MGO ROB
"eventLogs": {"robs": "key": key of the berth MGO rob, "rob": ROB value}
Remaining bunkers of type MGO at the time of berthing
yes, updates and fixes PortCall's berthing MGO ROB
Double
LS MGO ROB
"eventLogs": {"robs": "key": key of the berth LS MGO rob, "rob": ROB value}
Remaining bunkers of type LS MGO at the time of berthing
yes, updates and fixes PortCall's berthing LS MGO ROB
Double
Vessel Report Type
vesselReportType
Determines the type of vessel report
yes
String
"UBRT"
Port Call
portCall
Port to update
yes
Long
key of the port call
Unberth date
eventLogs
Date and time of berthing on port
yes
yes, updates and fixes PortCall's berthed date
date should be in this format: "YYYY-MM-DDTHH:mm:ss"
Unberth Report Date
reportDateLocal
Date and time of creation of the report
String
should be in this format: "YYYY-MM-DDTHH:mm:ss"
FO ROB
"eventLogs": {"robs": "key": key of the unberth LS MGO rob, "rob": ROB value}
Remaining bunkers of type FO at the time of unberthing
yes, updates and fixes PortCall's unberthing FO ROB
Double
LS FO ROB
"eventLogs": {"robs": "key": key of the unberth LS MGO rob, "rob": ROB value}
Remaining bunkers of type LS FO at the time of unberthing
yes, updates and fixes PortCall's unberthing LS FO ROB
Double
MGO ROB
"eventLogs": {"robs": "key": key of the unberth LS MGO rob, "rob": ROB value}
Remaining bunkers of type MGO at the time of unberthing
yes, updates and fixes PortCall's unberthing MGO ROB
Double
LS MGO ROB
"eventLogs": {"robs": "key": key of the unberth LS MGO rob, "rob": ROB value}
Remaining bunkers of type LS MGO at the time of unberthing
yes, updates and fixes PortCall's unberthing LS MGO ROB
Double
Vessel Report Type
vesselReportType
Determines the type of vessel report
yes
String
"PORT"
Port Call
portCall
Port to update
yes
Long
key of the port call
In Port Report Date
reportDateLocal
Date and time of creation of the report
String
should be in this format: "YYYY-MM-DDTHH:mm:ss"
Hours In Service
hoursInService
Number of hours in operation
Double
Weather
weather
Current weather
Click here for more details
Wind Direction
windDirection
Current wind direction
Click here for more details
Average Wind Force
averageWindForce
General wind conditions
Double
Vessel Report Type
vesselReportType
Determines the type of vessel report
yes
String
"DEP"
Port Call
portCall
Port to update
yes
Long
key of the port call
Departure date
eventLogs
Date and time of departure from port
yes
yes, updates and fixes PortCall's departure date
date should be in this format: "YYYY-MM-DDTHH:mm:ss"
Departure Report Date
reportDateLocal
Date and time of creation of the report
String
should be in this format: "YYYY-MM-DDTHH:mm:ss"
FO ROB
"eventLogs": {"robs": "key": key of the departure LS MGO rob, "rob": ROB value}
Remaining bunkers of type FO at the time of departure
yes, updates and fixes PortCall's departure FO ROB
Double
LS FO ROB
"eventLogs": {"robs": "key": key of the departure LS MGO rob, "rob": ROB value}
Remaining bunkers of type LS FO at the time of departure
yes, updates and fixes PortCall's departure LS FO ROB
Double
MGO ROB
"eventLogs": {"robs": "key": key of the departure LS MGO rob, "rob": ROB value}
Remaining bunkers of type MGO at the time of departure
yes, updates and fixes PortCall's departure MGO ROB
Double
LS MGO ROB
"eventLogs": {"robs": "key": key of the departure LS MGO rob, "rob": ROB value}
Remaining bunkers of type LS MGO at the time of departure
yes, updates and fixes PortCall's departure LS MGO ROB
Double
Distance to next port
distanceToNextPort
Distance in nm to next port
Double
Draft Aft
draftAft
Vessel's draft aft
Double
Draft Forward
draftForward
Vessel's draft forward
Double
Direction id
Direction Description
North
South
East
West
North/East
North/West
South/East
South/West
Various
North/North/East
East/North/East
East/South/East
South/South/East
South/South/West
West/South/West
West/North/West
North/North/West
East/by/North
East/by/South
North/by/East
North/by/West
NE/by/East
NE/by/north
NW/by/North
NW/by/West
SE/by/East
SE/by/South
SW/by/South
SW/by/West
South/by/East
South/by/West
West/by/North
West/by/South
Weather ID
Weather Description
Clear Sky
Sunny Day
Partly Cloudy
Sunny Intervals
Dust
Mist
Fog
Medium-Level Cloud
Low-Level Cloud
Light Rain Shower
Drizzle
Light Rain
Heavy Rain Shower
Heavy Rain
Sleet Shower
Sleet
Hail Shower
Hail
Light Snow Shower
Light Snow
Heavy Snow Shower
Heavy Snow
Thundery Shower
Thunder Storm
Tropical Storm
Haze
Each voyage is linked to one VoyageBunker object for each bunker category that is used during the voyage. VoyageBunker stores the following information/fields:
bunkerCategory: the BunkerCategory connected to the VoyageBunker object
consumption: total consumption of the bunker during the voyage
cost: total bunker cost during the voyage
price: average bunker price during the voyage
priceVoyageStart: average bunker price at voyage start
priceVoyageEnd: average bunker price at voyage end
profitLoss: the charterer's total bunker profit/loss
profitLossTcIn: the owner's total bunker profit/loss
robDelivery: bunker ROB at delivery port
robRedelivery: bunker ROB at redelivery port
robVoyageStart: bunker ROB at voyage start
voyage: the Voyage connected to the VoyageBunker
The following request fetches all VoyageBunker objects for a given voyage:
https://BASE_URL/ws/rest/VoyageBunker?filter=voyage.key(EQ)20012412
Alternatively, a request can be sent against /Voyage/20012412 with voyageBunkers defined in the header fields. The JSON below is an example response of above requests. Two different bunkers are used during this voyage, FO and LS MGO.
Rob = remaining on board. Rob objects stores bunker related numbers for a single leg on the Voyage. A Rob is connected to a PortCall through EventLogs. Each EventLog contains an underlying Event with an eventCode attribute, and there are four eventCodes relevant for Robs - 'ARR', 'BRT', 'UBRT', and 'DEP', corresponding to Arrival, Berth, Unberth, and Departure, respectively.
As an example, the following request can be used to fetch all Robs for a given EventLog:
https://BASE_URL/ws/rest/EventLog/20027578
Assuming this EventLog is linked to the arrival event, the returned Robs contains at-sea consumption from previous port call, and fuel remaining upon arrival (for each bunker). Below is an example JSON response:
Note! To get the same response, the following header fields must be specified: {"event":{"eventCode":"*"},"robs": {"
consumption":"*"
,"robFixed":"*"
,"rob": "*"
,"bunkerCategory":{"bunkerCategoryCode":"*"}}}
To retrieve a list of Robs for a given EventLog, use the "robs" field. The number of Robs returned corresponds to the number of BunkerCategories in the system.
Attributes breakdown:
bunkerCategory - the BunkerCategory connected to the Rob
eventLog - the EventLog connected to the Rob
rob - remaining fuel onboard
consumption - the bunker consumption between previous event and the connected event
robFixed - identifies whether the rob value is fixed or not
To get total consumption for a Port Call, Robs for all EventLogs on the PortCalls must be acquired.
The list of all EventLogs can be referenced directly from a PortCall:
Header fields: {"eventLogs": {"event":{"eventCode":"*"},"robs": {"
consumption":"*"
,"robFixed":"*"
,"rob": "*"
,"bunkerCategory":{"bunkerCategoryCode":"*"}}}}
Response:
The output will consist of four EventLog objects, each containing four robs, making a total of sixteen robs (calculated by multiplying the number of event logs by four bunker categories). By adding up all the consumption attributes, you can get the total consumption per leg
The default behavior when an API query is executed is to put in right join the relationship between objects. From DLP 4.0.0 is possible specify in the filters of the API URL query to use left join instead of the right join.
For instance the following API query: http://platform-dev.dataloy.com/ws/rest/Cargo?pageNumber=1&limit=50&filter=voyage.voyageHeader.isBudget(EQ)0&filter=(OR)&filter=voyage(NULL)
generates the following SQL query:
That will not return cargoes with voyages null.
Instead if the following query is executed:
encoded (+ become %2B):
generates the following SQL query:
It will return also cargoes with voyage null.
The same concept is used with sort:
Executing this query:
http://platform-dev.dataloy.com/ws/rest/Cargo?sort=voyage.voyageHeader.referenceNo(AS)
the following SQL query is executed:
Instead running the following query:
http://platform-dev.dataloy.com/ws/rest/Cargo?sort=voyage%2B.voyageHeader%2B.referenceNo(AS)
the following SQL query is executed:
Through DataControl objects is possible control the access to data of the logged user for a given object connected to the target.
For instance if we want to give access only to voyages connected with the business units that the user belong to, a DataControl object like this has to be posted:
matcherTarget defines the Dataloy object that has to be used as target object
matherAttributeTarget defines the attribute in the object target that links the object with the user
objectName the Dataloy object that has to be applied the access control
attribute the attribute name that link the Dataloy object with the target object
PositionReport is used to update the status of an ongoing voyage's port calls.
Position reports update a port call's sailing, arrival, in port, and departure status. Most fields in the PositionReport object will only provide information, while a few affect the port call's results.
The following fields will affect the port call's results:
eventLogs
An EventLog captures port events along with their date and time. The port events include ARRIVAL, BERTHED, UNBERTHED, and DEPARTURE.
For example, to record the arrival date of a port call, an event log entry should include the ARRIVAL event along with the corresponding date
robFo, robFl, robDl, robDo
An EventLog is also linked to ROBs to communicate the ROB of a specific bunker during a specific event.
For instance, the robFo linked to the arrival event log is the ROB of FO on arrival. The robFo linked to the departure event log is the ROB of FO on departure, etc.
Fields impacting the port call's results will have Major Change Factor marked as yes, along with a description, on the details.
PositionReport can be one of these types:
Noon Report
logs the ship's status at sea, updating the estimated arrival date and ROB info
Arrival Report
logs when the ship arrives in the port, fixing the arrival date and ROB info
Berth Report
logs when the ship has berthed in the port, fixing the berthed date and ROB info
Unberth Report
logs when the ship has unberthed in the port, fixing the unberthed date and ROB info
In Port Report
logs supplementary information such as hours in service, weather, wind direction and average wind direction when the ship is docked.
Departure Report
logs when the ship leaves the port, fixing the departure date and ROB info
In order to include a Remark on the position report, a separate API request needs to be done after the report is created.
Report Type
vesselReportType
Determines the type of vessel report
yes
String
"NOON"
Noon Report Date
reportDateLocal
Date and time of creation of the report
yes
String
should be in this format: "YYYY-MM-DDTHH:mm:ss"
Port Call
portCall
Port to update
yes
Long
key of the port call
Latitude
latitude
Current position
yes
Double
Longitude
longitude
Current position
yes
Double
Estimated Time of Arrival
eventLogs
Date and time of estimated time of arrival
yes
yes, updates PortCall's arrival date
FO ROB
robFo
Remaining bunkers of type FO at the time of reporting
yes, updates PortCall's arrival FO rob
Double
MGO ROB
robDo
Remaining bunkers of type MGO at the time of reporting
yes, updates PortCall's arrival MGO rob
Double
LS FO ROB
robFl
Remaining bunkers of type LS FO at the time of reporting
yes, updates PortCall's arrival LS FO rob
Double
LS MGO ROB
robDl
Remaining bunkers of type LS MGO at the time of reporting
yes, updates PortCall's arrival FO rob
Double
Wind Direction
windDirection
Determines current wind direction
Average Wind Force
averageWindForce
General wind conditions
Double
Sea Direction
seaDirection
Current sea direction
Average Sea State
averageSeaState
General sea conditions
Double
Weather
weather
Determines current weather
Distance Sailed
distanceSailed
Distance sailed
Double
Hours in Service
hoursInService
Number of hours in operation
Double
Main Engine RPM
rpmFromLastPort
RPM recorded from previous port
Double
Vessel Report Type
vesselReportType
Determines the type of vessel report
yes
String
"ARR"
Port Call
portCall
Port to update
yes
Long
key of the port call
Arrival Date
eventLogs
Date and time of arrival on port
yes
yes, updates and fixes PortCall's arrival date
date should be in this format: "YYYY-MM-DDTHH:mm:ss"
Arrival Report Date
reportDateLocal
Date and time of creation of the report
String
should be in this format: "YYYY-MM-DDTHH:mm:ss"
Actual Distance Sailed Since Departure
distanceSailed
Distance in nm sailed from previous port
yes, updates the PortCall's actual distance sailed
Double
FO ROB
robFo
Remaining bunkers of type FO at the time of arrival
yes, updates and fixes PortCall's arrival FO ROB
Double
MGO ROB
robDo
Remaining bunkers of type MGO at the time of arrival
yes, updates and fixes PortCall's arrival MGO ROB
Double
LS FO ROB
robFl
Remaining bunkers of type LS FO at the time of arrival
yes, updates and fixes PortCall's arrival LS FO ROB
Double
LS MGO ROB
robDl
Remaining bunkers of type LS MGO at the time of arrival
yes, updates and fixes PortCall's arrival LS MGO ROB
Double
Hours Stoppage
hoursStoppages
Number of hours in stoppage of operation
Double
Hours In Service
hoursInService
Number of hours in operation
Double
Speed Made Good
speedMadeGood
Net speed when sailing to the port
Double
Draft Aft
draftAft
Vessel's draft aft
Double
Draft Forward
draftForward
Vessel's draft forward
Double
Daily FO
dailyFo
Daily FO consumption
Double
Daily LS FO
dailyFl
Daily LS FO consumption
Double
Daily MGO
dailyDo
Daily MGO consumption
Double
Daily LS MGO
dailyDl
Daily LS MGO consumption
Double
Vessel Report Type
vesselReportType
Determines the type of vessel report
yes
String
"BRT"
Port Call
portCall
Port to update
yes
Long
key of the port call
Berth date
eventLogs
Date and time of berthing on port
yes
yes, updates and fixes PortCall's berthed date
date should be in this format: "YYYY-MM-DDTHH:mm:ss"
Berth Report Date
reportDateLocal
Date and time of creation of the report
String
should be in this format: "YYYY-MM-DDTHH:mm:ss"
FO ROB
robFo
Remaining bunkers of type FO at the time of berthing
yes, updates and fixes PortCall's berthing FO ROB
Double
LS FO ROB
robFl
Remaining bunkers of type LS FO at the time of berthing
yes, updates and fixes PortCall's berthing FO ROB
Double
MGO ROB
robDo
Remaining bunkers of type MGO at the time of berthing
yes, updates and fixes PortCall's berthing FO ROB
Double
LS MGO ROB
robDl
Remaining bunkers of type LS MGO at the time of berthing
yes, updates and fixes PortCall's berthing FO ROB
Double
Vessel Report Type
vesselReportType
Determines the type of vessel report
yes
String
"UBRT"
Port Call
portCall
Port to update
yes
Long
key of the port call
Unberth date
eventLogs
Date and time of berthing on port
yes
yes, updates and fixes PortCall's berthed date
date should be in this format: "YYYY-MM-DDTHH:mm:ss"
Unberth Report Date
reportDateLocal
Date and time of creation of the report
String
should be in this format: "YYYY-MM-DDTHH:mm:ss"
FO ROB
robFo
Remaining bunkers of type FO at the time of unberthing
yes, updates and fixes PortCall's unberthing FO ROB
Double
LS FO ROB
robFl
Remaining bunkers of type LS FO at the time of unberthing
yes, updates and fixes PortCall's unberthing FO ROB
Double
MGO ROB
robDo
Remaining bunkers of type MGO at the time of unberthing
yes, updates and fixes PortCall's unberthing FO ROB
Double
LS MGO ROB
robDl
Remaining bunkers of type LS MGO at the time of unberthing
yes, updates and fixes PortCall's unberthing FO ROB
Double
Vessel Report Type
vesselReportType
Determines the type of vessel report
yes
String
"PORT"
Port Call
portCall
Port to update
yes
Long
key of the port call
In Port Report Date
reportDateLocal
Date and time of creation of the report
String
should be in this format: "YYYY-MM-DDTHH:mm:ss"
Hours In Service
hoursInService
Number of hours in operation
Double
Weather
weather
Current weather
Click here for more details
Wind Direction
windDirection
Current wind direction
Click here for more details
Average Wind Force
averageWindForce
General wind conditions
Double
Vessel Report Type
vesselReportType
Determines the type of vessel report
yes
String
"DEP"
Port Call
portCall
Port to update
yes
Long
key of the port call
Departure date
eventLogs
Date and time of departure from port
yes
yes, updates and fixes PortCall's departure date
date should be in this format: "YYYY-MM-DDTHH:mm:ss"
Departure Report Date
reportDateLocal
Date and time of creation of the report
String
should be in this format: "YYYY-MM-DDTHH:mm:ss"
FO ROB
robFo
Remaining bunkers of type FO at the time of departure
yes, updates and fixes PortCall's departure FO ROB
Double
LS FO ROB
robFl
Remaining bunkers of type LS FO at the time of departure
yes, updates and fixes PortCall's departure FO ROB
Double
MGO ROB
robDo
Remaining bunkers of type MGO at the time of departure
yes, updates and fixes PortCall's departure FO ROB
Double
LS MGO ROB
robDl
Remaining bunkers of type LS MGO at the time of departure
yes, updates and fixes PortCall's departure FO ROB
Double
Distance to next port
distanceToNextPort
Distance in nm to next port
Double
Draft Aft
draftAft
Vessel's draft aft
Double
Draft Forward
draftForward
Vessel's draft forward
Double
PositionReport is used to update the status of an ongoing voyage's port calls.
Position reports update a port call's sailing, arrival, in port, and departure status. Most fields in the PositionReport object will only provide information, while a few affect the port call's results.
The following fields will affect the port call's results:
eventLogs
An EventLog captures port events along with their date and time. The port events include ARRIVAL, BERTHED, UNBERTHED, and DEPARTURE.
For example, to record the arrival date of a port call, an event log entry should include the ARRIVAL event along with the corresponding date
robFo, robFl, robDl, robDo
An EventLog is also linked to ROBs to communicate the ROB of a specific bunker during a specific event.
For instance, the robFo linked to the arrival event log is the ROB of FO on arrival. The robFo linked to the departure event log is the ROB of FO on departure, etc.
Fields impacting the port call's results will have Major Change Factor marked as yes, along with a description, on the details.
PositionReport can be one of these types:
Noon Report
logs the ship's status at sea, updating the estimated arrival date and ROB info
Arrival Report
logs when the ship arrives in the port, fixing the arrival date and ROB info
In Port Report
logs when the ship docks in the port. You can update both berthed and departure events here. This fixes the berthed date.
Departure Report
logs when the ship leaves the port, fixing the departure date and ROB info
In order to include a Remark on the position report, a separate API request needs to be done after the report is created.
Report Type
vesselReportType
Determines the type of vessel report
yes
String
"NOON"
Noon Report Date
reportDateLocal
Date and time of creation of the report
yes
String
should be in this format: "YYYY-MM-DDTHH:mm:ss"
Port Call
portCall
Port to update
yes
Long
key of the port call
Latitude
latitude
Current position
yes
Double
Longitude
longitude
Current position
yes
Double
Estimated Time of Arrival
eventLogs
Date and time of estimated time of arrival
yes
yes, updates PortCall's arrival date
FO ROB
robFo
Remaining bunkers of type FO at the time of reporting
yes, updates PortCall's arrival FO rob
Double
MGO ROB
robDo
Remaining bunkers of type MGO at the time of reporting
yes, updates PortCall's arrival MGO rob
Double
LS FO ROB
robFl
Remaining bunkers of type LS FO at the time of reporting
yes, updates PortCall's arrival LS FO rob
Double
LS MGO ROB
robDl
Remaining bunkers of type LS MGO at the time of reporting
yes, updates PortCall's arrival FO rob
Double
Wind Direction
windDirection
Determines current wind direction
Average Wind Force
averageWindForce
General wind conditions
Double
Sea Direction
seaDirection
Current sea direction
Average Sea State
averageSeaState
General sea conditions
Double
Weather
weather
Determines current weather
Distance Sailed
distanceSailed
Distance sailed
Double
Hours in Service
hoursInService
Number of hours in operation
Double
Main Engine RPM
rpmFromLastPort
RPM recorded from previous port
Double
Vessel Report Type
vesselReportType
Determines the type of vessel report
yes
String
"ARR"
Port Call
portCall
Port to update
yes
Long
key of the port call
Arrival Date
eventLogs
Date and time of arrival on port
yes
yes, updates and fixes PortCall's arrival date
date should be in this format: "YYYY-MM-DDTHH:mm:ss"
Arrival Report Date
reportDateLocal
Date and time of creation of the report
String
should be in this format: "YYYY-MM-DDTHH:mm:ss"
Actual Distance Sailed Since Departure
distanceSailed
Distance in nm sailed from previous port
yes, updates the PortCall's actual distance sailed
Double
FO ROB
robFo
Remaining bunkers of type FO at the time of arrival
yes, updates and fixes PortCall's arrival FO ROB
Double
MGO ROB
robDo
Remaining bunkers of type MGO at the time of arrival
yes, updates and fixes PortCall's arrival MGO ROB
Double
LS FO ROB
robFl
Remaining bunkers of type LS FO at the time of arrival
yes, updates and fixes PortCall's arrival LS FO ROB
Double
LS MGO ROB
robDl
Remaining bunkers of type LS MGO at the time of arrival
yes, updates and fixes PortCall's arrival LS MGO ROB
Double
Hours Stoppage
hoursStoppages
Number of hours in stoppage of operation
Double
Hours In Service
hoursInService
Number of hours in operation
Double
Speed Made Good
speedMadeGood
Net speed when sailing to the port
Double
Draft Aft
draftAft
Vessel's draft aft
Double
Draft Forward
draftForward
Vessel's draft forward
Double
Daily FO
dailyFo
Daily FO consumption
Double
Daily LS FO
dailyFl
Daily LS FO consumption
Double
Daily MGO
dailyDo
Daily MGO consumption
Double
Daily LS MGO
dailyDl
Daily LS MGO consumption
Double
Vessel Report Type
vesselReportType
Determines the type of vessel report
yes
String
"PORT"
Port Call
portCall
Port to update
yes
Long
key of the port call
In Port Report Date
reportDateLocal
Date and time of creation of the report
String
should be in this format: "YYYY-MM-DDTHH:mm:ss"
Estimated time of berthing and departure
eventLogs
Estimated date and time of berthing and departure from port
yes, updates PortCall's berthing and departure dates
date should be in this format: "YYYY-MM-DDTHH:mm:ss"
Hours In Service
hoursInService
Number of hours in operation
Double
Weather
weather
Current weather
Click here for more details
Wind Direction
windDirection
Current wind direction
Click here for more details
Average Wind Force
averageWindForce
General wind conditions
Double
Vessel Report Type
vesselReportType
Determines the type of vessel report
yes
String
"DEP"
Port Call
portCall
Port to update
yes
Long
key of the port call
Departure date
eventLogs
Date and time of departure from port
yes
yes, updates and fixes PortCall's departure date
date should be in this format: "YYYY-MM-DDTHH:mm:ss"
Departure Report Date
reportDateLocal
Date and time of creation of the report
String
should be in this format: "YYYY-MM-DDTHH:mm:ss"
FO ROB
robFo
Remaining bunkers of type FO at the time of departure
yes, updates and fixes PortCall's departure FO ROB
Double
LS FO ROB
robFl
Remaining bunkers of type LS FO at the time of departure
yes, updates and fixes PortCall's departure FO ROB
Double
MGO ROB
robDo
Remaining bunkers of type MGO at the time of departure
yes, updates and fixes PortCall's departure FO ROB
Double
LS MGO ROB
robDl
Remaining bunkers of type LS MGO at the time of departure
yes, updates and fixes PortCall's departure FO ROB
Double
Distance to next port
distanceToNextPort
Distance in nm to next port
Double
Draft Aft
draftAft
Vessel's draft aft
Double
Draft Forward
draftForward
Vessel's draft forward
Double
This page explains how to create vessel report integration with Dataloy API.
Have you considered using the vessel reporting functionality in our new web client? Get in touch for more information.
Chapter Contents:
The vessel report endpoint is called PositionReport and can be accessed with Base URL + ws/rest/PositionReport
A vessel report needs to be connected to a port call. Dataloy recommends to present a list of port calls to the user to make them select the correct one when reporting. To get a list of port calls, the following API call can be used
Remarks will be connected to the Position Report. To send remarks requires:
the set-up of a remark template in the database with a title and the extraction of the remark_id. Note: This construction is usually met with various various challenges with e-mail based vessel reporting (more information: contact Dataloy).
IMPORTANT: This type of construction causes various challenges with e-mail based vessel reporting (more information: contact contact Dataloy).
Noon reports at sea should be connected to the next port call
JSON Field Name
Description
Affects Dataloy VMS
Mandatory
Type
Length
Example
Client validation
A port call key
Yes
Vessel Report Type
Value = NOON for Noon Report
Yes
String
4
Report Date Local Time
Yes
Date
Position Latitude (Decimal Degrees)
Double
5
12.575
User input should be degrees, minutes and seconds. For example: 12° 34'5 N. Then degrees, minutes and seconds should be converted to decimals.
Validation:
if (minutes > 60) {
return false; } if (direction === 'S' || direction === 'N') { if (degrees > 90) { return false; } if (degrees === 90 && minutes > 0) { return false; } } if (direction === 'E' || direction === 'W') { if (degrees > 180) { return false; } if (degrees === 180 && minutes > 0) { return false; } } return true;
Position Longitude (Decimal Degrees)
Double
5
123.76
Same validation as for latitude
Array of EventLog.
For noon report this can be estimated time of arrival, berthing and departure. All dates are in local time.
It's not necessary to include all 3 types. If you only want to update arrival then only include arrival EventLog
Arrival event = ARR
Berthing event = BRT
Departure event = DEP
Updates ETA, ETB and ETD
Array of EventLogs
[{eventLogDate: "2023-01-03T03:34:00.000Z", event: "ARR"},
{eventLogDate: "2023-01-03T03:34:00.000Z", event: "BRT"},
{eventLogDate: "2023-01-03T03:34:00.000Z", event: "DEP"}]
True Course
Integer
38
Distance Sailed Since Last Report
Double
Positive decimal value
Hours in Service Since Last Report
Double
Positive decimal value
Distance To Go
Double
Positive decimal value
Speed Made Good
Double
Positive decimal value
Integer
38
Wind Force. Beaufort.
Integer
38
0-12
Integer
38
Sea State. Integer from 0 - 9.
Integer
38
0-9
weather
Integer
38
Main Engine RPM Since Last Report
Double
Positive decimal value
Daily Fuel Oil Consumption
Double
Positive decimal value
Daily Diesel Oil Consumption
Double
Positive decimal value
Daily Fuel Oil Low Sulphur Consumption
Double
Positive decimal value
Daily Diesel Oil Low Sulphur Consumption
Double
Positive decimal value
Daily Net Fresh Water Consumption
Double
Positive decimal value
Fuel Oil Remaining on Board (FO RoB)
Updates FO arrival RoB of the Port Call
Double
Positive decimal value
Diesel Oil Remaining on Board (DO RoB)
Updates DO arrival RoB of the Port Call
Double
Positive decimal value
Fuel Oil Low Sulphur Remaining on Board (FO LS RoB)
Updates FO LS arrival RoB of the Port Call
Double
Positive decimal value
Diesel Oil Low Sulphur Remaining on Board (DO LS RoB)
Updates DO LS arrival RoB of the Port Call
Double
Positive decimal value
Fresh Water Remaining on Board
Double
Positive decimal value
JSON Field Name
Description
Affects Dataloy VMS
Mandatory
Type
Length
Example
Client validation
A port call key
Yes
Integer
Vessel Report Type Value = ARR for Arrival Report.
Yes
String
4
Report Date Local Time
Yes
Date
Array of EventLog.
For departure report this can be time of arrival, estimated time of berthing and departure. All dates are in local time.
It's not necessary to include all 3 types. If you only want to update arrival then only include arrival EventLog
Arrival event = ARR
Berthing event = BRT
Departure event = DEP
Updates and fixes Arrival Date and Time in Schedule
Updates ETB and/or ETD in Schedule
Yes
Array of EventLogs
[{eventLogDate: "2023-01-03T03:34:00.000Z", event: "ARR"},
{eventLogDate: "2023-01-03T03:34:00.000Z", event: "BRT"},
{eventLogDate: "2023-01-03T03:34:00.000Z", event: "DEP"}]
Distance Sailed Since departure
Updates actual distance sailed
Double
Positive decimal value
Hours Stoppages
Double
Positive decimal value
Hours in Service
Double
Positive decimal value
Speed Made Good Since Last Report
Double
Positive decimal value
Draft Aft
Double
Positive decimal value
Draft Forward
Double
Positive decimal value
Daily Fuel Oil Consumption
Double
Positive decimal value
Daily Diesel Oil Consumption
Double
Positive decimal value
Daily Fuel Oil Low Sulphur Consumption
Double
Positive decimal value
Daily Diesel Oil Low Sulphur Consumption
Double
Positive decimal value
Daily Net Fresh Water consumption
Double
Positive decimal value
Fuel Oil Remaining on Board (FO RoB)
Updates and fixes Fuel Oil Remaining on Board (FO RoB) Arrival.
Double
Positive decimal value
Diesel Oil Remaining on Board (DO RoB)
Updates and fixes Diesel Oil Remaining on Board (DO RoB) Arrival.
Double
Positive decimal value
Fuel Oil Low Sulphur Remaining on Board (FO LS RoB)
Updates and fixes Fuel Oil Low Sulphur Remaining on Board (FO LS RoB) Arrival.
Double
Positive decimal value
Diesel Oil Low Sulphur Remaining on Board (DO LS RoB)
Updates and fixes Diesel Oil Low Sulphur Remaining on Board (DO LS RoB) Arrival.
Double
Positive decimal value
Fresh Water remaining on board
Double
Positive decimal value
JSON Field Name
Description
Affects Dataloy VMS
Mandatory
Type
Length
Example
Client validation
A port call key
Yes
Integer
Vessel Report Type Value = PORT for In Port Report.
Used to insert the correct type of Position Report and to locate the correct port call.
Yes
String
4
Report Date Local Time
Yes
Date
Array of EventLog.
For in port report this can be time of berthing and estimated time of departure. All dates are in local time.
It's not necessary to include all types. If you only want to update arrival then only include arrival EventLog
Berthing event = BRT
Departure event = DEP
Updates and fixes Berthed Time and Date
Updates ETD in Schedule
Yes
Date
[{eventLogDate: "2023-01-03T03:34:00.000Z", event: "BRT"},
{eventLogDate: "2023-01-03T03:34:00.000Z", event: "DEP"}]
Hours in Service
Double
Positive decimal value
Integer
38
Integer
38
Average Wind Force. Beaufort.
Integer
38
0-12
JSON Field Name
Description
Affects Dataloy VMS
Mandatory
Type
Length
Example
Client validation
A port call key
Yes
Vessel Report Type. Value = DEP for Departure Report.
Yes
String
4
Report Date Local Time
Yes
Date
Array of EventLog. Local time.
Add Departure Time as an Event Log with "DEP" event code
Updates and fixes Departure Time in Schedule.
Yes
Date
[{eventLogDate: "2023-01-03T03:34:00.000Z", event: "DEP"}]
Distance To Next Port
Double
Positive decimal value
Draft Aft
Double
Positive decimal value
Draft Forward
Double
Positive decimal value
Fuel Oil Remaining on Board (FO RoB)
Updates and fixes Fuel Oil Remaining on Board (FO RoB) departure.
Double
Positive decimal value
Diesel Oil Remaining on Board (DO RoB)
Updates and fixes Diesel Oil Remaining on Board (DO RoB) departure.
Double
Positive decimal value
Fuel Oil Low Sulphur Remaining on Board (FO LS RoB)
Updates and fixes Fuel Oil Low Sulphur Remaining on Board (FO LS RoB) departure.
Double
Positive decimal value
Diesel Oil Low Sulphur Remaining on Board (DO LS RoB)
Updates and fixes Diesel Oil Low Sulphur Remaining on Board (FO LS RoB) departure.
Double
Positive decimal value
Fresh Water Remaining on Board
Double
Positive decimal value
Bunkered Fuel Oil Input Exact Figure According to BDR
Updates Fuel Oil bunkered for departure port call.
Double
Positive decimal value
Bunkered Fuel Oil Low Sulphur Input exact figure according to the BDR
Updates Fuel Oil Low Sulphur bunkered for departure port call.
Double
Positive decimal value
Bunkered Diesel Oil Input exact figure according to the BDR
Updates Diesel Oil bunkered for departure port call.
Double
Positive decimal value
Bunkered Diesel Oil Low Sulphur Input exact figure according to the BDR
Updates Diesel Oil Low Sulphur bunkered for departure port call.
Double
Positive decimal value
Note
Fields that would be fixed will only fixed for voyages that are not estimated, allocated or scheduled
Updated for API version 2.0.0 using the new required date format yyyy-dd-MMThh:mi:ss to conform ISO 8601, (prior version has date format: yyyy-dd-MM hh:mi:ss)
Arrival
Departure
Noon
When inserting weather data, use the ID from the Weather Data table:
Clear Sky
Sunny Day
Partly Cloudy
Sunny Intervals
Dust
Mist
Fog
Medium-Level Cloud
Low-Level Cloud
Light Rain Shower
Drizzle
Light Rain
Heavy Rain Shower
Heavy Rain
Sleet Shower
Sleet
Hail Shower
Hail
Light Snow Shower
Light Snow
Heavy Snow Shower
Heavy Snow
Thundery Shower
Thunder Storm
Tropical Storm
Haze
When inserting direction, use the ID from the Direction Table:
North
South
East
West
North/East
North/West
South/East
South/West
Various
North/North/East
East/North/East
East/South/East
South/South/East
South/South/West
West/South/West
West/North/West
North/North/West
East/by/North
East/by/South
North/by/East
North/by/West
NE/by/East
NE/by/north
NW/by/North
NW/by/West
SE/by/East
SE/by/South
SW/by/South
SW/by/West
South/by/East
South/by/West
West/by/North
West/by/South
L
Loading
D
Discharging
C
Canal Passage
E
Extra Port
DD
Dry Dock
DEL
Delivery
RED
Redelivery
B
Bunkering
R
Repair
CL
Tank / Hold Cleaning
STS
Ship to Ship
W
Waiting
CC
Customs Clearance
For long TC out voyages you might want to make it possible to add port calls from your vessel client. This section will explain how to do that.
To insert a port call the following API call can be used
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. We have over 10,000 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 the reason for call list above 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.
Dataloy Vessel Report System enables vessels to send vessel reports without proper internet connection. The server side of Dataloy VRS is exposed in the Dataloy API for inserting vessel reports into Dataloy VMS. When Dataloy VRS is in use, the client side of the Vessel Report API system can be ignored - the message sent by e-mail to the VRS is identical to what can be posted in the Vessel Report API (with minor adjustments). Inserting a vessel report into Dataloy VMS not only inserts a position report, but also the schedule, bunkers etc. There is also a functionality available for locating correct port call based on vessel code and report date.
Chapter Contents:
Base URL
The Vessel Report URL:
Base URL + ws/rest/VesselReport
Custom Fields
Custom fields can be added
using Events (if there is an event code and date).
or added as a Remark (text field).
Events are added and retrieved from Master Data and can be used in a JSON message. Event fields in the JSON message is shortened:
ed = event date
ec = event code.
Remarks will be connected to the Position Report. To send remarks requires:
the set-up of a remark template in the database with a title and the extraction of the remark_id. Note: This construction is usually met with various various challenges with e-mail based vessel reporting (more information: contact Dataloy).
IMPORTANT: This type of construction causes various challenges with e-mail based vessel reporting (more information: contact contact Dataloy).
Alerts can be triggered either:
when reports are inserted to Dataloy VMS
or a report is failing.
IMPORTANT: Property Settings is handled in: Master Data > Dataloy Properties.
Properties
Property
Description
com.dataloy.integration.vessel.voyageNoAndRFC
When set to true: referenceNo and reasonForCall can be added to the json message. This makes it easier for VRS to locate the correct port call and will reduce errors.
com.dataloy.integration.vessel.reportMailRecipients
List of email addresses separated by semicolon.
A vessel report successfully inserted into Dataloy VMS results in a report being sent to the addresses in this property value. The report will list all values sent from the vessel.
com.dataloy.integration.vessel.errormail.recipient
E-mail address list separated by semicolon.
The e-mail address owners will receive an e-mail if a vessel report is failing.
The Voyage Operator will also receive a message if the User has registered relevant e-mail address.
com.dataloy.integration.vessel.errormail.sender
An e-mail address will be the sender of the Error Mail.
com.dataloy.integration.vessel.sendReportMailToOperator
When set to true: A vessel report successfully inserted into Dataloy VMS results in a report being sent to the Voyage Operator, listing all values sent from the vessel.
com.dataloy.mail.smtp
smtp must be setup for e-mail alerts to function.
JSON Field Name
Description
Affects Dataloy VMS
Mandatory
Type
Length
portCallId
A port call id
If the port call id is available, use this to avoid VRS trying to locate the correct port call.
referenceNo
Voyage reference number
reasonForCall
Vessel Report Type
Value = NOON for Noon Report
Used to insert correct type of Position Report and to locate correct port call.
Yes
String
4
Used in combination with report date local time to locate the port call in Dataloy VMS.
Yes
String
6
Report Date Local Time
Used in combination with vessel code to locate the port call in Dataloy VMS. Inserted in the Postition Report.
Yes
Date
Position Latitude (Decimal Degrees)
Inserted in Position Report.
Double
5
Position Longitude (Decimal Degress)
Inserted in Position Report.
Double
5
When a port call is located based on vessel and report date, Dataloy VMS checks the reported port against the port in Dataloy VMS. If these do not match an error message will be returned and the report will not be inserted.
Yes
Integer
38
Estimated Time of Arrival
Updates ETA in Schedule.
Yes
Date
Estimated Time of Berthing
Updates ETB in Schedule.
Date
Estimated Time of Departure
Updates ETD in Schedule.
Date
True Course
Inserted in Position Report.
Integer
38
Distance Sailed Since Last Report
Inserted in Position Report.
Double
Hours in Service Since Last Report
Inserted in Position Report.
Double
Distance To Go
Inserted in Position Report.
Double
Speed Made Good
Inserted in Position Report.
Double
Inserted in Position Report.
Integer
38
Wind Force. Beaufort.
Inserted in Position Report.
Integer
38
Inserted in Position Report.
Integer
38
Sea State. Integer from 0 - 9.
Inserted in Position Report.
Integer
38
Main Engine RPM Since Last Report
Inserted in Position Report.
Double
Daily Fuel Oil Consumption
Inserted in Position Report.
Double
Daily Diesel Oil Consumption
Inserted in Position Report.
Double
Daily Fuel Oil Low Sulphur Consumption
Inserted in Position Report.
Double
Daily Diesel Oil Low Sulphur Consumption
Inserted in Position Report.
Double
Daily Net Fresh Water Consumption
Inserted in Position Report.
Double
Fuel Oil Remaining on Board (FO RoB)
Inserted in Position Report.
Double
Diesel Oil Remaining on Board (DO RoB)
Inserted in Position Report.
Double
Fuel Oil Low Sulphur Remaining on Board (FO LS RoB)
Inserted in Position Report.
Double
Diesel Oil Low Sulphur Remaining on Board (DO LS RoB)
Inserted in Position Report.
Double
Fresh Water Remaining on Board
Inserted in Position Report.
Double
Remark
Inserted as a Remark to the Position Report.
String
Unlimited
JSON Field Name
Description
Affets Dataloy VMS
Mandatory
Type
Length
portCallId
A port call id
If the port call id is available, use this to avoid VRS trying to locate the correct port call.
referenceNo
Voyage reference number
reasonForCall
Vessel Report Type Value = ARR for Arrival Report.
Used to insert the correct type of Position Report and to locate the correct port call.
Yes
String
4
Used in combination with report date local time to locate the port call in Dataloy VMS.
Yes
String
6
When a port call is located based on vessel and report date, Dataloy VMS checks the reported port against the port in Dataloy VMS. If these do not match an error message will be returned and the report will not be inserted.
Yes
Integer
38
Report Date Local Time
Used in combination with vessel code to locate the port call in Dataloy VMS.
Yes
Date
Time of Arrival
Updates ETA in Schedule.
Yes
Date
Time of Berthing (Estimated if Anchoring)
Updates ETB in Schedule
Yes
Date
Estimated Time of Departure
Updates ETD in Schedule.
Yes
Date
Total Distance Sailed Since Departure
Updates Miles in Schedule.
Double
Distance Sailed Since Last Report
Inserted in Postion Report.
Double
Hours Stoppages
Updates Days Stoppages (see the Perfomance tab in Booking and Operations).
Double
Hours in Service
Inserted in Postion Report.
Double
Speed Made Good Since Last Report
Inserted in Postion Report.
Double
Draft Aft
Inserted in Postion Report.
Double
Draft Forward
Inserted in Postion Report.
Double
Daily Fuel Oil Consumption
Inserted in Postion Report.
Double
Daily Diesel Oil Consumption
Inserted in Postion Report.
Double
Daily Fuel Oil Low Sulphur Consumption
Inserted in Postion Report.
Double
Daily Diesel Oil Low Sulphur Consumption
Inserted in Postion Report.
Double
Daily Net Fresh Water consumption
Inserted in Postion Report.
Double
Fuel Oil Remaining on Board (FO RoB)
Updates Fuel Oil Remaining on Board (FO RoB) Arrival.
Double
Diesel Oil Remaining on Board (DO RoB)
Updates Diesel Oil Remaining on Board (DO RoB) Arrival.
Double
Fuel Oil Low Sulphur Remaining on Board (FO LS RoB)
Updates Fuel Oil Low Sulphur Remaining on Board (FO LS RoB) Arrival.
Double
Diesel Oil Low Sulphur Remaining on Board (DO LS RoB)
Updates Diesel Oil Low Sulphur Remaining on Board (DO LS RoB) Arrival.
Double
Fresh Water remaining on board
Inserted in Postion Report.
Double
Remark
Inserted as a Remark to the Position Report.
String
Unlimited
JSON Field Name
Description
Affects Dataloy VMS
Mandatory
Type
Length
portCallId
A port call id
If the port call id is available, use this to avoid VRS trying to locate the correct port call.
referenceNo
Voyage reference number
reasonForCall
Vessel Report Type Value = PORT for In Port Report.
Used to insert the correct type of Position Report and to locate the correct port call.
Yes
String
4
Used in combination with report date local time to locate the port call in Dataloy VMS.
Yes
String
6
When a port call is located based on vessel and report date, Dataloy VMS checks the reported port against the port in Dataloy VMS. If these do not match an error message will be returned and the report will not be inserted.
Yes
Integer
38
Report Date Local Time
Used in combination with vessel code to locate the port call in Dataloy.
Yes
Date
Estimated Time of Berthing
Updates ETB in Schedule
Date
Estimated Time of Departure
Updates ETD in Schedule.
Yes
Date
Hours in Service
Inserted in Postion Report.
Double
Inserted in Postion Report.
Integer
38
Inserted in Postion Report.
Integer
38
Average Wind Force. Beaufort.
Inserted in Postion Report.
Integer
38
Remark
Inserted as a Remark to the Position Report.
String
Unlimited
JSON Field Name
Description
Affects Dataloy VMS
Mandatory
Type
Length
portCallId
A port call id
If the port call id is available, use this to avoid VRS trying to locate the correct port call.
referenceNo
Voyage reference number
reasonForCall
Vessel Report Type. Value = DEP for Departure Report.
Used to insert the correct type of position report and to locate the correct port call.
Yes
String
4
Used in combination with report date local time to locate the port call in Dataloy VMS.
Yes
String
6
When a port call is located based on vessel and report date, Dataloy VMS checks the reported port against the port in Dataloy VMS. If these do not match an error message will be returned and the report will not be inserted.
Yes
Integer
38
Report Date Local Time
Used in combination with vessel code to locate the port call in Dataloy VMS.
Yes
Date
Departure Time
Updates Estimated Time of Departure (ETD) in Schedule.
Yes
Date
When a port call is located based on vessel and report date, Dataloy VMS checks the reported port against the port in Dataloy VMS. If these do not match an e-mail will be sent to the operator and the report will not be inserted.
Integer
38
Estimated Time of Arrival
Updates Estimate Time of Arrival (ETA) for next Arrival Port.
Date
Distance To Next Port
Inserted in Postion Report.
Double
Draft Aft
Inserted in Postion Report.
Double
Draft Forward
Inserted in Postion Report.
Double
Fuel Oil Remaining on Board (FO RoB)
Updates Fuel Oil Remaining on Board (FO RoB) departure.
Double
Diesel Oil Remaining on Board (DO RoB)
Updates Diesel Oil Remaining on Board (DO RoB) departure.
Double
Fuel Oil Low Sulphur Remaining on Board (FO LS RoB)
Updates Fuel Oil Low Sulphur Remaining on Board (FO LS RoB) departure.
Double
Diesel Oil Low Sulphur Remaining on Board (DO LS RoB)
Updates Diesel Oil Low Sulphur Remaining on Board (FO LS RoB) departure.
Double
Fresh Water Remaining on Board
Inserted in Postion Report.
Double
Bunkered Fuel Oil Input Exact Figure According to BDR
Updates Fuel Oil bunkered for departure port call.
Double
Bunkered Fuel Oil Low Sulphur Input exact figure according to the BDR
Updates Fuel Oil Low Sulphur bunkered for departure port call.
Double
Bunkered Diesel Oil Input exact figure according to the BDR
Updates Diesel Oil bunkered for departure port call.
Double
Bunkered Diesel Oil Low Sulphur Input exact figure according to the BDR
Updates Diesel Oil Low Sulphur bunkered for departure port call.
Double
Remark
Inserted as remark to position report.
String
Unlimited
Updated for API version 2.0.0 using the new required date format yyyy-dd-MMThh:mi:ss to conform ISO 8601, (prior version has date format: yyyy-dd-MM hh:mi:ss)
Arrival
Departure
{ "remarks":[ { "id":"70495513", "r":"10" }, { "id":"70495512", "r":"10" }, { "id":"70495511", "r":"10" }, { "id":"70495510", "r":"10" }, { "id":"70495509", "r":"10" }, { "id":"70495514", "r":"10" }, { "id":"70495515", "r":"10" }, { "id":"70495516", "r":"10" }, { "id":"70495517", "r":"10" }, { "id":"70495518", "r":"10" }, { "id":"70495519", "r":"10" } ], "events":[ { "ed":"2013-12-24T00:00:00", "ec":"VR15" }, { "ed":"2013-12-24T00:00:00", "ec":"VR20" }, { "ed":"2013-12-24T00:00:00", "ec":"VR25" }, { "ed":"2013-12-24T00:00:00", "ec":"VR30" }, { "ed":"2013-12-24T00:00:00", "ec":"VR40" }, { "ed":"2013-12-24T00:00:00", "ec":"VR45" }, { "ed":"2013-12-24T00:00:00", "ec":"VR50" }, { "ed":"2013-12-24T00:00:00", "ec":"VR55" } ], "reportTypeCode":"DEP", "vesselCode":"14", "portId":"104419", "reportDateLocal":"2013-12-24T00:00:00", "departure":"2013-12-24T00:00:00", "nextPortId":"104419", "arrival":"2013-12-24T00:00:00", "distanceToNextPort":"10", "draftAft":"10", "draftForward":"10", "robFo":"10", "robDo":"10", "robFl":"10", "robDl":"10", "robFw":"10", "foBunkered":"10", "flBunkered":"10", "doBunkered":"10", "dlBunkered":"10", "genericRemark":"Remark"}
Noon
Port
The following fields can be added for consumption breakdown
Main Engine - Fuel Oil
Inserted to position report.
Main Engine - Fuel Oil Low Sulphur
Inserted to position report.
Main Engine - Diesel Oil
Inserted to position report.
Main Engine - Diesel Oil Low Sulphur
Inserted to position report.
Auxiliary - Fuel Oil At Sea
Inserted to position report.
Auxiliary - Fuel Oil Low Sulphur At Sea
Inserted to position report.
Auxiliary - Diesel Oil At Sea
Inserted to position report.
Auxiliary - Diesel Oil Low Sulphur At SeaInserted to position report.
Inserted to position report.
Boilers - Fuel Oil Idle
Inserted to position report.
Boilers - Fuel Oil Low Sulphur Idle
Inserted to position report.
Boilers - Diesel Oil Idle
Inserted to position report.
Boilers - Diesel Oil Low Sulphur Idle
Inserted to position report.
Boilers - Fuel Oil Working
Inserted to position report.
Boilers - Fuel Oil Low Sulphur Working
Inserted to position report.
Boilers - Diesel Oil Working
Inserted to position report.
Boilers - Diesel Oil Low Sulphur Working
Inserted to position report.
Generators - Fuel Oil At Sea
Inserted to position report.
Generators - Fuel Oil Low Sulphur At Sea
Inserted to position report.
Generators - Diesel Oil At Sea
Inserted to position report.
Generators - Diesel Oil Low Sulphur At Sea
Inserted to position report.
Cleaning - Fuel Oil
Inserted to position report.
Cleaning - Fuel Oil Low Sulphur
Inserted to position report.
Cleaning - Diesel Oil
Inserted to position report.
Cleaning - Diesel Oil Low Sulphur
Inserted to position report.
Heating - Fuel Oil Consumption
Inserted to position report.
Heating - Fuel Oil Low Sulphur
Inserted to position report.
Heating - Diesel Oil
Inserted to position report.
Heating - Diesel Oil Low Sulphur
Inserted to position report.
When inserting weather data, use the ID from the Weather Data table:
Weather ID
Weather Description
Clear Sky
Sunny Day
Partly Cloudy
Sunny Intervals
Dust
Mist
Fog
Medium-Level Cloud
Low-Level Cloud
Light Rain Shower
Drizzle
Light Rain
Heavy Rain Shower
Heavy Rain
Sleet Shower
Sleet
Hail Shower
Hail
Light Snow Shower
Light Snow
Heavy Snow Shower
Heavy Snow
Thundery Shower
Thunder Storm
Tropical Storm
Haze
When inserting direction, use the ID from the Direction Table:
Direction id
Direction Description
North
South
East
West
North/East
North/West
South/East
South/West
Various
North/North/East
East/North/East
East/South/East
South/South/East
South/South/West
West/South/West
West/North/West
North/North/West
East/by/North
East/by/South
North/by/East
North/by/West
NE/by/East
NE/by/north
NW/by/North
NW/by/West
SE/by/East
SE/by/South
SW/by/South
SW/by/West
South/by/East
South/by/West
West/by/North
West/by/South
Code
Description
L
Loading
D
Discharging
C
Canal Passage
E
Extra Port
DD
Dry Dock
DEL
Delivery
RED
Redelivery
B
Bunkering
R
Repair
CL
Tank / Hold Cleaning
STS
Ship to Ship
W
Waiting
CC
Customs Clearance
Dataloy Vessel Codes can be found by using the Vessel Code Resource.
Dataloy Port ID's can be found be using the Port Resource.
Is possible restrict access to any endpoint.
In order for a user to get access to a given API Endpoint, the user must belong to a SecurityRole that has a SecurityPermission for the API Endpoint.
he endpoint access control is done also against the objects requested using the fields JSON in the HTTP Header. So for instance if the endpoint Vessel.GET is present and the user does not belong to a SecurityRole that has a SecurityPermission for the Vessel.GET endpoint, requesting the Voyage resource specifying the following JSON in the fields parameter will get unauthorized (HTTP 401):
If the same user requests with the following JSON, it will get access because vesselName attribute is part of the minimal view of Vessel resource:
The same access control is performed when a WebhookSubscription is requested. If the user tries to subscribe for an object that has an Endpoint in the system, the subscription will be created only if the user can access to the Endpoint, otherwise Bad request (HTTP 400) exception will be thrown.
To create a new Endpoint it has to be used the endpoint /ws/rest/Endpoint posting a JSON like this:
To create a new SecurityPermission it has to be used the endpoint /ws/rest/SecurityPermission posting a JSON like this:
To create a new SecurityRole. Post the following JSON to /ws/rest/SecurityRole:
To add a SecurityPermission to a SecurityRole. Post the following JSON to /ws/rest/SecurityRole:
To add a SecurityRole to a User. Post the following JSON to /ws/rest/SecurityRole:
From it is possible to have multiple versions of Dataloy API deployed on an application server. New API functionalities can be utilized for certain clients while at the same time continue to use older API versions for other clients. This usage of the system can remain until all clients are tested and working with the latest Dataloy API version. The API version is specified in the URL.
Latest Version
The latest version of Dataly API deployed at a customer's application server remains available at:
Older versions can be located at ws/rest/version-number. For example, if version 2.10.0 is deployed it will be found at:
Wind Direction ()
One of the values from this list:
Sea Direction ()
One of the values from this list:
Weather.
One of the values from this list:
Weather.
One of the values from this list:
Wind Direction.
One of the values from this list:
Makes it easier for VRS to locate correct port call which results in less errors. Requires a .
Makes it easier for VRS to locate correct port call which results in less errors. Requires a .
Arrival Port,
Wind Direction ()
Sea Direction ()
Makes it easier for VRS to locate correct port call which results in less errors. Requires a .
Makes it easier for VRS to locate correct port call which results in less errors. Requires a .
Arrival Port,
Makes it easier for VRS to locate correct port call which results in less errors. Requires a .
Makes it easier for VRS to locate correct port call which results in less errors. Requires a .
Port,
Weather.
Wind Direction.
Makes it easier for VRS to locate correct port call which results in less errors. Requires a .
Makes it easier for VRS to locate correct port call which results in less errors. Requires a .
Departure Port,
Next Arrival Port,
http://[ip]:[port]/ws/rest
http://[ip]:[port]/ws/rest/6.38.0
Through the DataControl object it is possible to control data access for a target user(s) for a given object connected to the target by checking if the user(s) belongs to a given role.
For example, if we want to limit access for the captain of a vessel to only be able to view voyages of their vessel, a DataControl object like this has to be posted:
matcherTarget defines the Dataloy object that has to be used as target object
matcherAttributeTarget defines the attribute in the matcherTarget object that has to be used against the attribute of the object (objectName)
objectName the Dataloy object that has to be applied the access control
attribute the attribute name that links the Dataloy object with the target object
dataControlRoleValues list of SecurityRole that the DataControl will be applied
In the above example if an User that belong to the SecurityRole "MATER_ONLINE_VESSEL" make a query to the endpoint Voyage, the server will return only the voyages that has voyageHeader.vesselCodes.masterUser = {the user that made the query}
Through DataControl and DataControlRoleValue is possible to give access only to some specific objects.
For instance if we want that the users that belong to the security role with key 59552772 can have access only to the documents connected with the business partner with key 20867070 and 22210381, a DataContol object like this has to be posted:
objectName the Dataloy object that has to be applied the access control
attribute the attribute name to be used to restrict the access
role the security role that will use the access control (use the key, as role names containing spaces might not work)
value the value to use as filter to restrict data
valueType the type of the value (Integer, String)
It is possible to create SecurityRole that remove the access to a set of fields of a given resource, both in read and write mode.
For example it is possible to create a role that remove the access to the voyageResult field of the Voyage resource
All the users that will have such role, in the response of the Voyage resource, the field voyageResult will be not present.
POST: http://dataloy.com/ws/rest/SecurityRole
It is possible to create scripts, written in pseudo Java, that can be injected at runtime and used by Webhooks and Websockets.
An Alert Script can be very simple or very complex, their scope is to evaluate conditions and return true or false. If the script returns true the message is sent.
Alerts can be created and installed at run-time into the system. These are the predefined alerts available:
Build interactive HTML 5 application using Dataloy Websockets.
It is possible to open a Websocket to get notified when there are changes in Dataloy data model.
The concept is very similar to Webhooks, it is possible open a socket to be notified for Creation, Update and Deletion of any of object type of the data model.
The endpoint syntax is:
ws://{url}/ws/rest/WebSocketObjectSubscription/{objectType}/{eventType}/{key}/{token}
The JSON pushed will have the same structure of the one pushed by Webhooks.
It is possible to customize the JSON sent from the Server to the Client using Adjust Number of Fields to be Returned from a Request.
(The JSON fields can be sent through the open Websocket by the Client to the Server)
(To get back to the standard fields list a empty JSON ( {} ) can be sent from the client to the server)
It is possible to open a Websocket linked to an Alert Script to be notified when the script is fired and returns true.
The endpoint to use is:
ws://{url}/ws/rest/WebSocketAlertScript/{scriptCode}/{token}
Passing the script code.
It is possible to delete multiple objects, of a given resource, sending as URL parameters the list of keys:
DELETE: http://{host}/ws/rest/{Resource name}/delete?key={key 1}&key={key 2}&key={key 3}...
All the objects will be deleted in the same transaction
Furthermore, Bulk Delete supports object resequencing. This is useful in cases where the order of the objects is crucial and has to be precise, but also it's required to delete several objects at once. For instance, BunkerCategories on Vessel are following strict priority order, thus upon deletion, the order should be re-aligned.
Re-sequencing is active ONLY when at least a valid 'resequenceBy' string is passed.
DELETE: http://{host}/ws/rest/{ResourceName}/delete?resequenceBy={sequence field}&parentProperty={parent property}&key={key1}&key={key2}...
Sequence field - is a string identifying the 'sequence property'. For example, it would be portCallSequence for ResourceName = PortCall.
Parent property - Optionally filter by the parent group using a string specifying the parent field. For example, if ResourceName is PortCall, pass the field ownedByVoyage to re-sequence only PortCalls belonging to the same voyage.
API 5.21 supports sub-queries during any API query.
The syntax is:
filter=attributeName(OPERATOR){ResourceName.attributeName[filter_1],[filter_2],[filter_n]}
en-capsuling sub-queries between {} and the filters inside the sub-queries as list inside [ ]
Here an example to get the ongoing cargoes of a list of business partners:
][cargoPorts.portCall.eventLogs.eventLogDate(GT)2020-06-18T17:02:21][cargoPorts.cargoPortSequence(EQ)1],[cargoPorts.reasonForCall.reasonForCall(EQ)D]})&filter=key(IN)({Cargo.key[cargoPorts.portCall.eventLogs.event.eventCode(EQ)DEP][cargoPorts.portCall.eventLogs.eventLogDate(LT)2020-06-18T17:02:21][cargoPorts.cargoPortSequence(EQ)1],[cargoPorts.reasonForCall.reasonForCall(EQ)L]})
][cargoPorts.portCall.eventLogs.eventLogDate(GT)2020-06-18T17:02:21][cargoPorts.cargoPortSequence(EQ)1],[cargoPorts.reasonForCall.reasonForCall(EQ)D]%7D)&filter=key(IN)(%7BCargo.key[cargoPorts.portCall.eventLogs.event.eventCode(EQ)DEP][cargoPorts.portCall.eventLogs.eventLogDate(LT)2020-06-18T17:02:21][cargoPorts.cargoPortSequence(EQ)1],[cargoPorts.reasonForCall.reasonForCall(EQ)L]%7D)
The character { must be encoded with %7B and } with %7D
Is possible to use both OR and AND operators in API queries. The two new operators syntax are:
(OR)
(AND)
Set of filters can be separated by OR and AND operators, the filters within a single set of filter will be put in AND.
Some examples:
Cargo?filter=charterer.businessPartnerType.businessPartnerType(EQ)&&filter=weight(GT)400000
CargoPort?filter=cargo.charterer.key(EQ)1001845&filter=cargo.voyage.voyageStatus(EQ)%20&filter=port.portName(IN)(OSLO)&filter=reasonForCall.reasonForCall(EQ)L&filter=(OR)&filter=cargo.voyage.voyageStatus(EQ)%20&filter=port.portName(IN)(GAETA)&filter=reasonForCall.reasonForCall(EQ)D&filter=(OR)&filter=reasonForCall.reasonForCall(EQ)E
Limitations:
It is not possible use calculated fields with AND and/or OR.
Parenthesis are not supported
It is possible copy any object of any resource with the following endpoint:
POST: key}
It will create a new object in the data model, copying also the sub-objects, and will return it as response.
It is possible override attributes passing a JSON in the body (passing an attribute with null value will have no effect. Only simple types in the first level of the JSON will be used to override).
It is possible copy multiple objects, of a give resource, sending as URL parameters the list of keys:
POST: key={key 1}&key={key 2}&key={key 3}...
it will create a new object for all the specified keys and returns am array of the created objects.
API 5.24 offers support for XML transformations for any of the resource of the data model.
Using XSLT 3.0 is possible inject XSL strings to any GET request to translate the default JSON response in a XML string based on the XSL in input.
To achieve this the URLs to use are
/ws/rest/{ResourceName}/xml
/ws/rest/{ResourceName}/xml/{key}
the XSL must be set as HTTP header parameter with the name xsl.
Example of Cargo transformation:
XSL:
URL: http://platform-dev.dataloy.com/ws/rest/Cargo/xml/1225540
Output:
The Bulk Update can be used to any object of the data model.
The endpoint to use is:
PUT: key={key 1}&key={key 2}&key={key 3}...
passing ,to the specified resource, a list of key that have to be changed by the input body.
The endpoint returns 204 with no content if succeeded.
Bulk Update can also be used with :
For example
With expressions is possible to use logical syntax, like we do in SQL, to filter any resource response.
One easy example could be (assuming that we are querying Voyage endpoint):
voyageResult > 1000 and voyageHeader.voyageStatus.statusTypeCode= 'FIN'
Bit more complex one could be:
vessel.vesselName ='Borg 1' and (voyageHeader.operator = 999999 or voyageHeader.charteringResponsible = 999999 or voyageHeader.accountantResponsible= 999999)
That introduce a completely new possibility, the usage of parenthesis.
It is possible to have any level of nested parenthesis:
(voyageHeader.operator != 999999 and ((voyageResult > 10000 and voyageHeader.voyageStatus.statusTypeCode= 'FIN') or (voyageResult < 10000 and voyageHeader.voyageStatus.statusTypeCode= 'NOM')))
Support for between operator:
voyageResult between 1000 and 2000
The dates in the expression must be preceded by the character $
voyageHeader.voyageStartDate > $2020-12-29T17:02:21
To get all the voyages of the master scenario:
(voyageHeader.voyageStartDate>=$2021-01-14T17:02:21 and fleetPlanVoyages.fleetPlan.fleetPlanCode='MASTER') or (scenarios.scenarioCode='MASTER' and voyageHeader.voyageStatus.statusTypeCode= 'SCU')
Supported Operators (all the operator are case sensitive):
The expressions can be used in any resource of the data model.
The expression can be passed or through the URL query parameter called expression (remember to encode):
ws/rest/Voyage?expression=vessel.vesselName='Borg 1' or voyageResult between 10 and 10000
or through the HTTP header parameter called expression.
The expression can be used in combination with sorting and pagination through URL query parameters.
Calculated fields cannot be used within the expressions.
Operator
=
equal to
!=
not equal to
>
greater than
>=
greater than equal to
<
less than
<=
less than equal to
between
between
not between
not between
in
in
not in
not in
like
like
% must be encode with %25
not like
not like
likeIgnoreCase
like ignore case
not likeIgnoreCase
not like ignore case
!
negation
on Vessel resource: ! (hasGrabsOnboard = false and iceClass = null)