Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 48 Current »

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

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

handlingCost

Double

reletOfCargo

/Cargo

businessUnit

/BusinessUnit

arrivalWindowFrom

Date

arrivalWindowTo

Date

blDate

Date

cargoMatch

String

1

Yes

cargoText

String

64

laytimeTerms

/LaytimeTerms

paymentTerms

/PaymentTerms

tsOfCargoPort

/CargoPort

laytimeUsed

Double

deadfreight

Double

deadfreightRate

Double

demurrageRate

Double

despatchRate

Double

doBunkerAdjustment

Double

finalDestination

String

64

flatRate

Double

foBunkerAdjustment

Double

hasEqualization

Boolean

hasN2Padding

Boolean

height

Double

isCradleRequired

Boolean

isDemurrageFixed

Boolean

isDespatchFixed

Boolean

isExclusive

Boolean

isLifo

Boolean

isOnDeck

Boolean

isReversible

Boolean

laycanFrom

Date

laycanTo

Date

laycanMissedBy

Double

laytimeAllowed

Double

laytimeExpireDate

Date

laytimeTermsValue

Double

laytimeUsedFromDate

Date

laytimeUsedToDate

Date

maxTransitTime

Double

netFio

Double

onDeckOption

Boolean

overrage

Double

pctOverage

Integer

pctPrepaid

Integer

pieces

Double

placeOfOrigin

String

64

shipFigure

Double

specificGravity

Double

specificGravityTemperature

Double

terms

String

25

timeNotToCount

Double

timeOnDemurrage

Double

timeOnDespatch

Double

wsYear

Integer

baselineTerm

/BaselineTerm

baselineTerm2

/BaselineTerm

bookingStatus

/StatusType

coaLine

/CoaLine

coatingType

/CoatingType

dimensionMeasurement

/Measurement

payee

/BusinessPartner

paymentTerms2

/PaymentTerms

project

/Project

supplier

/BusinessPartner

valueCurrency

/Currency

volumeMeasurement

/Measurement

Yes

value

Double

demurrageTimeBarEvent

/Event

laycanTargetFrom

Date

from API 3.3

laycanTargetTo

Date

from API 3.3

company

/Company

from API 3.3

vc

/Vc

cargoType

/CargoType

freightRates

Array of /FreightRate

eeoi

Double

isOption

Boolean

from API 6.26

optionStatus

/StatusType

from API 6.26

freightAdjustments

/FreightAdjustment

from API 6.28

adjustment

Double

The sum of all freight adjustments on the cargo

from API 6.28

office

/Office

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)


Example Response Body

