users
Update a user
Update user details. For staff users, upline_id is automatically set to null. Role changes will end current roles and create new ones.
put/users/{id}
Path parameters
idnumber required
Example:1
User ID
Request body
Example request
{
"name": "John Doe",
"email": "john.doe@example.com",
"password": "newpassword123",
"commission_plan_id": 1,
"upline_id": 1,
"takaful_status": "active",
"email_verified": true,
"role_ids": [
1,
2
]
}Response
User updated successfully
Example response
{
"user_id": 1,
"name": "John Doe",
"email": "john.doe@example.com",
"registration_date": "2024-01-01T00:00:00.000Z",
"takaful_status": "inactive",
"commission_plan_id": 1,
"roles": [
{
"user_role_id": 1,
"role_id": 1,
"role_name": "admin",
"start_date": "2024-01-01T00:00:00.000Z"
}
]
}Changes
No recorded changes to this endpoint across all 1 revision of this API.