This API endpoint will allow you to edit existing trucks within Octopi.
Code | Description |
---|---|
400 | Bad Request. |
404 | Not Found. |
500 | Internal Server Error. |
curl --location --request PATCH 'https://app.octopi.co/api/v1/trucks/:truck_license_number.json' --header 'Authorization: Bearer token_value' --header 'Content-Type: application/json' --data-raw '{ "truck": { "license_plate": "TEST123", "number": "6789", "weight": 12300, "active": false } }'
{ "truck": { "id": 27095, "active": false, "license_plate": "TEST123", "number": "6789", "weight": 5579, "color": "#00528D", "is_mule": false, "allowed_until": null, "year": 1987, "make": "A", "model": "M", "created_at": "2022-06-22T09:10:16Z", "updated_at": "2022-06-22T09:12:08Z" } }
Param name | Description |
---|---|
truck_license_number required |
Truck license plate. This is the resource you will update. Validations:
|
truck required |
Truck data Validations:
|
truck[number] optional |
Truck number Validations:
|
truck[truck_driver_license_number] optional |
Truck driver’s license number Validations:
|
truck[trucking_company] optional |
Trucking company’s name Validations:
|
truck[weight] optional |
Truck weight in your organization’s weight unit preference Validations:
|
truck[active] optional |
Is the truck active? Validations:
|
truck[color] optional |
Truck color hex code Validations:
|
truck[make] optional |
Truck make Validations:
|
truck[model] optional |
Truck model Validations:
|
truck[year] optional |
Truck year Validations:
|
truck[allowed_until] optional |
Until when is this truck allowed at the terminal? Sample valid entries: ‘2022-06-02’, ‘2/6/2022’, ‘June 2, 2022’ Validations:
|
truck[is_mule] optional |
Is the truck a mule? Validations:
|