/ServiceOrder
Short Description
This API Resource will be available from version 5.23 of the Dataloy API
Chapter Contents:
Long Description
Supported Methods
GET /ServiceOrder
Get a list of ServiceOrder objects. Filter to avoid huge amounts of data (see Filtering for search parameters).
GET /ServiceOrder/{key}
Get a single ServiceOrder object.
POST /ServiceOrder
Insert a new ServiceOrder:
PUT /ServiceOrder/{key}
Update an existing ServiceOrder. Unchanged properties need not be updated.
Properties
Property | Type | Length | Mandatory | Description |
---|---|---|---|---|
portCall | /PortCall | Y | PortCall object or port call key | |
serviceOrderLines | Array of /ServiceOrderLine | Y | ServiceOrderLines of the ServiceOrder | |
businessPartner | /BusinessPartner | |||
externalReferenceNo | String | 64 | External ServiceOrder Reference Number | |
exchangeRate | Double | Exchange Rate Between amountAdvanced and amountAdvancedCurrency | ||
currency | /Currency | Y | ServiceOrder Currency | |
orderDate | Date | Service order date ISO format | ||
status | /StatusType | Y | ServiceOrder Status, find list of valid status types below. | |
amountAdvanced | Double | |||
amountAdvancedCurrency | /Currency | Y | ||
nominationEmail | String | Nomination email sent to the agent in HTML format. since 6.3 | ||
emailSentDate | Date | The date when the nomination email has been sent to the Agent. since 6.3 |
List of Disbursement Account (DA) Statuses in Dataloy VMS
Code | Code Description | Description |
---|---|---|
EST | Estimate | Proforma stage of the DA. |
REV | Revised | Revised stage of the DA. |
FIN | Final | Final stage of the DA. |
Supplementary DA's should use status type FIN
Example POST
{ "portCall": 36344213, "businessPartner": "100131", "externalReferenceNo": "DA1234", "exchangeRate": 1.2345, "currency": "USD", "orderDate": "2020-10-01T00:00:00", "status": "EST", "amountAdvanced": 10000.0, "amountAdvancedCurrency": "EUR", "serviceOrderLines": [ { "amountEstimate": 10000.0, "amountRevised": 0.0, "amountFinal": 0.0, "description": "", "isOwnersCost": false, "isCharterersCost": true, "serviceCode": "TOW" } ] }
Example GET Return Body
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)
Get return body can be customized by specifying what fields you want to extract using the API. This is done in the http header property "fields". Please see "Adjust Number of Fields to be Returned from a Request" for more information.
A http header property must be used to get the following structure as the API will by default not include all details of sub objects.
The following http header was used to get the below result.
fields: {"amountAdvanced":"*","amountAdvancedCurrency":{"currencyCode":"*"},"businessPartner":{"businessPartnerCode":"*"},"exchangeRate":"*","portCall":"*","orderDate":"*","externalReferenceNo":"*","currency":{"currencyCode":"*"},"status":{"statusTypeCode":"*"},"serviceOrderLines": { "description":"*", "isCharterersCost":"*", "isOwnersCost":"*", "amountEstimate":"*", "amountFinal":"*", "amountRevised":"*", "serviceCode":{"serviceCode":"*"}}}
{ "key": 36647845, "self": "http://platform-dev.dataloy.com:80:80/ws/rest/ServiceOrder/36647845", "amountAdvanced": 10000.0, "amountAdvancedCurrency": { "currencyCode": "EUR", "key": 400008, "self": "http://platform-dev.dataloy.com:80:80/ws/rest/Currency/400008" }, "serviceOrderLines": [ { "key": 36647846, "self": "http://platform-dev.dataloy.com:80:80/ws/rest/ServiceOrderLine/36647846", "description": null, "isCharterersCost": true, "isOwnersCost": false, "amountEstimate": 10000.0, "amountFinal": 11000.0, "amountRevised": 0.0, "serviceCode": { "key": 36567907, "self": "http://platform-dev.dataloy.com:80:80/ws/rest/ServiceCode/36567907", "serviceCode": "TOWX" } } ], "businessPartner": { "businessPartnerCode": "100131", "key": 20798543, "self": "http://platform-dev.dataloy.com:80:80/ws/rest/BusinessPartner/20798543" }, "exchangeRate": 1.2345, "portCall": { "key": 36344213, "self": "http://platform-dev.dataloy.com:80:80/ws/rest/PortCall/36344213" }, "orderDate": "2020-10-01T00:00:00", "externalReferenceNo": "DA1234", "currency": { "currencyCode": "USD", "key": 400132, "self": "http://platform-dev.dataloy.com:80:80/ws/rest/Currency/400132" }, "status": { "key": 1000131, "self": "http://platform-dev.dataloy.com:80:80/ws/rest/StatusType/1000131", "statusTypeCode": "FIN" } }
Update Service Order
When updating a service order it is possible to do that in one PUT operation (including sub objects such as Service Order Line)
See example below where we update the ServiceOrderStatus to "FIN" and the amountFinal on the service order line (sub object) to 11000.
URL:
PUT request to: http://localhost/ws/rest/ServiceOrder/[ID OF SERVICE ORDER]
{ "status":"FIN", "serviceOrderLines":[ { "key":1116527, "amountFinal":11000.0 } ] }