Consumptions API

The voyage’s figure consumptions (in MT) are stored in the Voyage resource in the following attributes:

  • foConsumption (FO)

  • doConsumption (LS FO)

  • dlConsumption (LS MGO)

  • flConsumption (MGO)

The leg’s figure consumptions are stored in the PortCall resource in the following attributes:

  • foAtSea

  • flAtSea

  • doAtSea

  • dlAtSea

  • foInPort

  • flInPort

  • doInPort

Through Adjust Number of Fields to be Returned from a Request. is possible to get all the consumption figures, using the Voyage resource, in one API call, sending the HTTP Header parameter fields with this value:

 

{ "dlConsumption": "*", "doConsumption": "*", "flConsumption": "*", "foConsumption": "*", "portCalls": { "foAtSea": "*", "doAtSea": "*", "dlAtSea": "*", "foInPort": "*", "flInPort": "*", "doInPort": "*", "port": { "portName": "*" }, "portCallSequence": "*" } }

 

NB: the above JSON must be sent in the header in one line:

 

{"dlConsumption":"*","doConsumption":"*","flConsumption":"*","foConsumption":"*","portCalls":{"foAtSea":"*","doAtSea":"*","dlAtSea":"*","foInPort":"*","flInPort":"*","doInPort":"*","port":{"portName":"*"},"portCallSequence":"*"}}

 

Making an API call for a given voyage:

https://platform-dev.dataloy.com:9143/ws/rest/Voyage/14559440

using the above fields the response will be like this:

 

{ "portCalls": [ { "key": 14559447, "self": "https://platform-dev.dataloy.com:9143/ws/rest/PortCall/14559447", "portCallSequence": 1, "doAtSea": 0.0, "doInPort": 0.0, "foInPort": 0.0, "dlAtSea": 0.0, "flInPort": 0.0, "foAtSea": 350.52160734507413, "port": { "portName": "SUEZ CANAL", "key": 100963, "self": "https://platform-dev.dataloy.com:9143/ws/rest/Port/100963" } }, { "key": 14559441, "self": "https://platform-dev.dataloy.com:9143/ws/rest/PortCall/14559441", "portCallSequence": 2, "doAtSea": 0.0, "doInPort": 0.0, "foInPort": 0.0, "dlAtSea": 36.22889249432935, "flInPort": 0.0, "foAtSea": 129.56344098436014, "port": { "portName": "BERGEN", "key": 104146, "self": "https://platform-dev.dataloy.com:9143/ws/rest/Port/104146" } }, { "key": 14559445, "self": "https://platform-dev.dataloy.com:9143/ws/rest/PortCall/14559445", "portCallSequence": 3, "doAtSea": 0.0, "doInPort": 0.0, "foInPort": 0.0, "dlAtSea": 36.22889249432936, "flInPort": 0.0, "foAtSea": 129.65283665140663, "port": { "portName": "SUEZ CANAL", "key": 100963, "self": "https://platform-dev.dataloy.com:9143/ws/rest/Port/100963" } }, { "key": 14559443, "self": "https://platform-dev.dataloy.com:9143/ws/rest/PortCall/14559443", "portCallSequence": 4, "doAtSea": 0.0, "doInPort": 0.0, "foInPort": 0.0, "dlAtSea": 0.0, "flInPort": 0.0, "foAtSea": 350.4322116780279, "port": { "portName": "CHONGJIN", "key": 103802, "self": "https://platform-dev.dataloy.com:9143/ws/rest/Port/103802" } } ], "dlConsumption": 72.45778498865872, "doConsumption": 0.0, "flConsumption": 0.0, "foConsumption": 960.1700966588688, "key": 14559440, "self": "https://platform-dev.dataloy.com:9143/ws/rest/Voyage/14559440"" }