Octopi allows holds to be placed on containers.

A terminal operator can created has many hold types as possible to automatically or manually create holds on containers.

Holds can be placed on containers. When a container has a hold, it cannot be delivered to the customer (via a gate movement or a container stripping) or loaded on a vessel for export.

Supported Formats

json

GET /api/v1/containers/:container_number/holds.json

Supported Formats

json

Errors

Code Description
404 Not found
409 Conflict
500 Server crashed for some reason

Examples

This endpoint returns a list of holds that have been placed on the container.
curl "https://app.octopi.co/api/v1/containers/ADD CONTAINER NUMBER HERE/holds.json" -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Token token=YOURTOKEN"
{
  "holds": [
    {
      "lifted": false,
      "applied_at": "2016-11-30T14:12:05Z",
      "lifted_at": null,
      "lifted_until": null,
      "lifted_by": null,
      "hold_type_id": 1,
      "hold_type": "DETENTION HOLD",
      "actions": {
        "lift": {
          "method": "PUT",
          "url": "https://app.octopi.co/api/v1/containers/BMOU4286229/holds/51359/lift.json"
        },
        "apply": {
          "method": "PUT",
          "url": "https://app.octopi.co/api/v1/containers/BMOU4286229/holds/1/apply.json"
        }
      },
      "id": 51359,
      "reference_number": null,
      "applied_by": {
        "id": 3140,
        "created_at": "2020-08-04T07:56:04.939-04:00",
        "updated_at": "2022-03-28T11:11:59.496-04:00",
        "organization_id": 8,
        "agent_id": null,
        "shipping_line_id": null,
        "consignee_id": null,
        "email": "jane.smith@example.com",
        "firstname": "Jane",
        "lastname": "Smith",
        "office_phone": "",
        "mobile_phone": "",
        "title": "Clerical Officer",
        "address": "",
        "roles_users_count": 5,
        "work_location_type": "",
        "work_location_id": null,
        "trucking_company_id": null,
        "active": true,
        "is_equipment_operator": false,
        "high_contrast_ui": false,
        "freight_forwarder_id": null,
        "staff": false,
        "beta_tester": false,
        "locale": "en",
        "pending_approval": false,
        "broker_id": null,
        "enforce_mfa": false,
        "name": "Jane Smith"
      }
    },
    {
      "lifted_at": null,
      "lifted_until": null,
      "lifted_by": null,
      "lifted": false,
      "applied_at": null,
      "applied_by": null,
      "actions": {
        "apply": {
          "method": "PUT",
          "url": "https://app.octopi.co/api/v1/containers/BMOU4286229/holds/2/apply.json"
        },
        "lift": {
          "method": "PUT",
          "url": "https://app.octopi.co/api/v1/containers/BMOU4286229/holds/51360/lift.json"
        }
      },
      "hold_type_id": 2,
      "hold_type": "GATE MOVE INVOICE FEE",
      "reference_number": null,
      "id": 51360
    },
    {
      "applied_by": null,
      "actions": {
        "apply": {
          "url": "https://app.octopi.co/api/v1/containers/BMOU4286229/holds/3/apply.json",
          "method": "PUT"
        },
        "lift": {
          "url": "https://app.octopi.co/api/v1/containers/BMOU4286229/holds/51361/lift.json",
          "method": "PUT"
        }
      },
      "hold_type_id": 3,
      "hold_type": "CUSTOMS INVOICE FEE",
      "reference_number": null,
      "id": 51361,
      "lifted_at": null,
      "lifted_until": null,
      "lifted_by": null,
      "lifted": false,
      "applied_at": null
    },
    {
      "lifted_at": null,
      "lifted_until": null,
      "lifted_by": null,
      "lifted": false,
      "applied_at": null,
      "applied_by": null,
      "actions": {
        "apply": {
          "method": "PUT",
          "url": "https://app.octopi.co/api/v1/containers/BMOU4286229/holds/4/apply.json"
        },
        "lift": {
          "method": "PUT",
          "url": "https://app.octopi.co/api/v1/containers/BMOU4286229/holds/51362/lift.json"
        }
      },
      "hold_type_id": 4,
      "hold_type": "PORT AUTHORITY INVOICE FEE",
      "reference_number": null,
      "id": 51362
    },
    {
      "applied_by": null,
      "actions": {
        "apply": {
          "method": "PUT",
          "url": "https://app.octopi.co/api/v1/containers/BMOU4286229/holds/5/apply.json"
        },
        "lift": {
          "method": "PUT",
          "url": "https://app.octopi.co/api/v1/containers/BMOU4286229/holds/51363/lift.json"
        }
      },
      "hold_type_id": 5,
      "hold_type": "SPECIAL HOLD",
      "reference_number": null,
      "id": 51363,
      "lifted_at": null,
      "lifted_by": null,
      "lifted_until": null,
      "lifted": false,
      "applied_at": null
    },
    {
      "lifted_at": null,
      "lifted_by": null,
      "lifted_until": null,
      "lifted": false,
      "applied_at": null,
      "applied_by": null,
      "actions": {
        "apply": {
          "url": "https://app.octopi.co/api/v1/containers/BMOU4286229/holds/6/apply.json",
          "method": "PUT"
        },
        "lift": {
          "url": "https://app.octopi.co/api/v1/containers/BMOU4286229/holds/51364/lift.json",
          "method": "PUT"
        }
      },
      "hold_type_id": 6,
      "hold_type": "MAINTENANCE HOLD",
      "reference_number": null,
      "id": 51364
    }
  ]
}

