Skip to main content

Update User API

Overview​

Updates an employee user profile, department, or band.

  • Endpoint: /api/users/update
  • Method: POST
  • Access: Corporate Admin / User

Request Body Schema​

FieldTypeRequiredDescription
idString (UUID)YesTarget user ID
emailStringNoUpdated email address
firstNameStringNoUpdated first name
lastNameStringNoUpdated last name
phoneStringNoUpdated contact phone number
companyIdString (UUID)NoUpdated company ID
departmentIdString (UUID)NoUpdated department ID
bandIdString (UUID)NoUpdated Employee Band ID
employeeBandStringNoUpdated employee band name
approvalLimitNumberNoUpdated auto-approval limit (>= 0)
activeBooleanNoActive status toggle

Request Body Example​

{
"id": "u9876543-21ba-fedc-3210-9876543210fe",
"email": "vikram.singh@abbott.com",
"firstName": "Vikram",
"lastName": "Singh",
"phone": "+919876543210",
"departmentId": "d1234567-89ab-cdef-0123-456789abcdef",
"bandId": "b1234567-89ab-cdef-0123-456789abcdef",
"employeeBand": "Band 1",
"approvalLimit": 10000.00,
"active": true
}

Success Response (200 OK)​

{
"success": true,
"message": "User updated successfully",
"data": {
"id": "u9876543-21ba-fedc-3210-9876543210fe",
"firstName": "Vikram",
"lastName": "Singh",
"employeeBand": "Band 1",
"band": {
"id": "b1234567-89ab-cdef-0123-456789abcdef",
"name": "Band 1"
}
}
}

Database Impact​

  • Table: users
  • Operations: UPDATE record by ID.