Update driver by ID
PUT/truckers/drivers/:id
Updates the information of a specific driver identified by their ID.
Requirements:
- Administrator role
- Valid JWT authentication
Parameters:
- id (path): Unique ID of the driver to update
Updatable fields:
- name: Full name
- email: Email address (must be unique)
- phone: Contact phone number
- status: Status (active/inactive/pending)
- image: Driver's photo (multipart format)
Request example:
{
name: Juan Pérez Modified,
phone: +34666777888,
status: active
}
Notes:
- Use multipart/form-data to update the image
- Only the provided fields will be updated
- The system will automatically record the update date
Request
Responses
- 200
- 400
- 401
- 403
- 404
- 500
Successful response returning the full details of a driver. Includes complete profile information, status, and metadata.
Invalid input data
Unauthorized
Forbidden (admin required)
Driver not found
Server error