Edit - Trucker user
PUT/api/trucker/:id
Edit a trucker user associated with your company. Keep in mind that the email and tax ID cannot be repeated.
Request
Path Parameters
Header Parameters
Apikey of a company linked to a user
- application/json
Body
Name of the trucker.
Trucker email (Must be unique)
Trucker's phone.
Truck driver's identity document (Must be unique).
Responses
- 200
Example response
- application/json
- Schema
- Example (from schema)
- Example 1
Schema
data object
position object
Array of services and their last known position
Account role ("driver", "dev", "manager" or "admin")
Account status (Locked or active in boolean).
Account blocking reason.
Boolean that indicates whether the email is verified.
Trucker's phone.
Country of residence of the trucker.
Trucker time zone.
Trucker image.
Password recovery token.
Language of the trucker user.
Boolean indicating whether the user has been deleted.
Name of the trucker.
Truck driver's last name.
Trucker email (Must be unique)
Truck's identity document (Must be unique).
Hashed password of the trucker account.
{
"status": 0,
"data": {
"_id": "65e1fc46a39d32135b12c7e0",
"position": {
"deliveries": []
},
"role": "driver",
"status": true,
"reason": "NONE",
"emailVerified": false,
"phone": "34668936908",
"country": "esp",
"timezone": "europe/madrid",
"image": "",
"recovery_token": "XXX",
"i18n": "es",
"deleted": false,
"name": "Name",
"lastname": "Lastname",
"email": "email@example.com",
"taxid": "12345678A",
"password": "XXX"
}
}
{
"status": 200,
"data": {
"_id": "65e5ef1851342f8dec7aa2d1",
"name": "Name",
"image": "",
"phone": "123456789",
"taxid": "12345678A",
"email": "email@example.com",
"createdAt": "2024-03-04T15:56:08.868Z",
"updatedAt": "2024-03-04T15:56:08.958Z"
}
}