This API endpoint allows you to update the general cargo gross weight.

Supported Formats

json

Errors

Code Description
400 Bad Request.
404 Not found.
500 Server crashed for some reason.

Examples

curl "https://app.octopi.co/api/v1/general_cargoes/:id/weights.json" -X POST -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Token token=YOUR TOKEN HERE" -d '{"general_cargo_weight":{"gross_weight": "50000.98", "weight_unit": "lb"}}'
{
  "general_cargo": {
    "id": "GENERAL CARGO ID",
    "goods_description": "GOODS DESCRIPTION"
    "general_cargo_weight": {
      "weight_unit": "lb",
      "gross_weight": "50000.98",
      "created_at": "2021-08-13T16:50:26Z",
      "user": "System"
    }
  }
}

Params

Param name Description
general_cargo_weight
required

Validations:

  • Must be a Hash

general_cargo_weight[gross_weight]
required

Provide gross weight of general cargo here.

Validations:

  • Must be a String

general_cargo_weight[weight_unit]
optional

This parameter is required if it is different than the organization weight unit preference.

Validations:

  • Must be one of: kg, lb.