put https://api.timeero.app/api/public/users/74986
Endpoint: PUT /users/userId
Description: Updates the details of an existing user specified by the user ID.
URL Parameters:
userId
(required): The ID of the user to update.
Request Body:
first_name nullable | string | The first name of the user. |
last_name nullable | string | The last name of the user. |
email nullable | string | The email address of the user. |
phone nullable | string | The phone number of the user. |
password nullable | string | The password for the user account. Must be at least 6 characters long and include one lowercase letter, one uppercase letter, one number, and one special character. |
company_employee_id nullable | string | The company-specific employee ID. |
employee_code nullable | string | The kiosk employee code which should be only 4 digits long. |
role_id nullable | integer | The role of the user (1 for Admin, 2 for Manager, 3 for Employee; default is 3). |
track_location nullable | boolean | Indicates if location tracking is enabled (default is false). |
track_mileage nullable | boolean | Indicates if mileage tracking is enabled (default is false). |
pay_rate nullable | Integer | The pay rate for the user (default is 0). |
billing_rate_type nullable | Integer | The billing rate type (0 for hourly, 1 for daily; default is 0) |
Request Body Sample:
{
"first_name": "Joe", // required
"last_name": "Doe", // required
"email": "", // required
"phone": "03237824623", // required
"password": "Password@123", // required
"company_employee_id": 67, // nullable
"employee_code": "", // nullable: Kiosk Employee Code
"role_id": 2, // nullable 1 - admin, 2- manager, 3 - employee, default is 3
"track_location": true, // nullable boolean default false
"track_mileage": true, // nullable boolean default false
"pay_rate": 10, // nullable default 0
"billing_rate_type": 0 // nullable default 0 - hourly, 1 - daily
}