Supported Formats

json

Errors

Code Description
400 Bad Request.
404 Resource Not Found.
500 Internal Server Error.

Examples

curl "https://app.octopi.co/api/v1/manifests/:manifest_client_identifier/bill_of_ladings/:number/cargoes.json" -d '{ "container_type": "20DV", "shipping_line": "KOSU", "delivery_type": "gate", "tags": ["heavy", "xyz"], "hazmat_codes": "0007,0038", "cargo": { "cargo_type": "container", "container_number": "container_number", "container_status": "full", "weight": 10000.10, "description": "It is a container.", "container_seals": "sello1,sello2", "sold_status": "not_for_sale", "usage": "transshipment", "client_identifier": "THE_CLIENT_IDENTIFIER", "vin": "1N4AL3AP6FN884262", "make": "NISSAN", "model":"Altima", "year": "2014", "color":"RED" } }' -X POST -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Token token=YOURTOKEN"
{
  "actions": {
      "create": {
          "method": "POST",
          "url": "https://app.octopi.co/api/v1/manifests/:manifest_client_identifier/bill_of_ladings/:number/cargoes.json"
      }
  },
  "cargo": {
    "manifest": {
      "client_identifier": "e67be26c-0dc9-4542-a6ee-9d99831156e1"
    },
    "bill_of_lading": {
      "number": "MASS123"
    },
    "container_type": {
      "labels": [
        "20DV",
        "20DC",
        "20ST",
        "20RG",
        "D20",
        "20CT",
        "22G1",
        "22G0",
        "2200",
        "20DV"
      ]
    },
    "tags": [
      "heavy",
      "xyz"
    ],
    "hazmat_codes": [],
    "client_identifier": "THE_CLIENT_IDENTIFIER",
    "cargo_type": "vehicle",
    "id": 83415,
    "container_number": null,
    "container_status": "full",
    "container_seals": [
      "SELLO1",
      "SELLO2"
    ],
    "weight": 10000.1,
    "description": "It is a container.",
    "reference_number": null,
    "shipping_marks": "shipping marks",
    "volume": null,
    "quantity": 1.0,
    "temperature": "",
    "temperature_unit": "celsius",
    "sold_status": "not_for_sale",
    "usage": "transshipment_load",
    "shippers_owned": false
  }
}

Params

Param name Description
manifest_client_identifier
required

The same client_identifier provided on manifest creation.

Validations:

  • Must be a String

number
required

The bill of lading number provided on bill of lading creation.

Validations:

  • Must be a String

container_type
optional

Container type is required if cargo type is a container.

Validations:

  • Must be a String

hazmat_codes
optional

Multiple hazmat codes should be encoded using a comma separated values strategy.

Validations:

  • Must be a String

shipping_line
required

Container shipping line is required. Send the shipping line code and Octopi will try to find the shipping line. If a shipping line is not found an error will be returned.

Validations:

  • Must be a String

delivery_type
optional

Validations:

  • Must be one of: gate, unstuff, transshipment, cruise, empty, partial_unstuff.

tags
optional

List of tags associated with this cargo.

Validations:

  • Must be an array of any type

cargo
optional

Validations:

  • Must be a Hash

cargo[cargo_type]
required

The Octopi team is working to add more options.

Validations:

  • Must be one of: breakbulk, container, vehicle.

cargo[container_status]
optional

Validations:

  • Must be one of: full, empty.

cargo[container_number]
optional

Container number is required if cargo type is a container.

Validations:

  • Must be a String

cargo[container_seals]
optional

Multiple seals should be encoded using a comma separated values strategy.

Validations:

  • Must be a String

cargo[weight]
optional

Weight is in kg

Validations:

  • Must be a Float

cargo[description]
optional

Validations:

  • Must be a String

cargo[volume]
optional

Validations:

  • Must be a Float

cargo[quantity]
optional

Validations:

  • Must be a Integer

cargo[temperature]
optional

Validations:

  • Must be a Float

cargo[temperature_unit]
optional

Validations:

  • Must be one of: fahrenheit, celsius.

cargo[sold_status]
optional

Validations:

  • Must be one of: not_for_sale, for_sale, sold.

cargo[usage]
optional

Validations:

  • Must be one of: gate, unstuff, transshipment, cruise, empty, partial_stuff.

cargo[shippers_owned]
optional

Validations:

  • Must be one of: true, false.

cargo[client_identifier]
optional

Validations:

  • Must be a String

cargo[vin]
optional

Validations:

  • Must be a String

cargo[make]
optional

Validations:

  • Must be a String

cargo[shipping_marks]
optional

Validations:

  • Must be a String

cargo[reference_number]
optional

Validations:

  • Must be a String

cargo[model]
optional

Validations:

  • Must be a String

cargo[year]
optional

Container year must be a 4 digits number.

Validations:

  • Must be a String

cargo[color]
optional

Validations:

  • Must be a String