Skip to main content

Update driver (root route)

PUT 

/truckers/drivers/

Updates the information of an existing driver using the root route.

Requirements:

  • Administrator role
  • Authentication via a valid JWT

Accepted Parameters:

  • name: Driver's new name
  • email: New email (must be unique)
  • phone: New phone number
  • status: New status (active/inactive/pending)
  • image: New driver photo (multipart format)

Request Example:

{
name: Juan Pérez Updated,
email: juan.nuevo@transporte.com,
status: active
}

Notes:

  • To update the image, use multipart/form-data
  • Only the provided fields will be updated
  • The email must be unique in the system

Request

Responses

Successful response returning the full details of a driver. Includes complete profile information, status, and metadata.