/Cargo

/Cargo

Short Description

Chapter Contents:

Long Description

Supported Methods

GET /Cargo

Get a list of Cargo objects. Filter to avoid huge amounts of data (see Filtering for search parameters).

GET /Cargo/{key}
Get a single Cargo object.

POST /Cargo
Insert a new Cargo object not allocated to a Voyage:

  • Required fields:  

    • Cargo:  commodity, charterer, freightCurrency, cargoMeasurement, cargoPorts

POST example:

{ "cargoMeasurement":"MT", "freightCurrency":"USD", "charterer":30091200, "commodity":11401057, "cargoPorts":[ { "cargoPortSequence":1, "reasonForCall":"L", "port":103309 }, { "cargoPortSequence":1, "reasonForCall":"D", "port":105724 } ], }

 

 

Insert a new Cargo object allocated to a Voyage:

If the cargo ports of the new cargo are not in the schedule of the Voyage, it is necessary create also the corresponding port calls, adding them at the end of the schedule.

In this example we want add a new cargo to a given voyage that has just two port calls, So the new port calls must have portCallSequence 3 and 4:

 

POST example:

{ "voyage":35651877, "cargoMeasurement":"MT", "freightCurrency":"USD", "charterer":30091200, "commodity":11401057, "cargoPorts":[ { "cargoPortSequence":1, "reasonForCall":"L", "port":103309, "portCall":{ "voyage":35651877, "reasonForCall":"L", "port":103309, "currency":"USD", "portCallSequence":3, "eventLogs":[ { "event":"BRT", "eventLogDate":"2020-08-13T09:14:08" }, { "event":"DEP", "eventLogDate":"2020-08-13T09:14:08" }, { "event":"ARR", "eventLogDate":"2020-08-13T09:14:08" } ] } }, { "cargoPortSequence":1, "reasonForCall":"D", "port":105724, "portCall":{ "voyage":35651877, "reasonForCall":"D", "port":105724, "currency":"USD", "portCallSequence":4, "eventLogs":[ { "event":"BRT", "eventLogDate":"2020-08-13T09:14:08" }, { "event":"DEP", "eventLogDate":"2020-08-13T09:14:08" }, { "event":"ARR", "eventLogDate":"2020-08-13T09:14:08" } ] } } ] }

To know which should be the first portCallSequence value to use in the JSON, a GET.Voyage/{key} can be done passing the following fields as HTTP header parameter (see Adjust Number of Fields to be Returned from a Request):

{"portCalls":{"portCallSequence":"*"}}

that will return a JSON like this:

{ "portCalls": [ { "key": 35651880, "self": "http://platform-dev.dataloy.com:80/ws/rest/PortCall/35651880", "portCallSequence": 1 }, { "key": 35651882, "self": "http://platform-dev.dataloy.com:80/ws/rest/PortCall/35651882", "portCallSequence": 2 } ], "key": 35651877, "self": "http://platform-dev.dataloy.com:80/ws/rest/Voyage/35651877" }



The starting portCallSequence to use to create the Cargo will be the max portCallSequence returned by this call plus 1.

If the port of the CargoPort are instead already in the schedule, the following JSON can be post to create a new Cargo:

{ "voyage":35663066, "cargoMeasurement":"MT", "freightCurrency":"USD", "charterer":30091200, "commodity":11401057, "cargoPorts":[ { "cargoPortSequence":1, "reasonForCall":"L", "port":103309, "portCall":35663069 }, { "cargoPortSequence":1, "reasonForCall":"D", "port":101816, "portCall":35663071 } ] }

Indicating the PortCall key where the CargoPort must be attached.



PUT /Cargo/{key}

Update an existing Cargo. Unchanged properties need not be updated.  

Dates: Must be supplied in ISO format: yyyy-mm-dd hh:mm:ss

Example:

"cpDate":"2012-09-10 00:00:00"

