Octopi is a modern Terminal Operating System (TOS).

REST & Hypermedia

The Octopi API is a RESTful API using JSON and the HATEOAS paradigm. In every JSON response from the API, you will find a list of actions returned as a JSON array. These actions are all the methods available on the API resource. We encourage you to build your clients to use these actions dynamically. That way, if the API changes URLs, your client will keep functioning without changing the source code of your client application.

Authentication

The Octopi API uses HTTP Token Access Authentication.

To authenticate, you need to pass in your API Key (obtained from the Octopi Team) in the HTTP request header using an ‘Authorization’ header with the API key as a token. For example, the header should have “Token token=yourapikey”.

Dates and Times

The Octopi API returns all dates and times in ISO 8601 format and UTC.

Resources

Appointments
Fetch the available appointment slots, list, view, create, update, reschedule, and cancel appointments in Octopi.

Resource Description
GET /api/v1/appointments
POST /api/v1/appointments
GET /api/v1/appointment/:appointment_number
PUT /api/v1/appointment/:appointment_number
PUT /api/v1/appointment/:appointment_number/cancel
GET /api/v1/appointments/appointment_slots

Average_truck_visit_durations
This resource allows you to fetch daily average truck visit durations.

Resource Description
GET /api/v1/average_truck_visit_durations.json Gets a list of average truck visit durations

Bill_of_ladings
This resource allows you to fetch bill of ladings.

Resource Description
GET /api/v1/bill_of_ladings.json Returns a list of bill of ladings.

Bill_of_ladings::Line_items
This resource allows you to fetch a list of line items on bill of ladings.

Resource Description
GET /api/v1/bill_of_ladings/:id/line_items.json Returns a list of line items on a Bill of Lading.
POST /api/v1/bill_of_ladings/:id/line_items.json Creates a Line Item for a Bill of Lading with given ID
PATCH /api/v1/bill_of_ladings/:bill_of_lading_id/line_items/:id Updates one Line Item with given ID for a Bill of Lading with bill_of_lading_id
DELETE /api/v1/bill_of_ladings/:bill_of_lading_id/line_items/:id Deletes the given bill of lading line item

Billing::Payment_providers::Paycargo
This resource allows PayCargo to interact with Octopi.

Resource Description
GET /api/v1/billing/payment_providers/paycargo/fees
POST /api/v1/billing/payment_providers/paycargo/payment

Bookings
This resource allows you to fetch one booking from Octopi.

Resource Description
GET /api/v1/bookings/:number.json

Cargoes::Holds
This resource allows you to list or lift holds for cargo.

Resource Description
GET /api/v1/cargoes/:id/holds.json
PUT /api/v1/cargoes/:cargo_id/holds/:id/lift.json
PUT /api/v1/cargoes/:id/holds/:hold_id/apply.json

Chassis
This resource allows you to retrieve data for one chassis from Octopi.

Resource Description
GET /api/v1/chassis.json
GET /api/v1/chassis/:number.json
POST /api/v1/chassis.json Create a new chassis
PATCH /api/v1/chassis/:number.json Update an existing chassis

Consignees
This resources allows you to create, read, update, or delete consignees in Octopi.

Resource Description
GET /api/v1/consignees Returns the list of consignees
GET /api/v1/consignees/:id Returns information about a consignee
POST /api/v1/consignees Create a new consignee
PUT /api/v1/consignees/:id Updates a consignee record
DELETE /api/v1/consignees/:id Delete a consignee record

Consignees::Bill_of_ladings
This resource returns bill of ladings linked to a consignee.

Resource Description
GET /api/v1/consignees/:consignee_id/bill_of_ladings.json

Consignees::Packing_list_items
This resource returns packing list items linked to a consignee.

Resource Description
GET /api/v1/consignees/:consignee_id/packing_list_items.json

Container_types
This resource allows you to fetch container types.

Resource Description
GET /api/v1/container_types.json Returns a list of container types.

