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