Any field accepting a code also accept an ID: 

  • Code fields (ResourceType: nameOfField): 

    • cargo:   

      • Commodity: commodity, subCommodity  

      • BusinessPartner: charterer  

      • Measurement: cargoMeasurement, dimensionMeasurement,freightMeasurement, volumeMeasurement, weightMeasurement, weightUnit   

      • Currency: freightCurrency, valueCurrency    

    • commissions:       

      • BusinessPartner: broker

    • various: 

      •  Currency: currency 

      • VariousText: variousText 

      • VariousRule: variousRule    

      • VariousType: variousType

    • cargoPort:

      • ReasonForCall: reasonForCall

      • LaytimeTerms: laytimeTerms

  • ID Fields:

    • cargo: voyage 

    • cargoPorts: port

    • Non-ID fields without quotes are numeric values. 

    • Non-code fields with quotes are alphanumeric strings. 

 

Notes 

  • When retrieving cargoes, template cargoes (the ones with isTemplate = true) should be filtered out

Lumpsum cargo: 

  • cargoQuantity and freightRate must be assigned at Cargo level

Other cargoes: 

  • Changing cargoQuantity in a cargoPort does not trigger any calculation on cargoQuantity of other cargoPort.

  • The cargoQuantity at cargo level is calculated summing the cargoQuantity of loading ports

  • It is not possible assign freightRate in both discharge and loading ports.

  • The cargoQuantity used for calculations are those in cargoPort, cargoQuantity at Cargo level is not used in calculations

  • Freight and freightRate used for calculations are those in cargoPort,

  • API will not use stowageFactor and weightFactor from commodity



Properties

Property

Type

Length

Mandatory

Description

Comments

Property

Type

Length

Mandatory

Description

Comments

commodity

/Commodity

 

 

 

 

subCommodity

/SubCommodity

 

 

 

 

charterer

/BusinessPartner

 

 

 

 

portRotation

String

256

 

 

 

cpDate

Date

 

 

 

 

cargoReference

String

16

 

 

 

cargoSubReference

String

4

 

 

 

externalReference

String

64

 

 

 

commissionAddress

Double

 

 

 

 

cargoPorts

Array of /CargoPort

 

 

 

 

variouses

Array of /Various

 

 

 

 

commissions

Array of /Commission

 

 

 

 

voyage

/Voyage

 

 

 

 

bookedQuantity

Double

 

 

 

 

cargoQuantity

Double

 

 

 

 

commissionBroker

Double

 

 

 

 

exchangeRate

Double

 

 

 

 

freightRate

Double

 

 

 

 

isLumpsum

Boolean

 

 

 

 

isTemplate

Boolean





Defines wether or not the cargo is a template. Template cargoes are created when creating CoA and are used to create fixtures. 

Added in version 5.6

isWorldscale

Boolean

 

 

 

 

minimumQuantity

Double

 

 

 

 

quantityOptionPct

Double

 

 

 

 

stowageFactor

Double

 

 

 

 

volume

Double

 

 

 

 

weight

Double

 

 

 

 

weightFactor

Double

 

 

 

 

width

Double

 

 

 

 

cargoMeasurement

/Measurement

 

Yes

 

 

freightCurrency

/Currency

 

Yes

 

 

freightMeasurement

/Measurement

 

 

 

 

quantityOption

/QuantityOption

 

 

 

 

stowageUnit

/Measurement

 

Yes

 

 

weightMeasurement

/Measurement

 

Yes

 

 

weightUnit

/Measurement

 

Yes

 

 

length

Double

 

 

 

 

comments

String

64

 

 

 

commission

Double

 

 

 

 

area

Double

 

 

 

 

netFreight

Double

 

 

 

 

variousCost

Double

 

 

 

 

variousRevenue

Double

 

 

 

 

demurrage

Double

 

 

 

 

despatch

Double

 

 

 

 

doPrice

Double

 

 

 

 

foPrice

Double

 

 

 

 

freight

Double

 

 

 

 

grossFreight

Double