Container_weights
This resource allows you to fetch container weights in Octopi.

Resource Description
GET /api/v1/container_weights.json Returns all the container weights present in Octopi.
GET /api/v1/container_weights/:id.json Returns information about the container weight.

Containers
This resource allows you to interact with containers in Octopi.

Resource Description
GET /api/v1/containers/:number.json Returns information about the container.
POST /api/v1/containers Creates a container not currently at the terminal
PATCH /api/v1/containers/:number.json Updates the container's attributes.

Containers::Damages
This resource allows you to view and create container damages in Octopi.

Resource Description
GET /api/v1/containers/:container_number/damages.json Returns a list of Container Damages.
GET /api/v1/containers/:container_number/damages/:id.json Returns a Container Damage.
POST /api/v1/containers/:container_number/damages.json Creates a Container Damage.
PATCH /api/v1/containers/:container_number/damages/:id Starts and completes the repair for a Container Damage.

Containers::Extra_attributes
This resource allows you modify extra_attributes for containers on Octopi.

Resource Description
PUT /api/v1/containers/:number/extra_attributes/:label Updates a Container

Containers::Flex_fields
This resource allows you modify flex fields for containers on Octopi.

Resource Description
PUT /api/v1/containers/:number/flex_fields/:label Updates a Container

Containers::Holds
This resource allows you to list or lift holds for a container.

Resource Description
GET /api/v1/containers/:container_number/holds.json
PUT /api/v1/containers/:container_number/holds/:id/lift.json
PUT /api/v1/containers/:container_number/holds/:hold_type_id/apply.json

Containers::Movements
This resource allows you to fetch information about movements.

Resource Description
GET /api/v1/containers/:container_number/movements.json

Containers::Strips

Resource Description
PUT /api/v1/containers/:container_number/strip Creates a full stripping movement on the container

Containers::Stuffs

Resource Description
PUT /api/v1/containers/:container_number/stuff Creates a full stuffing movement on the container

Containers::Tags
This resource allows you to apply tags to containers in Octopi.

Resource Description
POST /api/v1/containers/:container_number/tags.json Apply tags to containers in Octopi.

Containers::Terminal_services
Terminal Services

Resource Description
GET /api/v1/containers/:container_number/terminal_services.json

Containers::Weights
This resource allows you to update container gross weight in Octopi.

Resource Description
POST /api/v1/containers/:container_number/weights.json Updates a container gross weight.

Freight_forwarders
This resources allows you to create, read, update, or delete freight forwarders in Octopi.

Resource Description
GET /api/v1/freight_forwarders.json Returns the list of freight forwarders
GET /api/v1/freight_forwarders/:id Returns information about a freight forwarder
POST /api/v1/freight_forwarders Create a new freight forwarder
PUT /api/v1/freight_forwarders/:id Updates a freight forwarder record
DELETE /api/v1/freight_forwarders/:id Soft deletes a freight forwarder record

General_cargoes
This resource allows you to fetch data about general cargo.

Resource Description
GET /api/v1/general_cargoes.json Gets a list of general cargo
GET /api/v1/general_cargoes/:id.json Returns information about a specific general cargo
PUT /api/v1/general_cargoes/:id.json Update general cargo data

General_cargoes::Flex_fields
This resource allows you modify flex fields for general_cargo on Octopi.

Resource Description
PUT /api/v1/general_cargoes/:id/flex_fields/:label Updates a specific general cargo

General_cargoes::Terminal_services
Terminal Services

Resource Description
GET /api/v1/general_cargoes/:general_cargo_id/terminal_services.json

General_cargoes::Weights
This resource allows you to update general cargo gross weight in Octopi.

Resource Description
POST /api/v1/general_cargoes/:general_cargo_id/weights.json Updates a general cargo gross weight.

Gensets
This resource allows you to retrieve data for one genset from Octopi.

Resource Description
GET /api/v1/gensets.json
GET /api/v1/gensets/:number.json

