In Octopi, the following types of movements can be created.
This API endpoint allows you to fetch cargo movements.
Code | Description |
---|---|
404 | Not found. |
400 | Bad request. |
500 | Internal Server Error. |
curl "https://app.octopi.co/api/v1/movements.json" -X GET -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Token token=ADD TOKEN HERE" -d '{"movement_types":["gate_in", "gate_out"], "container_id":"OCTO1234561"}'
{ "movements" : [ { "hazmat_codes" : [], "truck_driver" : { "email" : null, "firstname" : "John", "lastname" : "Doe", "id" : 21 }, "trucking_company" : { "code" : 'ABCD', "id" : 12, "name" : "E-RECYCLING" }, "remarks" : "this is a remark", "goods" : "fruits and veggies", "moved_at" : "2021-05-10T22:23:20Z", "container_new_seal" : "123131", "chassis" : { "id" : 43814, "number" : "HMS12311", "owner": { "id": 78, "type": "ShippingLine", "name": "Shipping line name", "code": "CODE" } }, "export_release" : { "id" : 8724, "number" : "162660" }, "booking" : { "id" : 640653, "number" : "BOK1231" }, "destination_type" : "Consignee", "shipping_line" : { "id" : 15, "name" : "COSCO", "code" : "COSCO" }, "gate" : { "name" : "Main Gate", "id" : 12 }, "updated_at" : "2021-05-10T22:23:19Z", "id" : 12, "quantity" : 1, "volume": null, "cargo_weight" : 500, "truck" : { "number" : "12", "id" : 306, "license_plate" : "TM00001" }, "user" : { "lastname" : "Doe", "firstname" : "John", "email" : "john.doe@example.com", "id" : 12, "name" : "John Doe" }, "source" : "Terminal: Main Terminal", "destination" : "Consignee: E-RECYCLING", "container" : { "container_type_label" : "20DV", "arrival_voyage" : { "vessel_name" : "FALMOUTH", "number" : "55E", "id" : 225222, "vessel_imo" : "9266530" }, "consignee": { "id": 67629, "name": ".NOT AVAILABLE.", "email": "john@example.com", "address": "address", "customs_code": null, "vat_number": null, "general_ledger_id": "M001", "contact_person": null, "phone": null }, "goods" : "", "id" : 2627430, "number" : "OCTO0326118" }, "created_at" : "2021-05-10T22:23:19Z", "container_original_seal" : "", "is_admin" : false, "truck_visit" : { "gated_in_at" : "2021-05-10T22:05:34Z", "gated_out_at" : "2021-05-10T22:23:28Z", "id" : 12, "truck_driver" : { "number" : "ABCD", "twic" : "!23131", "active" : true, "id" : 12, "license_number" : "CA1231", "lastname" : "Doe", "firstname" : "John" }, "truck" : { "active" : true, "trucking_company_id" : 52, "id" : 306, "license_plate" : "TM00826", "allowed_until" : null } }, "source_type" : "Terminal", "status" : "empty", "movement_type" : "gate_out" }, { "export_release" : { "number" : "1241241", "id" : 12 }, "container_new_seal" : "12", "chassis" : { "id" : 12, "number" : "HMS030" }, "booking" : { "id" : 12, "number" : "BOOK121231" }, "shipping_line" : { "code" : "COSCO", "id" : 12, "name" : "COSCO" }, "destination_type" : "Terminal", "hazmat_codes" : [], "trucking_company" : { "code" : null, "id" : 52, "name" : "E-RECYCLING" }, "truck_driver" : { "id" : 12, "email" : "john.doe@example.com", "firstname" : "John", "lastname" : "Doe" }, "moved_at" : "2021-05-10T22:05:54Z", "remarks" : null, "goods" : "Soccer balls", "created_at" : "2021-05-10T22:05:54Z", "container" : { "id" : 2646871, "number" : "OCTO1225720", "goods" : "soccer balls", "arrival_voyage" : { "vessel_imo" : "9412476", "number" : "55NB", "id" : 12, "vessel_name" : "ORINOCO" }, "container_type_label" : "20DV" }, "destination" : "Terminal: Main Yard", "is_admin" : false, "container_original_seal" : "9516436", "source_type" : "Consignee", "truck_visit" : { "truck" : { "active" : true, "id" : 12, "trucking_company_id" : 12, "license_plate" : "TM1231", "allowed_until" : null }, "truck_driver" : { "license_number" : "812931231", "id" : 27860, "firstname" : "John", "lastname" : "Doe", "number" : "!2311", "active" : true, "twic" : null }, "gated_in_at" : "2021-05-10T22:05:34Z", "id" : 1393451, "gated_out_at" : "2021-05-10T22:23:28Z" }, "status" : "full", "movement_type" : "gate_in", "updated_at" : "2021-05-10T22:05:54Z", "quantity" : null, "volume": null, "id" : 15, "gate" : { "id" : 33, "name" : "Main Gate" }, "truck" : { "id" : 306, "number" : "", "license_plate" : "TM00826" }, "cargo_weight" : 0, "user" : { "firstname" : "John", "lastname" : "Doe", "email" : "john.doe@example.com", "name" : "John Doe", "id" : 1231 }, "source" : "Consignee: E-RECYCLING" } ], "actions" : { "previous" : { "url" : "https://app.octopi.co/api/v1/movements.json?page=0", "method" : "GET" }, "last" : { "url" : "https://app.octopi.co/api/v1/movements.json?page=361306", "method" : "GET" }, "next" : { "method" : "GET", "url" : "https://app.octopi.co/api/v1/movements.json?page=2" }, "index" : { "url" : "https://app.octopi.co/api/v1/movements", "method" : "GET" } } }
Param name | Description |
---|---|
arrival_voyage_id optional |
Filter movements that are associated with an arrival voyage. You can pass the voyage Octopi ID or the octopi voyage number. Validations:
|
departure_voyage_id optional |
Filter movements that are associated with a departure voyage. You can pass the Octopi ID for the voyage. Validations:
|
departure_voyage_display_name optional |
Filter movements that are associated with a departure voyage. You can pass the full Voyage Display Name (Vessel Name + Voyage Number). Validations:
|
container_id optional |
Filter movements associated with a container. You can pass the container Octopi ID or the container number. Validations:
|
chassis_id optional |
Filter movements associated with a chassis. You can pass the chassis Octopi ID or the chassis number. Validations:
|
genset_id optional |
Filter movements associated with a genset. You can pass the genset Octopi ID or the genset number. Validations:
|
booking_id optional |
Filter movements associated with a booking. You can pass the booking Octopi ID or the booking number. Validations:
|
barge_id optional |
Filter movements associated with a barge. You must pass the barge Octopi ID. Validations:
|
user_id optional |
Filter movements associated with a user. You must pass the user Octopi ID. Validations:
|
gate_ids optional |
Validations:
|
shipping_line_id optional |
Filter movements associated with a shipping line. You can pass the shipping line Octopi ID or the shipping line code. Validations:
|
truck_visit_id optional |
Filter movements associated with a truck visit. You must use the truck visit ID. Validations:
|
truck_id optional |
Filter movements associated with a truck. You can pass the truck Octopi ID or the truck license plate. Validations:
|
truck_driver_id optional |
Filter movements associated with a truck driver. You must pass the truck driver Octopi ID. Validations:
|
trucking_company_id optional |
Filter movements associated with a trucking company. You can pass the trucking company Octopi ID or the trucking company code. Validations:
|
status optional |
Filter movements by their status: whether it was for a full container or an empty container. Validations:
|
movement_types optional |
Can be an array or a single value that will be used to filter movements by the type. Validations:
|
dock_receipt_number optional |
Filter movements associated with a dock receipt number Validations:
|
start_date optional |
Filter movements that occurred after the start date. Must be formatted as YYYY-MM-DD. This filters by the movement’s moved_at attribute. Validations:
|
end_date optional |
Filter movements that occurred before the end date. Must be formatted as YYYY-MM-DD. This filters by the movement’s moved_at attribute. Validations:
|
page optional |
Specify which page of results to fetch. This value defaults to 1. Validations:
|
per optional |
The number of items to be displayed. This value defaults to 10 and accepts a maximum of 100. Validations:
|