Performs completion of gate out operation for the truck

Supported Formats

json

Errors

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

Examples

curl --location --request POST 'https://app.octopi.co/api/v1/trucks/:truck_license_number/gate_out.json'     --header 'Authorization: Bearer token_value'     --header 'Content-Type: application/json'     --data-raw '{
  "reason_for_incomplete": "wrong_terminal",
  "left_without_container": false,
  "container_seals": [
    {
        "container_number": "UTIU1939201",
        "seal":"ZDFDGFR1"
    },
    {
        "container_number": "TESU1293024",
        "seal":"SERERE22"
    }
    ]
}'
{
  "id": 179,
  "truck": {
      "id": 1,
      "license_plate": "TRK1",
      "number": "",
      "trucking_company_id": 1,
      "active": true,
      "allowed_until": null
  },
  "truck_driver": {
      "id": 1,
      "number": "DRIVER-1",
      "license_number": "N/A",
      "firstname": "DRIVER",
      "lastname": "ONE",
      "twic": null,
      "discarded_at": null,
      "active": true
  },
  "gated_in_at": "2022-03-25T10:08:21Z",
  "gated_out_at": "2022-03-25T10:08:49Z"
}
curl --location --request POST 'https://app.octopi.co/api/v1/trucks/:truck_license_number/gate_out.json'     --header 'Authorization: Bearer token_value'     --header 'Content-Type: application/json'     --data-raw '{
  "chassis_leaving_with_truck": ["CH101", "CH102"]
}'
{
  "id": 180,
  "truck": {
      "id": 1,
      "license_plate": "TRK1",
      "number": "",
      "trucking_company_id": 1,
      "active": true,
      "allowed_until": null
  },
  "truck_driver": {
      "id": 1,
      "number": "DRIVER-1",
      "license_number": "N/A",
      "firstname": "DRIVER",
      "lastname": "ONE",
      "twic": null,
      "discarded_at": null,
      "active": true
  },
  "gated_in_at": "2022-03-25T10:08:21Z",
  "gated_out_at": "2022-03-25T10:08:49Z"
}
{
  "error": "Truck Visit was not completed. The following container has unlifted holds: APLU1010203"
}

Params

Param name Description
truck_license_number
required

License number of the truck

Validations:

  • Must be a String

reason_for_incomplete
optional

Reason why interchanges were not completed

Validations:

  • Must be one of: wrong_terminal, paperwork, other.

left_without_container
optional

Whether the truck left without a container

Validations:

  • Must be one of: true, false.

container_seals
optional

Container seals

Validations:

  • Must be an Array of nested elements

container_seals[container_number]
required

Container number to which seal is added during gate out

Validations:

  • Must be a String

container_seals[seal]
required

Seal added to the container during gate out

Validations:

  • Must be a String

chassis_leaving_with_truck
optional

An array of chassis numbers that were used for dropping off containers and are now departing with the truck.

Validations:

  • Must be an array of any type