Invoices
This resource allows you to fetch customer invoices from Octopi.

Resource Description
GET /api/v1/invoices.json Gets a list of invoices
PUT /api/v1/invoices/:id.json Updates an invoice

Manifests
This resources allows you to create a manifest in Octopi.

Resource Description
POST /api/v1/manifests.json
DELETE /api/v1/manifests/:client_identifier
GET /api/v1/manifests

Manifests::Bill_of_ladings
This resources allows you to create bill of ladings in Octopi.

Resource Description
POST /api/v1/manifests/:manifest_client_identifier/bill_of_ladings.json
GET /api/v1/manifests/:manifest_client_identifier/bill_of_ladings.json
PATCH /api/v1/manifests/:manifest_client_identifier/bill_of_ladings/:id.json

Manifests::Bill_of_ladings::Cargoes
This resources allows you to create cargoes associated with a bill of lading in Octopi.

Resource Description
POST /api/v1/manifests/:manifest_client_identifier/bill_of_ladings/:number/cargoes.json

Manifests::Bill_of_ladings::Flex_fields
Customizable fields for Bill of Ladings

Resource Description
PUT /api/v1manifests/:manifest_client_identifier/bill_of_ladings/:bill_of_lading_number/flex_fields/:label Updates the flex field

Manifests::Bill_of_ladings::Holds
This resource allows you to view the holds on bill of ladings.

Resource Description
GET /api/v1/api/v1/manifests/:manifest_client_identifier/bill_of_ladings/:bill_of_lading_number/holds.json
DELETE /api/v1/manifests/:manifest_client_identifier/bill_of_ladings/:bill_of_lading_number/holds/:hold_id.json
PUT /api/v1/manifests/:manifest_client_identifier/bill_of_ladings/:bill_of_lading_number/holds/:hold_id.json

Movements
This resource allows you to fetch movements from Octopi.

Resource Description
GET /api/v1/movements.json Gets a list of movements

Packing_list_items
This resources allows you to create a packing list item in Octopi.

Resource Description
GET /api/v1/packing_list_items/:reference_number.json
POST /api/v1/packing_list_items.json
PATCH /api/v1/packing_list_items/:reference_number.json
DELETE /api/v1/packing_list_items/:reference_number.json

Packing_list_items::Cargoes
This resource allows you to list the cargo associated to a packing list item.

Resource Description
GET /api/v1/packing_list_items/:reference_number/cargoes.json

Packing_lists
This resources allows you to create a packing list.

Resource Description
GET /api/v1/bill_of_ladings/:bill_of_lading_number/packing_lists.json
POST /api/v1/bill_of_ladings/:bill_of_lading_number/packing_lists.json
DELETE /api/v1/bill_of_ladings/:bill_of_lading_number/packing_lists/:client_identifier.json

Pre_advices
This resource allows you to view, create and delete pre-advices in Octopi

Resource Description
GET /api/v1/pre_advices/:advice_number
POST /api/v1/pre_advices.json
DELETE /api/v1/pre_advices/:advice_number

Service_orders
This resource allows you to interact with service orders in Octopi.

Resource Description
GET /api/v1/service_orders.json Returns all the service orders present in Octopi.
GET /api/v1/service_orders/:order_number.json Returns information about the service order.
POST /api/v1/service_orders.json Creates a new service order.
PUT /api/v1/service_orders/:order_number.json Updates an existing service order.
DELETE /api/v1/service_orders/:order_number.json Deletes an existing service order.
PUT /api/v1/service_orders/:order_number/cancel.json Cancels all the incompleted order items under the given service order.

Service_orders::Service_order_items
This resource allows you to create, update or delete service order items in Octopi.

Resource Description
GET /api/v1/service_orders/:order_number/service_order_items/:id.json Returns information about the order item under the given service order.
POST /api/v1/service_orders/:order_number/service_order_items.json Creates an order item under the given service order.
PUT /api/v1/service_orders/:order_number/service_order_items/:id.json Updates an existing service order item.
DELETE /api/v1/service_orders/:order_number/service_order_items/:id.json Deletes an existing service order item.

