The voyage API endpoint allows updating a voyage.

Supported Formats

json

Errors

Code Description
400 Bad Request.
404 Voyage Not Found
422 Unprocessable Entity.
500 Internal Server Error.

Examples

curl "https://app.octopi.co/api/v1/voyages/:number.json"       -d '{"voyage": { "Captain": "Cook", "at_of_departure": "2024-12-05T18:41:17.422Z" }}'       -X PATCH -H "Accept: application/json"       -H "Content-Type: application/json"       -H "Authorization: Token token=YOURTOKEN"

Params

Param name Description
number
required

The voyage number, identifies the voyage to be updated.

Validations:

  • Must be a String

voyage
required

A hash with voyage attributes.

Validations:

  • Must be a Hash

voyage[discharge_destination_id]
optional

The discharge destination ID.

Validations:

  • Must be a number.

voyage[discharge_destination_type]
optional

The discharge destination type. Valid values are Terminal, Berth Area, or Port.

Validations:

  • Must be one of: Terminal, Berth Area, Port.

voyage[number]
optional

The voyage number.

Validations:

  • Must be a String

voyage[vessel_name]
optional

The vessel (ship) name. Notice this param is case sensitive.

Validations:

  • Must be a String

voyage[agent_id]
optional , nil allowed

Agent ID.

Validations:

  • Must be a Integer

voyage[arrival_pilot_id]
optional , nil allowed

Arrival pilot ID.

Validations:

  • Must be a Integer

voyage[assigned_berth_area_id]
optional , nil allowed

Assigned berth area ID.

Validations:

  • Must be a Integer

voyage[assigned_yard_area_id]
optional , nil allowed

Assigned yard area ID.

Validations:

  • Must be a Integer

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:

  • Must be a String

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:

  • Must be a String

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:

  • Must be a String

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:

  • Must be a String

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:

  • Must be a String

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:

  • Must be a String

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:

  • Must be a String

voyage[berth_end_position]
optional , nil allowed

Berth end position.

Validations:

  • Must be a Float

voyage[berth_start_position]
optional , nil allowed

Berth start position.

Validations:

  • Must be a Float

voyage[block_receiving_export_past_cut_off]
optional , nil allowed

Block receiving export cargo after the cut off time.

Validations:

  • Must be a String

voyage[cancelled]
optional , nil allowed

Cancelled.

Validations:

  • Must be a String

voyage[captain]
optional , nil allowed

Captain.

Validations:

  • Must be a String

voyage[departed_last_port_on]
optional , nil allowed

Departed last port date.

Validations:

  • Must be a String

voyage[departure_pilot_id]
optional , nil allowed

Departure pilot ID.

Validations:

  • Must be a Integer

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:

  • Must be a String

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:

  • Must be a String

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:

  • Must be a String

voyage[last_port_of_call_id]
optional , nil allowed

Last port of call ID.

Validations:

  • Must be a Integer

voyage[next_port_of_call_id]
optional , nil allowed

Next port of call ID.

Validations:

  • Must be a Integer

voyage[receiving_cut_off_time]
optional , nil allowed

Receiving cut off time.

Validations:

  • Must be a String

voyage[stevedoring_company_id]
optional , nil allowed

Stevedoring company ID.

Validations:

  • Must be a Integer

voyage[tax_date]
optional , nil allowed

Tax date.

Validations:

  • Must be a String

voyage[time_labour_ashore]
optional , nil allowed

Time labour ashore.

Validations:

  • Must be a String

voyage[time_labour_onboard]
optional , nil allowed

Time labour onboard.

Validations:

  • Must be a String