In Octopi, a container object can represent a container, but sometimes can also represent non-containerized cargo such as break-bulk cargo, cars, boats, etc…

When a container object has a number, it is a container. When the number is left blank, it represents another type of cargo such as vehicle, breakbulk, boat, etc…

Containers have many movements. A movement can be a Gate In, Gate Out, Full Strippping, Container Damage, Unloading, etc…

Supported Formats

json

GET /api/v1/containers/:number.json
Returns information about a container

This endpoint returns information about a container. On top of the attributes of the container, it also returns information about the last movement that was recorded for this container.“

Supported Formats

json

Errors

Code Description
404 Not found
500 Server crashed for some reason

Examples

curl "https://app.octopi.co/api/v1/containers/ADD CONTAINER NUMBER HERE.json" -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Token token=YOURTOKEN"
{
  "container" : {
    "number" : "BMOU4286229",
    "bill_of_ladings": ["PEV1231231", "PFS12312321"],
    "status" : "full",
    "size"  : "20",
    "container_type" : {
      "label": "20DV",
      "description": "This is a 20 ft. container",
      "iso_type_code": "22G1"
    },
    "is_high_cube": false,
    "is_refeer": false,
    "arrival_voyage" : {
      "number": "2345",
      "vessel": {
        "name": "Vega Luna",
        "estimated_time_of_anchorage": "2017-04-07T02:00:00.000Z"
      }
    },
    "departure_voyage" : {
      "number": "2345",
      "vessel": {
        "name": "Vega Luna",
        "estimated_time_of_anchorage": "2017-05-07T02:00:00.000Z"
      }
    },
    "weight" : 100.0,
    "container_vgm": {
      "weight": 100.0,
      "created_at": "2017-04-07T02:00:00.000Z",
      "user": {
        "name": "John D."
      }
    },
    "usage" : "unknown",
    "shipping_line" : {
      "code": "MASL",
      "name": "Ma Shipping Line",
      "carrier_type": "Ocean",
      "agent": {
        "name": "John Doe"
      }
    },
    "consignees" : [
      {
        "name": "SODIPAL SA"
      }
    ],
    "meets_iso_standards" : true,
    "goods" : "TOILET TISSUEHS CODE  481810",
    "current_location" : "Port: HTPAP",
    "current_location_type" : "Port",
    "iso_standards_errors" : "",
    "hazmat_codes": [
      {
        "code": "12XV",
        "description": "hazmat",
        "name": "Hextol",
        "hazmat_class": {
          "name": "Explosives",
          "description": "Explosives that have a projection hazard but not a mass explosion hazard.",
          "class_number": 1,
          "division_number": 2
        }
      }
    ],
    "actions" : {
       "show" : {
          "url" : "https://app.octopi.co/api/v1/containers/BMOU4286229.json",
          "method" : "GET"
    }
  }
}

Params

Param name Description
number
required

Validations:

  • Must be String


PUT /api/v1/containers/:number/strip
Creates a full stripping movement on the container

Supported Formats

json

Errors

Code Description
404 Not found
500 Server crashed for some reason

Examples

curl -v -X PUT \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "Authorization: Token token=YOURTOKEN" \
  "https://app.octopi.co/api/v1/containers/CONTAINER_NUMBER/strip"

Params

Param name Description
number
required

Validations:

  • Must be String

occurred_at
optional

when stripping occurred, will use current time if not provided

Validations:

  • Must be DateTime


PUT /api/v1/containers/:number/stuff
Creates a full stuffing movement on the container

Supported Formats

json

Errors

Code Description
404 Not found
500 Server crashed for some reason

Examples

curl -v -X PUT \
  -H "Accept: application/json"  \
  -H "Content-Type: application/json" \
  -H "Authorization: Token token=YOUR_TOKEN" \
  -d'{"goods": "linux laptops"}' \
  "https://app.octopi.co/api/v1/containers/CONTAINER_NUMBER/stuff"
curl -v -X PUT \
  -H "Accept: application/json"  \
  -H "Content-Type: application/json" \
  -H "Authorization: Token token=YOUR_TOKEN" \
  "https://app.octopi.co/api/v1/containers/CONTAINER_NUMBER/stuff"

Params

Param name Description
number
required

Validations:

  • Must be String

occurred_at
optional

when stuffing occurred, will use current time if not provided

Validations:

  • Must be DateTime

goods
optional

goods stuffed into container

Validations:

  • Must be String