Change driver equipment
Set the vehicle or trailer one or more drivers are assigned to, by username and unit number. If a driver has a co-driver, the change is synced to the co-driver too.
Each update is checked on its own. The response is 200 when all of them succeed, 207 when only some do (successes in results, failures in errors), and 400 when none do. The unit must be active.
Authorization
Your company's API key.
Request body
application/json · required
One entry per change. At least one.
Show fields
The driver's username in DPB.
Unit number of an active vehicle or trailer.
Whether the unit is the driver's vehicle or trailer.
One of: Vehicle Trailer
Response
Updates that succeeded.
Show fields
One of: Vehicle Trailer
One of: success error
What happened for this update.
Updates that failed, with the reason. Only when some or all failed.
Show fields
One of: Vehicle Trailer
One of: success error
What happened for this update.
Other responses
{
"results": [
{
"username": "driver1",
"unit_no": "1001",
"type": "Vehicle",
"status": "success",
"message": "Successfully updated default vehicle for driver1 to 1001"
}
],
"errors": [
{
"username": "driver2",
"unit_no": "9999",
"type": "Vehicle",
"status": "error",
"message": "Active equipment with unit_no '9999' and type 'Vehicle' not found."
}
]
}{
"results": [],
"errors": [
{
"username": "nonexistent_driver",
"unit_no": "1001",
"type": "Vehicle",
"status": "error",
"message": "Driver with username 'nonexistent_driver' not found."
}
]
}