This API endpoint allows creating a voyage.
Code | Description |
---|---|
400 | Bad Request. |
404 | Voyage Not Found |
422 | Unprocessable Entity. |
500 | Internal Server Error. |
curl "https://app.octopi.co/api/v1/voyages.json" -X POST -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Token token=ADD TOKEN HERE" --data '{ "voyage": { "number": "NB 010", "vessel_name": "GRETA", "discharge_destination_type": "Terminal", "discharge_destination_id": 91 } }'
{ "voyage": { "id": 345749, "number": "NB 010", "status": "unknown", "last_port_of_call": { "name": null, "locode": null }, "next_port_of_call": { "name": null, "locode": null }, "captain": { "name": null }, "agent": { "name": null }, "stevedoring_company": { "name": null }, "stevedoring_supervisors": [], "number_of_tug_boats": 0, "arrival_number_of_tug_boats": null, "departure_number_of_tug_boats": 0, "estimated_time_of_anchorage": null, "actual_time_of_anchorage": null, "actual_time_of_pilot_boarded": null, "actual_time_of_berth": null, "actual_time_of_customs_clearance": null, "actual_time_of_departure": null, "closing_comments": null, "display_name": "GRETA NB 010", "actual_time_of_departure_pilot_boarded": null, "estimated_time_of_departure": null, "created_at": "2023-08-09T13:30:27Z", "updated_at": "2023-08-09T13:30:27Z", "berth_end_position": 0.0, "berth_start_position": 0.0, "block_receiving_export_past_cut_off": null, "departed_last_port_on": null, "et_of_berth": null, "cancelled": false, "ship": { "name": "GRETA", "imo": null, "call_sign": "6YRH2", "vessel_type": "Container", "loa": "", "flag": null, "gross_tonnage": 0, "net_tonnage": 0 }, "vessel": { "name": "GRETA", "imo": null, "call_sign": "6YRH2", "vessel_type": "Container", "loa": "", "flag": null, "gross_tonnage": 0, "net_tonnage": 0 }, "assigned_berth_area": { "name": null }, "assigned_yard_area": { "name": null }, "discharge_terminal": { "name": "Terminal Name" }, "discharge_destination": { "name": "Terminal Name" }, "arrival_pilot": { "name": null }, "departure_pilot": { "name": null }, "tax_date": null, "time_labour_ashore": null, "time_labour_onboard": null, "flex_fields": [] } }
Param name | Description |
---|---|
voyage required |
A hash with voyage attributes. Validations:
|
voyage[discharge_destination_id] required |
The discharge destination ID. Validations:
|
voyage[discharge_destination_type] required |
The discharge destination type. Valid values are Terminal, Berth Area, or Port. Validations:
|
voyage[number] required |
The voyage number. Validations:
|
voyage[vessel_name] required |
The vessel (ship) name. Notice this param is case sensitive. Validations:
|
voyage[agent_id] optional , nil allowed |
Agent ID. Validations:
|
voyage[arrival_pilot_id] optional , nil allowed |
Arrival pilot ID. Validations:
|
voyage[assigned_berth_area_id] optional , nil allowed |
Assigned berth area ID. Validations:
|
voyage[assigned_yard_area_id] optional , nil allowed |
Assigned yard area ID. Validations:
|
voyage[at_berth_departure] optional , nil allowed |
Actual time of berth departure. Date must be in ISO 8601 format (eg. ‘2024-06-09T09:30:00ZZ). Validations:
|
voyage[at_of_anchorage] optional , nil allowed |
Actual time of anchorage. Date must be in ISO 8601 format (eg. ‘2024-06-09T09:30:00ZZ). Validations:
|
voyage[at_of_berth] optional , nil allowed |
Actual time of berth. Date must be in ISO 8601 format (eg. ‘2024-06-09T09:30:00ZZ). Validations:
|
voyage[at_of_customs_clearance] optional , nil allowed |
Actual time of customs clearance. Date must be in ISO 8601 format (eg. ‘2024-06-09T09:30:00ZZ). Validations:
|
voyage[at_of_departure] optional , nil allowed |
Actual time of departure. Date must be in ISO 8601 format (eg. ‘2024-06-09T09:30:00ZZ). Validations:
|
voyage[at_of_departure_pilot_boarded] optional , nil allowed |
Actual time the departure pilot boarded. Date must be in ISO 8601 format (eg. ‘2024-06-09T09:30:00ZZ). Validations:
|
voyage[at_of_pilot_boarded] optional , nil allowed |
Actual time the pilot boarded. Date must be in ISO 8601 format (eg. ‘2024-06-09T09:30:00ZZ). Validations:
|
voyage[berth_end_position] optional , nil allowed |
Berth end position. Validations:
|
voyage[berth_start_position] optional , nil allowed |
Berth start position. Validations:
|
voyage[block_receiving_export_past_cut_off] optional , nil allowed |
Block receiving export cargo after the cut off time. Validations:
|
voyage[cancelled] optional , nil allowed |
Cancelled. Validations:
|
voyage[captain] optional , nil allowed |
Captain. Validations:
|
voyage[departed_last_port_on] optional , nil allowed |
Departed last port date. Validations:
|
voyage[departure_pilot_id] optional , nil allowed |
Departure pilot ID. Validations:
|
voyage[et_of_anchorage] optional , nil allowed |
Estimated time of anchorage. Date must be in ISO 8601 format (eg. ‘2024-06-09T09:30:00ZZ). Validations:
|
voyage[et_of_berth] optional , nil allowed |
Estimated time of berth. Date must be in ISO 8601 format (eg. ‘2024-06-09T09:30:00ZZ). Validations:
|
voyage[et_of_departure] optional , nil allowed |
Estimated time of departure. Date must be in ISO 8601 format (eg. ‘2024-06-09T09:30:00ZZ). Validations:
|
voyage[last_port_of_call_id] optional , nil allowed |
Last port of call ID. Validations:
|
voyage[next_port_of_call_id] optional , nil allowed |
Next port of call ID. Validations:
|
voyage[receiving_cut_off_time] optional , nil allowed |
Receiving cut off time. Validations:
|
voyage[stevedoring_company_id] optional , nil allowed |
Stevedoring company ID. Validations:
|
voyage[tax_date] optional , nil allowed |
Tax date. Validations:
|
voyage[time_labour_ashore] optional , nil allowed |
Time labour ashore. Validations:
|
voyage[time_labour_onboard] optional , nil allowed |
Time labour onboard. Validations:
|
voyage[flex_fields] optional , nil allowed |
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:
|