Creates a new truck driver.
| Code | Description |
|---|---|
| 400 | Bad Request. |
| 404 | Resource Not Found. |
| 500 | Internal Server Error. |
curl "https://app.octopi.co/api/v1/truck_drivers.json" -d '{"truck_driver": { "number": "1231NU78", "first_name": "Juan", "last_name": "Torres", "license_number": "N/A" }}' -X POST -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Token token=YOURTOKEN"
{
"id": 123,
"fullname": "Juan Torres",
"license_number": "new_license_number",
"twic": "",
"number": "1231NU78",
"active": true,
"date_of_birth": null,
"telephone_number": "",
"email": "juan.torres@gmail.com",
"remarks": "Best driver in town",
"trucking_company": "Blue Trucks",
"allowed_until": null,
"created_at": "2020-05-01T11:33:23Z",
"updated_at": "2023-08-10T12:36:03Z"
}
| Param name | Description |
|---|---|
|
first_name required |
The first name of the driver. Validations:
|
|
last_name required |
The last name of the driver. Validations:
|
|
license_number required |
The license number of the driver or N/A if not available. Validations:
|
|
number optional |
A unique number used by the terminal to identify the driver. Validations:
|
|
trucking_company_name optional |
Name of the trucking company for the driver. Validations:
|