Shipping_lines
This resource allows you to create, read, and update shipping lines in Octopi.

Resource Description
GET /api/v1/shipping_lines.json Returns a list of shipping lines.
GET /api/v1/shipping_lines/:id Returns information about a shipping line.
POST /api/v1/shipping_lines.json Creates a new shipping line.
PUT /api/v1/shipping_lines/:id Updates a shipping line record.

Shipping_lines::Bookings::Flex_fields
This resource allows you modify flex fields for bookings on Octopi.

Resource Description
PUT /api/v1/shipping_lines/CODE/bookings/NUMBER/flex_fields/:label Updates a Container

Shipping_lines::Bookings::Line_items::Flex_fields
Allows you to modify flex fields for booking line items in Octopi.

Resource Description
PUT /api/v1/shipping_lines/:code/bookings/:number/line_items/:line_item_number/flex_fields/:label Updates the flex fields for the line item

Ships
This resource allows you to fetch information about vessels.

Resource Description
GET /api/v1/vessels/:name

Truck_drivers
This resource allows you to find, create, update or list truck drivers within Octopi.

Resource Description
GET /api/v1/truck_drivers.json Returns a list of truck drivers.
POST /api/v1/truck_drivers.json Create a new truck driver.
PATCH /api/v1/truck_drivers/:number.json Update a truck driver's information.
GET /api/v1/truck_drivers/:number.json Show a truck driver's information.

Truck_visits
This resource allows you to view, create, or delete truck visits within Octopi.

Resource Description
GET /api/v1/truck_visits.json Gets a list of truck visits.
GET /api/v1/truck_visits/:id Get details of a truck visit.
POST /api/v1/truck_visits.json Create a truck visit.

Truck_visits::Dock_receipts
This resource allows you to view, create, and delete dock receipts for truck visits in Octopi.

Resource Description
GET /api/v1/truck_visits/:truck_visit_id/dock_receipts.json Get list of dock receipts for a truck visit.
GET /api/v1/truck_visits/:truck_visit_id/dock_receipts/:id.json Get details of a dock receipt.
DELETE /api/v1/truck_visit/:truck_visit_id/dock_receipts/:id.json Delete a dock receipt when ID given.
POST /api/v1/truck_visits/:truck_visit_id/dock_receipts.json Create a dock receipt for a truck visit.

Truck_visits::General_cargo_deliveries
This resource allows you to view, create, and delete general cargo deliveries for truck visits in Octopi.

Resource Description
GET /api/v1/truck_visits/:truck_visit_id/general_cargo_deliveries.json Get list of general cargo deliveries for truck visits.
GET /api/v1/truck_visits/:truck_visit_id/general_cargo_deliveries/:id.json Get details of a general cargo delivery.
DELETE /api/v1/truck_visit/:truck_visit_id/general_cargo_deliveries/:id.json Delete a general cargo delivery when ID given
POST /api/v1/truck_visits/:truck_visit_id/general_cargo_deliveries.json Create a general cargo delivery for a truck visit.

Truck_visits::Interchanges
This resource allows you to view, create, and delete interchange for truck visits in Octopi.

Resource Description
GET /api/v1/truck_visits/:truck_visit_id/interchanges.json Get list of interchanges for a truck visit.
GET /api/v1/truck_visits/:truck_visit_id/interchanges/:id.json Get details of an interchange for a truck visit.
DELETE /api/v1/truck_visits/:truck_visit_id/interchanges/:id.json Delete an interchange when ID given.
POST /api/v1/truck_visits/:truck_visit_id/interchanges.json Create an interchange for a truck visit.
PATCH /api/v1/truck_visits/:truck_visit_id/interchanges/:id.json Update an interchange's attributes.

Trucking_companies
This resources allows you to create, read, update, or delete trucking companies in Octopi.

