This API endpoint allows you to update data for a specific general cargo.

Supported Formats

json

Errors

Code Description
404 Not found.
400 Bad request.
422 Unprocessable entity.
500 Internal server error.

Examples

curl -X PUT \
"https://app.octopi.co/api/v1/general_cargoes/:id.json" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Token token=YOUR_TOKEN" \
-d '{
  "general_cargo": {
    "goods_description": "Pipes",
    "consignee_names": ["UNITY LOGISTICS"],
    "quantity": 12.0,
    "package_weight": 100,
    "package_type": "crate",
    "current_location_id": 35,
    "current_location_type": "Terminal",
    "extra_attributes": {
      "foo": "bar"
    }
  }
}'
{
  "general_cargo": {
    "id": 1234,
    "reference_number": "",
    "quantity": 12.0,
    "goods": "Pipes",
    "goods_description": "12.0 crates of Pipes",
    "shipping_marks": "",
    "usage": "import",
    "consignee": "Consignee: UNITY LOGISTICS",
    "current_location_type": "YardArea",
    "current_location": "Warehouse",
    "weight_unit": "lb",
    "weight": 0.0,
    "dimension_unit": "inches",
    "width": 0.0,
    "height": 0.0,
    "length": 0.0,
    "volume": "0.00",
    "pieces_per_package": null,
    "package_weight": 100,
    "yard_slot": null,
    "package_type_code": "CR",
    "package_type": "crate",
    "extra_attributes": {
      "foo": "bar"
    },
    "flex_fields": []
  }
}

Params

Param name Description
id
required

The general cargo ID.

Validations:

  • Must be a Integer

goods_description
optional

The cargo’s goods description.

Validations:

  • Must be a String

consignee_names
optional

An array of consignee names.

Validations:

  • Must be an array of String

quantity
optional

The cargo’s quantity.

Validations:

  • Must be a Numeric

package_weight
optional

The cargo’s package weight.

Validations:

  • Must be a Numeric

package_type
optional

The cargo’s package type name or code (eg. ‘Box’ or ‘QP’).

Validations:

  • Must be a String

extra_attributes
optional

A key-value pair of extra attributes for the cargo.

Validations:

  • Must be a Hash

current_location_id
optional

the container current location id.

Validations:

  • Must be a number.

current_location_type
optional

the type of current location

Validations:

  • Must be one of: Terminal, YardArea, YardSlot, Port, BerthArea.

flex_fields
optional

An array of hashes, where each hash contains a flex field’s canonical name and the corresponding value to be set on the general cargo.

Validations:

  • Must be an array of Hash