Creates a new TBD truck visit or truck visit with interchanges when a pre advice number is provided.
| Code | Description |
|---|---|
| 404 | Not found. |
| 422 | Unprocessable Entity. |
| 500 | Internal Server Error. |
curl "https://app.octopi.co/api/v1/truck_visits.json"
-d '{
"truck_driver_number": "1231NU78",
"gate": "North Gate",
"truck": "ABC123",
"comment": "Arrived early"
}'
-H "Accept: application/json"
-H "Content-Type: application/json"
-H "Authorization: Token token=YOURTOKEN"
{
"truck_visit": {
"id": 1876441,
"gated_in_at": "2022-06-01T07:29:45Z",
"gated_out_at": null
},
"gate_name": "North Gate",
"truck_driver": "Agua Agua",
"truck": "ABC123",
"comment": "Arrived early"
}
{ "error": "Truck is already at the terminal." }
| Param name | Description |
|---|---|
|
truck_driver_id optional |
Truck driver ID. If this parameter is present, truck_driver_number and truck_driver_license will be ignored. Validations:
|
|
truck_driver_number optional |
Truck driver number. If truck_driver_id is present, this will be ignored. Validations:
|
|
truck_driver_license optional |
Truck driver license number. If truck_driver_id or truck_driver_number is present, this will be ignored. Validations:
|
|
truck required |
Truck license plate number. Validations:
|
|
gate required |
In Gate name or client identifier. Validations:
|
|
out_gate optional |
Out Gate name or client identifier. Validations:
|
|
comment optional |
A comment for this truck visit. Validations:
|
|
pre_advice_number optional |
Provide Pre Advice number as stored in Octopi to create truck visit and interchanges from a pre-advice. Please note that other params except gate will be ignored when a pre-advice number is provided. Validations:
|
|
interchanges_completed_at optional |
The date and time of completion of all the interchanges in the pre advice. Provide ISO 8601 format (Eg 2023-04-13T14:30:00Z). Providing this value will create the interchanges of truck visit with a completed status. Validations:
|