Creates a new voyage event for a specific voyage.

Supported Formats

json

Errors

Code Description
404 Not found.
422 Unprocessable Entity.
500 Internal Server Error.

Examples

curl 'https://app.octopi.co/api/v1/voyages/V001/voyage_events' \
  -X 'POST' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Token token=YOURTOKEN' \
  -d '{
    "voyage_event_type_id": 5,
    "voyage_event": {
      "started_at": "2024-01-15T10:30:00Z",
      "completed_at": "2024-01-15T11:00:00Z",
      "service_boat_id": 2,
      "pilot_id": 3,
      "notes": "Pilot boarding completed successfully"
    }
  }'

{
  "voyage_event": {
    "id": 1,
    "event_name": "Pilot Boarded",
    "event_type_id": 5,
    "created_at": "2024-01-15T10:30:00Z",
    "updated_at": "2024-01-15T10:30:00Z",
    "started_at": "2024-01-15T10:30:00Z",
    "completed_at": "2024-01-15T11:00:00Z",
    "custom_value": null,
    "service_boat": {
      "id": 2,
      "name": "Pilot Boat Alpha"
    },
    "pilot": {
      "id": 3,
      "name": "John Smith"
    },
    "user": {
      "id": 4,
      "name": "Jane Doe"
    },
    "notes": "Pilot boarding completed successfully"
  }
}

Params

Param name Description
voyage_number
required

The voyage number to create the event for

Validations:

  • Must be a String

voyage_event_type_id
required

The voyage event type ID

Validations:

  • Must be a Integer

voyage_event
required

Validations:

  • Must be a Hash

voyage_event[started_at]
optional

Start time in ISO 8601 format

Validations:

  • Must be a String

voyage_event[completed_at]
optional

Completion time in ISO 8601 format

Validations:

  • Must be a String

voyage_event[service_boat_id]
optional

Service boat ID

Validations:

  • Must be a Integer

voyage_event[pilot_id]
optional

Pilot ID

Validations:

  • Must be a Integer

voyage_event[from_berth_id]
optional

From berth area ID

Validations:

  • Must be a Integer

voyage_event[to_berth_id]
optional

To berth area ID

Validations:

  • Must be a Integer

voyage_event[custom_value]
optional

Custom value for the event

Validations:

  • Must be a String

voyage_event[notes]
optional

Additional notes

Validations:

  • Must be a String