This API endpoint allows you to update data for a specific general cargo.
| Code | Description |
|---|---|
| 404 | Not found. |
| 400 | Bad request. |
| 422 | Unprocessable entity. |
| 500 | Internal server error. |
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": []
}
}
| Param name | Description |
|---|---|
|
id required |
The general cargo ID. Validations:
|
|
goods_description optional |
The cargo’s goods description. Validations:
|
|
consignee_names optional |
An array of consignee names. Validations:
|
|
quantity optional |
The cargo’s quantity. Validations:
|
|
package_weight optional |
The cargo’s package weight. Validations:
|
|
package_type optional |
The cargo’s package type name or code (eg. ‘Box’ or ‘QP’). Validations:
|
|
extra_attributes optional |
A key-value pair of extra attributes for the cargo. Validations:
|
|
current_location_id optional |
the container current location id. Validations:
|
|
current_location_type optional |
the type of current location Validations:
|
|
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:
|