Assign a vehicle to a driver
PUT/v1/drivers/:id/vehicles/:vehicleId
Assign a vehicle to a driver
Request
Path Parameters
id stringrequired
Driver ID
vehicleId stringrequired
Vehicle ID
Responses
- 200
- 404
- 409
Vehicle assigned successfully
- application/json
- Schema
- Example (from schema)
Schema
_id stringrequired
The ID of the driver
supplierId stringrequired
The supplier ID of the driver
rating number
The rating of the driver
zoneIds string[]required
The zone IDs of the driver
firstName stringrequired
The first name of the driver
lastName string
The last name of the driver
fullName string
The full name of the driver
phone stringrequired
The phone of the driver
username object
The username of the driver
email string
The email of the driver
homeAddress string
The home address of the driver
city string
The city of the driver
state string
The state of the driver
zipCode string
The zip code of the driver
dateOfBirth string
The date of birth of the driver
gender number
The gender of the driver
notes string
The notes of the driver
avatar string
The avatar of the driver
isActive boolean
Whether the driver is active
{
"_id": "672d07188234567890123456",
"supplierId": "672d07188234567890123456",
"rating": 4.5,
"zoneIds": [
"672d07188234567890123456"
],
"firstName": "John",
"lastName": "Doe",
"fullName": "John Doe",
"phone": "+1234567890",
"username": "john.doe",
"email": "john.doe@example.com",
"homeAddress": "123 Main St",
"city": "New York",
"state": "NY",
"zipCode": "10001",
"dateOfBirth": "1990-01-01",
"gender": 0,
"notes": "This is a note",
"avatar": "https://example.com/avatar.png",
"isActive": true
}
Driver not found
Driver is set to switch to any vehicle
Loading...