Resource Description
GET /api/v1/trucking_companies Returns the list of trucking companies
GET /api/v1/trucking_companies/:id Returns information about a trucking company
POST /api/v1/trucking_companies Create a new trucking company
PUT /api/v1/trucking_companies/:id Updates a trucking company record
DELETE /api/v1/trucking_companies/:id Soft deletes a trucking company record

Trucks
This resources allows you to create, read, update, or delete trucks in Octopi.

Resource Description
GET /api/v1/trucks Returns a list of trucks
POST /api/v1/trucks Allows creating a new truck
PATCH /api/v1/trucks/:truck_license_number Allows editing an existing truck
POST /api/v1/trucks/:truck_license_number/gate_out.json Performs gate out operation for a truck with truck license number provided

Vehicles
This resource allows you to fetch data about vehicles.

Resource Description
GET /api/v1/vehicles.json Gets a list of vehicles
GET /api/v1/vehicles/:id.json Returns information about a specific vehicle
PATCH /api/v1/vehicles/:id.json Update a vehicle's data.

Vessel_tallies
View and update vessel tallies in Octopi.

Resource Description
GET /api/v1/vessel_tallies.json Get a list of vessel tallies.
PATCH /api/v1/vessel_tallies/:id.json Updates a vessel tally. Perform actions for the containers in the tally.

Voyages
This resource allows you to create, read, update, or delete voyages in Octopi.

Resource Description
GET /api/v1/voyages.json Returns the list of voyages
POST /api/v1/voyages.json Creates a voyage
GET /api/v1/voyages/:number.json Shows a voyage
PATCH /api/v1/voyages/:voyage_number.json Updates a voyage

Voyages::Bill_of_ladings
This resources allows you to fetch cargo information (Bill Of Lading and Packing List Items) for a voyage

Resource Description
GET /api/v1/voyages/:voyage_number/bill_of_ladings.json
GET /api/v1/voyages/VOYAGE_NUMBER/bill_of_ladings/BILL_OF_LADING_NUMBER.json

Voyages::Bill_of_ladings::Hold_types
This resource allows you to edit the holds on a bill of lading.

Resource Description
PUT /api/v1/voyages/:voyage_number/bill_of_ladings/:bill_of_lading_number/hold_types/:hold_type_id/lift.json
PUT /api/v1/voyages/:voyage_number/bill_of_ladings/:bill_of_lading_number/hold_type/:hold_type_id/apply.json

Voyages::Bill_of_ladings::Holds
This resource allows you to view and edit the holds on cargo.

Resource Description
GET /api/v1/api/v1/voyages/:voyage_number/bill_of_ladings/:bill_of_lading_number/holds.json

Voyages::Bill_of_ladings::Packing_list_items

Resource Description
DELETE /api/v1/voyages/:voyage_number/bill_of_ladings/:bill_of_lading_number/packing_list_items.json

Voyages::Consignees
This resources allows you to fetch consignees for voyages

Resource Description
GET /api/v1/voyages/:number/consignees.json

Voyages::Flex_fields
This resource allows you modify flex fields for voyages on Octopi.

Resource Description
PUT /api/v1/voyages/:number/flex_fields/:label Updates a Voyage

Voyages::Movements
This resources allows you to fetch movements for containers that were discharged on a voyage

Resource Description
GET /api/v1/voyages/:number/movements.json

Voyages::Tallies
This resource allows you to fetch data on the tallies for a voyage.

Resource Description
GET /api/v1/voyages/:voyage_number/tallies.json

Work_queues
This resource allows you to fetch work queues from Octopi.

Resource Description
GET /api/v1/work_queues.json

Work_queues::Work_queue_items
This resource allows you to create a work queue item for a work queue

Resource Description
POST /api/v1/work_queues/:work_queue_id/work_queue_items.json

Yard_areas
Returns information about a yard area.

Resource Description
GET /api/v1/yard_areas.json Gets a list of yard areas
GET /api/v1/yard_areas/:id.json