Supported Formats

json

Errors

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

Examples

curl "https://app.octopi.co/api/v1/bill_of_ladings/:id/line_items.json" -d '{ "line_item": { "container_id": 123456789, "container_type_label": "40DV", "container_weight": 4000.0, "container_weight_unit": "kg", "flex_fields": [{ "label": "flex_field_label", "value": "flex_field_value"}] } }' -X POST -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Token token=YOUR TOKEN HERE"
{
  "id": 38,
  "container_id": 123456789,
  "quantity": 1.0,
  "container_number": "OCTO1231239",
  "cargo_type": "container",
  "container_type_label": "40DV",
  "container_weight": 4000.0,
  "container_weight_unit": "kg",
  "flex_fields": [
    {
      "label": "flex_field_label",
      "value": "flex_field_value"
    }
  ]
}

Params

Param name Description
id
optional

Validations:

  • Must be a number.

line_item
optional

Validations:

  • Must be a Hash

line_item[container_id]
required

an id of the container to be assigned to the BL line item, required, the container must belong to the organization

Validations:

  • Must be a number.

line_item[container_type_label]
optional

Container Type label to be assigned to the Line Item. Can be one of the container types defined by the organization.

Validations:

  • Must be a String

line_item[container_weight]
optional

Weight of the Bill of Lading line item

Validations:

  • Must be a decimal number.

line_item[container_weight_unit]
optional

Unit to be used for the Bill of Lading weight

Validations:

  • Must be a String

line_item[flex_fields]
optional

Validations:

  • Must be an Array of nested elements

line_item[flex_fields][label]
optional

The name of the flex field

Validations:

  • Must be a String

line_item[flex_fields][value]
optional

The value of the flex field

Validations:

  • Must be a String