Edit a User

Endpoint: PUT /users/userIdDescription: 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
optional
stringThe first name of the user.
last_name
optional
stringThe last name of the user.
email
optional
stringThe email address of the user.
phone
optional
stringThe phone number of the user.
password
optional
stringThe 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
optional
stringThe company-specific employee ID.
employee_code
optional
stringThe kiosk employee code which should be only 4 digits long.
role_id
optional
integerThe role of the user (1 for Admin, 2 for Manager, 3 for Employee; default is 3).
track_location
optional
booleanIndicates if location tracking is enabled (default is false).
track_mileage
optional
booleanIndicates if mileage tracking is enabled (default is false).
pay_rate
optional
IntegerThe pay rate for the user (default is 0).
billing_rate_type
optional
IntegerThe 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", // optional
    "password": "Password@123", // required 
    "company_employee_id": 67, // optional
    "employee_code": "", // optional: Kiosk Employee Code
    "role_id": 2, // optional 1 - admin, 2- manager, 3 - employee, default is 3
    "track_location": true, // optional boolean default false
    "track_mileage": true, // optional boolean default false
    "pay_rate": 10, // optional default 0
    "billing_rate_type": 0 // optional default 0 - hourly, 1 - daily
}

Language
URL
Click Try It! to start a request and see the response here!