Consumption and bunker related figures for a given voyage are stored in VoyageBunker and Rob resources
VoyageBunker - Bunker summary of entire voyage
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 definedin 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.
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