This API endpoint allows you to create a new vessel.
| Code | Description |
|---|---|
| 404 | Not found. |
| 500 | Server crashed. |
curl "https://app.octopi.co/api/v1/vessels.json" -X POST -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Token token=YOURTOKEN" -d '{"vessel": {"name": "CFS PACENO", "call_sign": "6YSO4", "imo": "9403451", "vessel_type": "container", "gross_tonnage": 9957}}'
{
"vessel": {
"id": 1234,
"name": "CFS PACENO",
"call_sign": "6YSO4",
"imo_number": "9403451",
"vessel_type": "container",
"loa": "148m",
"gross_tonnage": 9957,
"actions": {
"show": { "method": "GET", "url": "https://app.octopi.co/api/v1/vessels/CFS%20PACENO.json" },
"update": { "method": "PUT", "url": "https://app.octopi.co/api/v1/vessels/1234.json" }
}
}
}
| Param name | Description |
|---|---|
|
vessel required |
Validations:
|
|
vessel[name] required |
The vessel name. Must be unique per organization. Validations:
|
|
vessel[call_sign] optional |
The vessel call sign. Must be unique per organization. Validations:
|
|
vessel[imo] optional |
The vessel IMO number. Must be 7 digits and unique per organization. Validations:
|
|
vessel[vessel_type] optional |
The vessel type (e.g. container, general_cargo, dry_bulk, tanker). Validations:
|
|
vessel[loa] optional |
The length overall (LOA) of the vessel. Validations:
|
|
vessel[woa] optional |
The width overall (WOA) of the vessel. Validations:
|
|
vessel[gross_tonnage] optional |
The gross tonnage of the vessel. Validations:
|
|
vessel[net_tonnage] optional |
The net tonnage of the vessel. Validations:
|
|
vessel[teu_capacity] optional |
The TEU capacity of the vessel. Validations:
|
|
vessel[country_code] optional |
The country code of the vessel. Validations:
|
|
vessel[scac] optional |
The SCAC code of the vessel. Validations:
|
|
vessel[agent_name] optional |
The name of the vessel’s agent. Validations:
|
|
vessel[max_draught] optional |
The maximum draught of the vessel. Validations:
|
|
vessel[has_cranes] optional |
Whether the vessel has cranes. Validations:
|
|
vessel[number_of_bays] optional |
The number of bays on the vessel. Validations:
|
|
vessel[number_of_rows] optional |
The number of rows on the vessel. Validations:
|
|
vessel[number_of_tiers_above] optional |
The number of tiers above deck. Must be greater than above_deck_first_tier. Validations:
|
|
vessel[number_of_tiers_below] optional |
The number of tiers below deck. Validations:
|
|
vessel[above_deck_first_tier] optional |
The first tier above deck. Must be one of: 70, 72, 74, 76, 78, 80, 82, 84. Validations:
|
|
vessel[bay_groups] optional |
The bay groups of the vessel. Array of bay group arrays e.g. [[1,3],[5],[7,9]]. Validations:
|