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 36 Next »

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 CargoPor 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 cargoQuantiy 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

PropertyTypeLengthMandatoryDescriptionComments
commodity
/Commodity



subCommodity
/SubCommodity



charterer
/BusinessPartner



portRotation
String256


cpDate
Date



cargoReference
String16


cargoSubReference
String4


externalReference
String64


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



isTemplateBoolean

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
isWorldscaleBoolean



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
String64


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
String1Yes

cargoText
String64


laytimeTerms
/LaytimeTerms



paymentTerms
/PaymentTerms



tsOfCargoPort
/CargoPort



laytimeUsed
Double



deadfreight
Double



deadfreightRate
Double



demurrageRate
Double



despatchRate
Double



doBunkerAdjustment
Double



finalDestination
String64


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
String64


shipFigure
Double



specificGravity
Double



specificGravityTemperature
Double



terms
String25


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



laycanTargetFromDate


from API 3.3
laycanTargetToDate


from API 3.3
company/Company


from API 3.3
vc

/Vc





cargoType/CargoType




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": "Charcoal",
        "commodityCode": "CHCO",
        "key": 1672785,
        "self": "http://platform-dev.dataloy.com:80/ws/rest/Commodity/1672785"
    },
    "subCommodity": null,
    "charterer": {
        "businessPartnerName": "Sand AS",
        "businessPartnerSort": "LOCHALINE",
        "businessPartnerCode": "31339",
        "portAgentType": null,
        "businessPartnerType": {
            "businessPartnerType": "C",
            "businessPartnerTypeDesc": "Charterer",
            "key": 1000032,
            "self": "http://platform-dev.dataloy.com:80/ws/rest/BusinessPartnerType/1000032"
        },
        "key": 20884163,
        "self": "http://platform-dev.dataloy.com:80/ws/rest/BusinessPartner/20884163"
    },
    "portRotation": "ROTTERDAM/BOTANY BAY",
    "cpDate": null,
    "cargoReference": "35509192",
    "cargoSubReference": null,
    "externalReference": null,
    "commissions": [],
    "cargoPorts": [
        {
            "key": 35509194,
            "self": "http://platform-dev.dataloy.com:80/ws/rest/CargoPort/35509194"
        },
        {
            "key": 35509195,
            "self": "http://platform-dev.dataloy.com:80/ws/rest/CargoPort/35509195"
        }
    ],
    "variouses": [],
    "createdDate": "2020-08-18T15:34:01",
    "modifiedDate": "2020-08-20T09:05:13",
    "createdById": 35370791,
    "voyage": {
        "key": 35508713,
        "self": "http://platform-dev.dataloy.com:80/ws/rest/Voyage/35508713"
    },
    "company": {
        "key": 1000001,
        "self": "http://platform-dev.dataloy.com:80/ws/rest/Company/1000001",
        "companyCode": "5897",
        "companyName": "Peak Shipping AS",
        "defaultBankAccount": null
    },
    "area": null,
    "exchangeRate": 0.9208117329079711,
    "paymentTerms": null,
    "baselineTerm": null,
    "commission": 0.0,
    "vc": null,
    "handlingCost": 0.0,
    "freightRate": 0.0,
    "comments": null,
    "commissionAddress": 0.0,
    "businessUnit": {
        "key": 1000576,
        "self": "http://platform-dev.dataloy.com:80/ws/rest/BusinessUnit/1000576",
        "businessUnitCode": "01",
        "businessUnitName": "Peak Shipping"
    },
    "leg": null,
    "coaLine": null,
    "reletOfCargo": null,
    "isPerformanceCargo": false,
    "cargoQuantity": 0.0,
    "commissionBroker": 0.0,
    "laycanFrom": null,
    "laycanMissedBy": 0.0,
    "laycanTo": null,
    "demurrage": 0.0,
    "despatch": 0.0,
    "doPrice": 0.0,
    "foPrice": 0.0,
    "freight": 0.0,
    "grossFreight": 0.0,
    "netFreight": 0.0,
    "variousCost": 0.0,
    "variousRevenue": 0.0,
    "arrivalWindowFrom": null,
    "arrivalWindowTo": null,
    "blDate": null,
    "bookedQuantity": 0.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": 0.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,
    "isTemplate": 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": 0.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": "0 C/0 C",
    "timeNotToCount": 0.0,
    "timeOnDemurrage": 0.0,
    "timeOnDespatch": 0.0,
    "weight": 0.0,
    "weightFactor": 0.0,
    "width": null,
    "wsYear": null,
    "baselineTerm2": null,
    "bookingStatus": {
        "key": 1000119,
        "self": "http://platform-dev.dataloy.com:80/ws/rest/StatusType/1000119",
        "statusTypeCode": "IND",
        "statusTypeDesc": "Indication"
    },
    "cargoMeasurement": {
        "measurementCode": "MT",
        "key": 1000578,
        "self": "http://platform-dev.dataloy.com:80/ws/rest/Measurement/1000578"
    },
    "coatingType": null,
    "demurrageTimeBarEvent": {
        "key": 1000052,
        "self": "http://platform-dev.dataloy.com:80/ws/rest/Event/1000052",
        "eventCode": "DEP",
        "eventDesc": "Departed"
    },
    "dimensionMeasurement": null,
    "freightCurrency": {
        "currencyCode": "USD",
        "currencyName": "U.S. Dollar",
        "key": 400132,
        "self": "http://platform-dev.dataloy.com:80/ws/rest/Currency/400132"
    },
    "freightMeasurement": {
        "measurementCode": "MT",
        "key": 1000578,
        "self": "http://platform-dev.dataloy.com:80/ws/rest/Measurement/1000578"
    },
    "laytimeTerms": null,
    "payee": null,
    "paymentTerms2": null,
    "project": null,
    "quantityOption": null,
    "stowageUnit": {
        "measurementCode": "MT",
        "key": 1000578,
        "self": "http://platform-dev.dataloy.com:80/ws/rest/Measurement/1000578"
    },
    "subCargos": [],
    "supplier": null,
    "tsOfCargoPort": null,
    "valueCurrency": {
        "currencyCode": "USD",
        "currencyName": "U.S. Dollar",
        "key": 400132,
        "self": "http://platform-dev.dataloy.com:80/ws/rest/Currency/400132"
    },
    "volumeMeasurement": {
        "measurementCode": "CBM",
        "key": 1000579,
        "self": "http://platform-dev.dataloy.com:80/ws/rest/Measurement/1000579"
    },
    "weightMeasurement": {
        "measurementCode": "MT",
        "key": 1000578,
        "self": "http://platform-dev.dataloy.com:80/ws/rest/Measurement/1000578"
    },
    "weightUnit": {
        "measurementCode": "MT",
        "key": 1000578,
        "self": "http://platform-dev.dataloy.com:80/ws/rest/Measurement/1000578"
    },
    "isIssuedLoi": null,
    "laytimeUsed": 0.0,
    "volume": 0.0,
    "length": null,
    "value": null,
    "remarks": [],
    "isObjectActive": true,
    "key": 35509192,
    "self": "http://platform-dev.dataloy.com:80/ws/rest/Cargo/35509192"
}

Top
Back

Related Content

 Expand to see related content


Unknown macro: {dynamiccontentbylabel}

  • No labels