Assigning a Supervisor to an Employee
AVAILABLE WITH BUSINESS SUBSCRIPTION
Request: POST /user/{userId}/subordination
With this method, you can assign the supervisor and functional manager to a user.
Permissions to Run the Request
Account Owner and Account Administrator, or a custom role that allows you to view, create, edit, and delete users.
Department Administrator and a user with a role with individual settings can only assign a manager to users that they manage.
- The Account Owner and Account Administrator can assign themselves as user supervisors or functional managers.
- Neither the Department Administrator nor a user with a custom role can assign themselves as a department supervisor.
Request Headers
Header | Description | |
---|---|---|
Authorization (required) | Access token. You can obtain a token by making a request. | |
userId (required) | The ID of the user you are assigning a supervisor to. | |
Parameter | Description | |
subordination (required) | An array with data on the type of supervisor subordination. | |
coSubordination (optional) | An array with data on the type of functional manager subordination. | |
subordinationType (required) | The type of supervisor subordination.
| |
supervisorId (optional) | The supervisor ID. Specify the ID if subordinationType=manual. |
Response Codes
Code | Text | Description |
---|---|---|
204 | No Content | The supervisor has been assigned to a user. |
400 | Bad Request | A request error. |
401 | Unauthorized | An authorization error. |
403 | Permission Denied | The user doesn't have enough permissions to get information on subordination. |
Sample Request
POST /user/bc7ac85a-e911-11ea-9d4d-4a33a68eed9f/subordination
Host: api-learn.ispringlearn.com
Authorization: p-1sJDjmULL5DdpXPJTcbm4jVIaWVHvNmrjAxATRbNE
Content-Type:application/xml
<request>
<subordination>
<subordinationType>manual</subordinationType>
<supervisorId>0ccca211-b60f-11ea-bc49-028d9ecdf612</supervisorId>
</subordination>
<coSubordination>
<subordinationType>no_supervisor</subordinationType>
</coSubordination>
</request>
XML
Sample Response
https/1.1 204 No Content
XML