/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:
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 |
---|---|---|---|---|---|
| Â | Â | Â | Â | |
| Â | Â | Â | Â | |
| Â | Â | Â | Â | |
| String | 256 | Â | Â | Â |
| Date | Â | Â | Â | Â |
| String | 16 | Â | Â | Â |
| String | 4 | Â | Â | Â |
| String | 64 | Â | Â | Â |
| Double | Â | Â | Â | Â |
| Array of /CargoPort | Â | Â | Â | Â |
| Array of /Various | Â | Â | Â | Â |
| Array of /Commission | Â | Â | Â | Â |
| Â | Â | Â | Â | |
| Double | Â | Â | Â | Â |
| Double | Â | Â | Â | Â |
| Double | Â | Â | Â | Â |
| Double | Â | Â | Â | Â |
| Double | Â | Â | Â | Â |
| Boolean | Â | Â | Â | Â |
| 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 | ||
| Boolean | Â | Â | Â | Â |
| Double | Â | Â | Â | Â |
| Double | Â | Â | Â | Â |
| Double | Â | Â | Â | Â |
| Double | Â | Â | Â | Â |
| Double | Â | Â | Â | Â |
| Double | Â | Â | Â | Â |
| Double | Â | Â | Â | Â |
| Â | Yes | Â | Â | |
| Â | Yes | Â | Â | |
| Â | Â | Â | Â | |
| Â | Â | Â | Â | |
| Â | Yes | Â | Â | |
| Â | Yes | Â | Â | |
| Â | Yes | Â | Â | |
| Double | Â | Â | Â | Â |
| String | 64 | Â | Â | Â |
| Double | Â | Â | Â | Â |
| Double | Â | Â | Â | Â |
| Double | Â | Â | Â | Â |
| Double | Â | Â | Â | Â |
| Double | Â | Â | Â | Â |
| Double | Â | Â | Â | Â |
| Double | Â | Â | Â | Â |
| Double | Â | Â | Â | Â |
| Double | Â | Â | Â | Â |
| Double | Â | Â | Â | Â |
| Double | Â | Â | Â | Â |
| Double | Â | Â | Â | Â |
| Â | Â | Â | Â | |
| Â | Â | Â | Â | |
| Date | Â | Â | Â | Â |
| Date | Â | Â | Â | Â |
| Date | Â | Â | Â | Â |
| String | 1 | Yes | Â | Â |
| String | 64 | Â | Â | Â |
| Â | Â | Â | Â | |
| Â | Â | Â | Â | |
| Â | Â | Â | Â | |
| Double | Â | Â | Â | Â |
| Double | Â | Â | Â | Â |
| Double | Â | Â | Â | Â |
| Double | Â | Â | Â | Â |
| Double | Â | Â | Â | Â |
| Double | Â | Â | Â | Â |
| String | 64 | Â | Â | Â |
| Double | Â | Â | Â | Â |
| Double | Â | Â | Â | Â |
| Boolean | Â | Â | Â | Â |
| Boolean | Â | Â | Â | Â |
| Double | Â | Â | Â | Â |
| Boolean | Â | Â | Â | Â |
| Boolean | Â | Â | Â | Â |
| Boolean | Â | Â | Â | Â |
| Boolean | Â | Â | Â | Â |
| Boolean | Â | Â | Â | Â |
| Boolean | Â | Â | Â | Â |
| Boolean | Â | Â | Â | Â |
| Date | Â | Â | Â | Â |
| Date | Â | Â | Â | Â |
| Double | Â | Â | Â | Â |
| Double | Â | Â | Â | Â |
| Date | Â | Â | Â | Â |
| Double | Â | Â | Â | Â |
| Date | Â | Â | Â | Â |
| Date | Â | Â | Â | Â |
| Double | Â | Â | Â | Â |
| Double | Â | Â | Â | Â |
| Boolean | Â | Â | Â | Â |
| Double | Â | Â | Â | Â |
| Integer | Â | Â | Â | Â |
| Integer | Â | Â | Â | Â |
| Double | Â | Â | Â | Â |
| String | 64 | Â | Â | Â |
| Double | Â | Â | Â | Â |
| Double | Â | Â | Â | Â |
| Double | Â | Â | Â | Â |
| String | 25 | Â | Â | Â |
| Double | Â | Â | Â | Â |
| Double | Â | Â | Â | Â |
| Double | Â | Â | Â | Â |
| Integer | Â | Â | Â | Â |
| Â | Â | Â | Â | |
| Â | Â | Â | Â | |
| Â | Â | Â | Â | |
| Â | Â | Â | Â | |
| Â | Â | Â | Â | |
| Â | Â | Â | Â | |
| Â | Â | Â | Â | |
| Â | Â | Â | Â | |
| Â | Â | Â | Â | |
| Â | Â | Â | Â | |
| Â | Â | Â | Â | |
| Â | Yes | Â | Â | |
| Double | Â | Â | Â | Â |
| Â | Â | Â | Â | |
| Date | Â | Â | Â | from API 3.3 |
| Date | Â | Â | Â | from API 3.3 |
| Â | Â | Â | from API 3.3 | |
| Â | Â | Â | Â | |
| Â | Â | Â | Â | |
| Array of /FreightRate | Â | Â | Â | Â |
| Double | Â | Â | Â | Â |
| Boolean | Â | Â | Â | from API 6.26 |
| Â | Â | Â | from API 6.26 | |
| Â | Â | Â | from API 6.28 | |
| Double | Â | Â | The sum of all freight adjustments on the cargo | from API 6.28 |
office | Â | Â | Â | from API 6.33 | |
| Â | Â | Â | from API 6.33 |
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)