{
    "commodity": {
        "commodityName": "Mabl Commodity",
        "commodityCode": "MABL",
        "key": 13670798,
        "self": "http://rocketleague1.dataloy.com:8080/ws/rest/Commodity/13670798"
    },
    "subCommodity": null,
    "charterer": {
        "businessPartnerName": "Mabl Charterer",
        "businessPartnerSort": "Mabl Charterer",
        "businessPartnerCode": "105",
        "portAgentType": null,
        "businessPartnerType": {
            "businessPartnerType": "C",
            "businessPartnerTypeDesc": "Charterer",
            "key": 1000032,
            "self": "http://rocketleague1.dataloy.com:8080/ws/rest/BusinessPartnerType/1000032"
        },
        "key": 13669721,
        "self": "http://rocketleague1.dataloy.com:8080/ws/rest/BusinessPartner/13669721"
    },
    "portRotation": "BREMEN/LIVORNO",
    "cpDate": null,
    "cargoReference": "13875375",
    "cargoSubReference": null,
    "externalReference": null,
    "scenarios": [
        {
            "key": 6015476,
            "self": "http://rocketleague1.dataloy.com:8080/ws/rest/Scenario/6015476",
            "fleetPlan": {
                "key": 1474127,
                "self": "http://rocketleague1.dataloy.com:8080/ws/rest/FleetPlan/1474127"
            }
        }
    ],
    "createdById": 999999,
    "voyage": {
        "key": 13875364,
        "self": "http://rocketleague1.dataloy.com:8080/ws/rest/Voyage/13875364"
    },
    "area": null,
    "createdDate": "2023-04-21T08:29:26",
    "exchangeRate": 1.0,
    "externalObjectKey": null,
    "modifiedDate": "2023-04-21T12:41:02",
    "company": {
        "key": 13668967,
        "self": "http://rocketleague1.dataloy.com:8080/ws/rest/Company/13668967",
        "companyName": "Mabl Company",
        "companyCode": "MABL",
        "defaultBankAccount": null
    },
    "paymentTerms": {
        "key": 1004279,
        "self": "http://rocketleague1.dataloy.com:8080/ws/rest/PaymentTerms/1004279",
        "paymentTermsCode": "10D"
    },
    "baselineTerm": {
        "key": 1004265,
        "self": "http://rocketleague1.dataloy.com:8080/ws/rest/BaselineTerm/1004265",
        "baselineTermCode": "ARBL",
        "baselineTermDesc": "After Release of Bill of Lading"
    },
    "commission": 0.0,
    "vc": null,
    "handlingCost": 0.0,
    "freightRate": 10.0,
    "leg": null,
    "coaLine": null,
    "cargoPorts": [
        {
            "key": 13875378,
            "self": "http://rocketleague1.dataloy.com:8080/ws/rest/CargoPort/13875378"
        },
        {
            "key": 13875377,
            "self": "http://rocketleague1.dataloy.com:8080/ws/rest/CargoPort/13875377"
        }
    ],
    "reletOfCargo": null,
    "isPerformanceCargo": false,
    "cargoQuantity": 5600.0,
    "businessUnit": {
        "key": 13670758,
        "self": "http://rocketleague1.dataloy.com:8080/ws/rest/BusinessUnit/13670758",
        "businessUnitName": "Mabl Business Unit",
        "businessUnitCode": "MABL"
    },
    "isOption": false,
    "isTemplate": false,
    "commissionBroker": 0.0,
    "laycanFrom": null,
    "laycanMissedBy": 0.0,
    "laycanTo": null,
    "commissions": [],
    "adjustment": 18592.800000000003,
    "comments": null,
    "commissionAddress": 0.0,
    "demurrage": 0.0,
    "despatch": 0.0,
    "doPrice": 0.0,
    "eeoi": 24.208296035498126,
    "foPrice": 0.0,
    "freight": 56000.0,
    "grossFreight": 74592.8,
    "netFreight": 56000.0,
    "variousCost": 0.0,
    "variousRevenue": 0.0,
    "variouses": [],
    "isIssuedLoi": null,
    "laytimeUsed": 0.0,
    "volume": 0.0,
    "arrivalWindowFrom": null,
    "arrivalWindowMissedBy": 0.0,
    "arrivalWindowTo": null,
    "blDate": null,
    "bookedQuantity": 5600.0,
    "cargoMatch": "1",
    "cargoText": null,
    "deadfreight": 0.0,
    "deadfreightRate": 0.0,
    "demurrageRate": 0.0,
    "despatchRate": 0.0,
    "doBunkerAdjustment": 0.0,
    "finalDestination": null,
    "flatRate": 0.0,
    "foBunkerAdjustment": 0.0,
    "freightAmountCurrency": 56000.0,
    "hasEqualization": false,
    "hasN2Padding": false,
    "height": null,
    "isCradleRequired": false,
    "isDemurrageFixed": false,
    "isDespatchFixed": false,
    "isExclusive": false,
    "isLaycanAgreed": null,
    "isLifo": false,
    "isLumpsum": false,
    "isOnDeck": false,
    "isReversible": false,
    "isWorldscale": false,
    "laycanTargetFrom": null,
    "laycanTargetTo": null,
    "laytimeAllowed": 0.0,
    "laytimeExpireDate": null,
    "laytimeTermsValue": 0.0,
    "laytimeUsedFromDate": null,
    "laytimeUsedToDate": null,
    "maxTransitTime": 0.0,
    "minimumQuantity": 0.0,
    "netFio": 10.0,
    "onDeckOption": false,
    "overrage": 0.0,
    "pctOverage": 50,
    "pctPrepaid": 100,
    "pieces": 0.0,
    "placeOfOrigin": null,
    "quantityOptionPct": 0.0,
    "shipFigure": 0.0,
    "specificGravity": 0.0,
    "specificGravityTemperature": 0.0,
    "stowageFactor": 0.0,
    "terms": null,
    "timeNotToCount": 0.0,
    "timeOnDemurrage": 0.0,
    "timeOnDespatch": 0.0,
    "weight": 5600.0,
    "weightFactor": 0.0,
    "width": null,
    "wsYear": null,
    "baselineTerm2": null,
    "bookingStatus": {
        "key": 6022839,
        "self": "http://rocketleague1.dataloy.com:8080/ws/rest/StatusType/6022839",
        "statusTypeCode": "POSS",
        "statusTypeDesc": "Possibility"
    },
    "cargoMeasurement": {
        "measurementCode": "MT",
        "key": 1000578,
        "self": "http://rocketleague1.dataloy.com:8080/ws/rest/Measurement/1000578"
    },
    "cargoType": {
        "key": 6021782,
        "self": "http://rocketleague1.dataloy.com:8080/ws/rest/CargoType/6021782",
        "cargoTypeCode": "SPOT"
    },
    "coatingType": null,
    "demurrageTimeBarEvent": {
        "key": 1000052,
        "self": "http://rocketleague1.dataloy.com:8080/ws/rest/Event/1000052",
        "eventCode": "DEP",
        "eventDesc": "Departed"
    },
    "dimensionMeasurement": null,
    "freightAdjustments": [
        {
            "key": 13875661,
            "self": "http://rocketleague1.dataloy.com:8080/ws/rest/FreightAdjustment/13875661"
        },
        {
            "key": 13875568,
            "self": "http://rocketleague1.dataloy.com:8080/ws/rest/FreightAdjustment/13875568"
        }
    ],
    "freightCurrency": {
        "currencyCode": "USD",
        "currencyName": "U.S. Dollar",
        "key": 400132,
        "self": "http://rocketleague1.dataloy.com:8080/ws/rest/Currency/400132"
    },
    "freightMeasurement": {
        "measurementCode": "MT",
        "key": 1000578,
        "self": "http://rocketleague1.dataloy.com:8080/ws/rest/Measurement/1000578"
    },
    "freightRates": [],
    "laytimeTerms": null,
    "optionStatus": {
        "key": 1000105,
        "self": "http://rocketleague1.dataloy.com:8080/ws/rest/StatusType/1000105",
        "statusTypeCode": "NOT",
        "statusTypeDesc": "Not declared"
    },
    "payee": null,
    "paymentTerms2": null,
    "project": null,
    "quantityOption": null,
    "stowageUnit": {
        "measurementCode": "MT",
        "key": 1000578,
        "self": "http://rocketleague1.dataloy.com:8080/ws/rest/Measurement/1000578"
    },
    "subCargos": [],
    "supplier": null,
    "tsOfCargoPort": null,
    "valueCurrency": {
        "currencyCode": "USD",
        "currencyName": "U.S. Dollar",
        "key": 400132,
        "self": "http://rocketleague1.dataloy.com:8080/ws/rest/Currency/400132"
    },
    "volumeMeasurement": {
        "measurementCode": "CBM",
        "key": 1000579,
        "self": "http://rocketleague1.dataloy.com:8080/ws/rest/Measurement/1000579"
    },
    "weightMeasurement": {
        "measurementCode": "MT",
        "key": 1000578,
        "self": "http://rocketleague1.dataloy.com:8080/ws/rest/Measurement/1000578"
    },
    "weightUnit": {
        "measurementCode": "MT",
        "key": 1000578,
        "self": "http://rocketleague1.dataloy.com:8080/ws/rest/Measurement/1000578"
    },
    "length": null,
    "value": null,
    "remarks": [],
    "isObjectActive": true,
    "key": 13875375,
    "self": "http://rocketleague1.dataloy.com:8080/ws/rest/Cargo/13875375"
}

Top
Back

Related Content

 Expand to see related content


Unknown macro: {dynamiccontentbylabel}



  • No labels