Params

Param name Description
container_number
required

Validations:

  • Must be a String


PUT /api/v1/containers/:container_number/holds/:id/lift.json

Supported Formats

json

Errors

Code Description
404 Not found
409 Conflict
500 Server crashed for some reason

Examples

This endpoint can be used to lift a hold from a container.
curl "https://app.octopi.co/api/v1/containers/ADD CONTAINER NUMBER HERE/holds/ADD HOLD ID HERE/lift.json" -X PUT -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Token token=YOURTOKEN" -d '{"hold": { "reference_number": "ADD REFERENCE NUMBER HERE", "lift_until": "2025-10-10", "notes": "ADD LIFTED NOTE HERE"} }'
{
  "reference_number": "REF123",
  "actions": {
    "lift": {
      "method": "PUT",
      "url": "https://app.octopi.co/api/v1/containers/BMOU4286229/holds/51363/lift.json"
    },
    "index": {
      "method": "GET",
      "url": "https://app.octopi.co/api/v1/containers/BMOU4286229/holds.json"
    }
  },
  "lifted_by": "Jane Smith",
  "applied_by": {
    "id": 3140,
    "created_at": "2020-08-04T07:56:04.939-04:00",
    "updated_at": "2022-03-28T11:11:59.496-04:00",
    "organization_id": 8,
    "agent_id": null,
    "shipping_line_id": null,
    "consignee_id": null,
    "email": "jane.smith@example.com",
    "firstname": "Jane",
    "lastname": "Smith",
    "office_phone": "",
    "mobile_phone": "",
    "title": "Clerical Officer",
    "address": "",
    "roles_users_count": 5,
    "work_location_type": "",
    "work_location_id": null,
    "trucking_company_id": null,
    "active": true,
    "is_equipment_operator": false,
    "high_contrast_ui": false,
    "freight_forwarder_id": null,
    "staff": false,
    "beta_tester": false,
    "locale": "en",
    "pending_approval": false,
    "broker_id": null,
    "enforce_mfa": false,
    "name": "Jane Smith"
  },
  "hold_type_id": 13,
  "hold_type": "CUSTOMS HOLD",
  "lifted": true,
  "lifted_at": "2016-12-01T09:46:23.738-05:00",
  "applied_at": "2016-11-30T14:12:05Z",
  "notes": null
}

Params

Param name Description
container_number
required

Validations:

  • Must be a String

id
required

Validations:

  • Must be a Integer


PUT /api/v1/containers/:container_number/holds/:hold_type_id/apply.json

Supported Formats

json

Errors

Code Description
404 Not found
409 Conflict
500 Server crashed for some reason

Examples

This endpoint can be used to apply a hold to a container. A successful request
returns 201 Created with an empty body.
curl "https://app.octopi.co/api/v1/containers/CONTAINER_NUMBER/holds/HOLD_TYPE_ID/apply.json" -X PUT -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Token token=YOURTOKEN"

Params

Param name Description
container_number
required

Validations:

  • Must be a String

id
required

Validations:

  • Must be a Integer