The voyages API endpoint allows querying for voyages. You can optionally pass in a page and/or per parameter

Supported Formats

json

Errors

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

Examples

curl "https://app.octopi.co/api/v1/voyages.json" -X GET -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Token token=ADD TOKEN HERE"
  {
    "actions": {
        "index": {
            "method": "GET",
            "url": "http://app.octopi.co/api/v1/voyages.json"
        },
        "next": {
            "method": "GET",
            "url": "http://app.octopi.co/api/v1/voyages.json?page=2"
        },
        "previous": {
            "method": "GET",
            "url": "http://app.octopi.co/api/v1/voyages.json?page=1"
        },
        "last": {
            "method": "GET",
            "url": "http://app.octopi.co/api/v1/voyages.json?page=6"
        }
    },
    "voyages": [
        {
            "id": 1204,
            "number": "346",
            "status": "departed",
            "agent": {
              "name": "AGEMAR"
            },
            "stevedoring_company": {
                "name": "Cargo Handlers B'dos Ltd"
            },
            "stevedoring_supervisors": [
                {
                    "name": "Kirk Worrell"
                }
            ],
            "last_port_of_call": {
              "name": "Kingston",
              "locode": "JMKIN"
            },
            "next_port_of_call": {
              "name": "Port Everglades",
              "locode": "USPEF"
            },
            "captain": {
              "name": "John Doe"
            },
            "tax_date": "2017-12-12",
            "number_of_tug_boats": 4,
            "arrival_number_of_tug_boats": 2,
            "departure_number_of_tug_boats": 2,
            "estimated_time_of_anchorage": "2017-04-07T02:00:00.000Z",
            "actual_time_of_anchorage": "2017-04-07T07:42:00.000Z",
            "actual_time_of_pilot_boarded": "2017-04-07T09:06:00.000Z",
            "actual_time_of_berth": "2017-04-07T10:00:00.000Z",
            "actual_time_of_customs_clearance": "2017-04-07T12:10:00.000Z",
            "actual_time_of_departure": "2017-04-07T18:00:00.000Z",
            "closing_comments": null,
            "display_name": "CFS Pafilia 346",
            "actual_time_of_departure_pilot_boarded": null,
            "estimated_time_of_departure": null,
            "created_at": "2017-04-05T18:26:52.331Z",
            "updated_at": "2017-06-05T00:02:40.577Z",
            "vessel": {
                "name": "CFS Pafilia",
                "imo": "9322853",
                "call_sign": "6YRE8",
                "vessel_type": "Container",
                "loa": 100,
                "flag": "GA",
                "gross_tonnage": 100,
                "net_tonnage": 90
            },
            "assigned_berth_area": {
                "name": "NORTH PIER B1"
            },
            "assigned_yard_area": {
                "name": "SHED 2"
            },
            "discharge_terminal": {
                "name": "CPS Yard"
            },
            "arrival_pilot": {
                "name": null
            },
            "departure_pilot": {
                "name": null
            }
            "actions": {
                "show": {
                    "method": "GET",
                    "url": nil
                }
            }
        }
    ]
}

Params

Param name Description
page
optional

The page nr to be fetched. This value defaults to 0

Validations:

  • Must be Integer

per
optional

The number of items to be displayed. This value defaults to 10 and accepts a maximum of 100.

Validations:

  • Must be Integer

number
optional

Filter based on voyage number.

Validations:

  • Must be String

arrival_start
optional

Filters out voyages that arrived before this date. Must respect ISO8601 format. YYYY-MM-DD or YYYYMMDD

Validations:

  • Must be String

arrival_end
optional

Filters out voyages that arrived after this date. Must respect ISO8601 format. YYYY-MM-DD or YYYYMMDD

Validations:

  • Must be String

departure_start
optional

Filters out voyages that departed before this date. Must respect ISO8601 format. YYYY-MM-DD or YYYYMMDD

Validations:

  • Must be String

departure_end
optional

Filters out voyages that departed after this date. Must respect ISO8601 format. YYYY-MM-DD or YYYYMMDD

Validations:

  • Must be String

updated_at
optional

Filters out voyages that where updated after this date. Must respect ISO8601 format. YYYY-MM-DD or YYYYMMDD

Validations:

  • Must be String