Update user profile
PUT/truckers/users/me
Allows updating the profile data of the currently authenticated carrier user. Supports updating basic data and uploading a profile image.
Validations performed:
- The email must have a valid format if provided
- The name is mandatory
- If the email is changed, it is verified that it is not already in use by another user
Editable fields:
- Basic information (name, last name, phone number)
- Email (with availability verification)
- Profile image (multipart/form-data format)
Request example:
{
name: Juan,
lastname: Pérez,
phone: +34666555444,
email: nuevo@email.com
}
Request
Responses
- 200
- 400
- 401
- 404
- 406
Updated carrier user data. Includes all fields defined in the TruckerUser schema.
Invalid data - The provided fields did not pass the validations
Unauthorized - Invalid, expired, or missing JWT token
User not found - The user ID does not exist or has been deleted
Email in use - The new email is already registered by another user