put https://api.everlance.com/apps/v1/team_members/
What's the purpose of this endpoint?
Update a user. You can update a user's attributes and also move them to a different subteam by passing the manager_email
attribute.
How it works
We need the user token_id
parameter to be sent. If no user is found the API will return a 404 error.
Params
All of these parameters are described in the member model. For more information, please read that table first. Remember to send only the parameters to update.
Parameter | Type | Required | Notes |
---|---|---|---|
string | no | Must be unique, otherwise the API will return a 422 error | |
first_name | string | no | |
last_name | string | no | |
phone | string | no | |
employee_number | string | no | |
role | string | no | Possible values are the same as described in the model of members. If you update an admin or manager and change the role to member, please verify first that the user doesn't have any members under him. The system would return an exception if you try to change an admin/manager with an established team. If you change the role from member to admin/manager we're going to create a new subteam for that user. |
start_date | string | no | Format: yyyy-mm-dd |
end_date | string | no | Format: yyyy-mm-dd |
leave_start_date | string | no | Format: yyyy-mm-dd |
leave_end_date | string | no | Format: yyyy-mm-dd |
leave_reason | string | no | |
manager_email | string | no | Email of the manager who the user reports to, if it is different from the existing manager_email then we will move the user to the new manager_email team. It is important to know this manager must already exist on your team and must already have a role of manager or admin. If these two requirements are not true, the endpoint will return a 422 error |
program_name | string | no | Specify the program name the employee should be assigned to. If you want to remove the employee from their program send no_program |
metadata | array of objects | no | Array of metadata objects that can be assigned to the employee. See table below. |
Metadata object
Parameter | Type | Required | Notes |
---|---|---|---|
name | String | Yes | Name of the metadatum |
value | String | Yes | Value for the metadatum. If the value is null, the metadatum will be archived in Everlance |