Supported Formats

json

Errors

Code Description
404 Not Found: one of the requested resources wasn't found.
422 Unprocessable Entity: unable to process request due to an input or validation error.
500 Internal Server Error.

Examples

curl --location --request PATCH 'https://app.octopi.co/api/v1/containers/NUMBER' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Authorization: Token token=TOKEN' \
--data-raw '{
    "container": {
        "hazmat_codes": ["3536"],
        "current_location_id": 35,
        "current_location_type": "Terminal",
        "flex_fields": [
          { "container_flex_field_1": "ABC123" },
          { "container_flex_field_2": "XYZ456" }
        ]
    }
}'
{
  "container": {
    "container_type_id": 784,
    "hazmat_codes": ["3536"],
    "operating_reefer": true,
    "reefer_humidity": 50.5,
    "reefer_ventilation": 100,
    "return_temperature": 12.0,
    "seals": ["AN22283"],
    "set_point_temperature": 10.0,
    "status": "full",
    "supply_temperature": 11.0,
    "temperature_unit": "C",
    "flex_fields": [
      {
        "label": "Flex Field 1",
        "value": "ABC123"
      },
      {
        "label": "Flex Field 2",
        "value": "XYZ456"
      }
    ]
  }
}

Params

Param name Description
number
required

The number of the container to update

Validations:

  • Must be a String

container
required

Validations:

  • Must be a Hash

container[consignee_ids]
optional

an array of consignee ids for this container. Available consignee ids can be retrieved through /api/v1/consignees

Validations:

  • Must be an array of Integer

container[container_type_id]
optional

an id of ISO container type. Available container types can be retrieved through /api/v1/container_types

Validations:

  • Must be a number.

container[current_location_id]
optional

the container current location id.

Validations:

  • Must be a number.

container[current_location_type]
optional

the type of current location

Validations:

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

container[hazmat_codes]
optional

Replace the existing hazmat codes on a container using this list of codes. Passing an empty array removes any hazmat codes from the container.

Validations:

  • Must be an array of String

container[operating_reefer]
optional

indicate if the reefer is in operational status or not (OR or NOR). Note that set_point_temperature cannot be changed on non operational refer and an error will be return in that case.

Validations:

  • Must be one of: true, false, 1, 0.

container[return_temperature]
optional

the current temperature measured by the sensor at the air return of the reefer.

Validations:

  • Must be a decimal number.

container[supply_temperature]
optional

the current temperature inside of the reefer measured by the sensor placed close to the source of cool air.

Validations:

  • Must be a decimal number.

container[set_point_temperature]
optional

the desired temperature that the reefer operator sets for the system to maintain.

Validations:

  • Must be a decimal number.

container[temperature_unit]
optional

the measurement unit for any of temperature params. Accepted values are C, F, celsius, fahrenheit. This params is required if any of temperature params are given.

Validations:

  • Must be one of: C, celsius, F, fahrenheit.

container[reefer_humidity]
optional

the % of humidity inside of the reefer setting.

Validations:

  • Must be a decimal number.

container[reefer_ventilation]
optional

the % of opening the Fresh Air Makeup Vent. The % is used as a setting on that Vent.

Validations:

  • Must be a decimal number.

container[seals]
optional

Replace the existing seals on a container using this list of seals. A maximum of 4 seals are accepted. Passing an empty array removes any seals from the container.

Validations:

  • Must be an array of String

container[status]
optional

the current status of the container

Validations:

  • Must be one of: full, empty.

container[over_height]
optional

indicate if the container is over height.

Validations:

  • Must be one of: true, false, 1, 0.

container[over_length]
optional

indicate if the container is over length.

Validations:

  • Must be one of: true, false, 1, 0.

container[over_width]
optional

indicate if the container is over width.

Validations:

  • Must be one of: true, false, 1, 0.

container[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 container.

Validations:

  • Must be an array of Hash