This resource allows you to view and update vessel tallies in Octopi.

Supported Formats

json

GET /api/v1/vessel_tallies.json
Get a list of vessel tallies.

This API endpoint allows you to view vessel tallies.

Supported Formats

json

Errors

Code Description
400 Bad Request.
404 Not found.
500 Internal server error.

Examples

curl --location --request GET 'https://app.octopi.co/api/v1/vessel_tallies.json?vessel_name=tropic&voyage_number=0577'     --header 'Authorization: Token token=ADD TOKEN HERE'
{
  "vessel_tallies": [
    {
      "id": 22867,
      "vessel_name": "TROPIC JEWEL",
      "voyage_number": "2022050577",
      "type": "Discharge",
      "prepared_on": "2022-05-15T12:13:58Z",
      "completed_at": null,
      "closed_at": null
    }
  ]
}

Params

Param name Description
type
optional

Filter tallies by the operation type.

Validations:

  • Must be one of: discharge, loading.

vessel_name
optional

Filter tallies by the vessel name.

Validations:

  • Must be a String

voyage_number
optional

Filter tallies by the voyage number.

Validations:

  • Must be a String

page
optional

Specify which page of results to fetch. This value defaults to 1.

Validations:

  • Must be a number.

per
optional

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

Validations:

  • Must be a number.


PATCH /api/v1/vessel_tallies/:id.json
Updates a vessel tally. Perform actions for the containers in the tally.

This API endpoint allows you to update vessel tallies. Perform actions on the containers in the Tally.

Supported Formats

json

Errors

Code Description
400 Bad Request.
404 Not found.
500 Internal server error.

Examples

curl --location --request PATCH 'https://app.octopi.co/api/v1/vessel_tallies/116598.json'   --header 'Content-Type: application/json'   --header 'Authorization: Token token=ADD TOKEN HERE'   --data-raw '{
  "tally_items": [
    {
      "crane": {
        "name": "Blue Crane"
      },
      "berth": {
        "name": "Blue Berth"
      },
      "container_number": "OCTU1234567"
    },
    {
      "action": "over-tally",
      "crane": {
        "name": "Red Crane"
      },
      "berth": {
        "name": "Red Berth"
      },
      "container_number": "OCTU1234560"
    }
  ]
}'

Params

Param name Description
id
required

The tally ID.

Validations:

  • Must be a number.

tally_items
required

A list of containers with the actions to be performed. Limited to 10 items.

Validations:

  • Must be an Array of nested elements

tally_items[crane]
optional

The crane used to perform the action.

Validations:

  • Must be a Hash

tally_items[crane][name]
optional

The name of the crane. It is an optional parameter, but it must be provided when tallying containers. An error message will be shown when needed.

Validations:

  • Must be a String

tally_items[berth]
optional

The berth area where the vessel is.

Validations:

  • Must be a Hash

tally_items[berth][name]
optional

The name of the berth area. It is an optional parameter, but it must be provided when tallying containers. An error message will be shown when needed.

Validations:

  • Must be a String

tally_items[container_number]
required

The container number.

Validations:

  • Must be a String

tally_items[action]
optional

An action performed on a container in the tally. Available values are ‘tally’, ‘over-tally’, ‘undo’. Defaults to ‘tally’. The action ‘tally’ will discharge or load a container already on the tally. The action ‘over-tally’ will add a container to the tally and tally it, notice the container must exists in octopi. If possible, the action ‘undo’ will reverse the action performed on the container.

Validations:

  • Must be one of: tally, over-tally, undo.

tally_items[tallied_at]
optional

A string in ISO 8601 format, representing when the action was performed. Defaults to current time. Must to be after the tally started at time and not in the future.

Validations:

  • Must be a String

tally_items[seals]
optional

An array of strings representing the seals for the container.

Validations:

  • Must be an array of String

tally_items[stowage_location]
optional

The vessel location for the container.

Validations:

  • Must be a String