Assigning a Supervisor to an Employee
AVAILABLE WITH BUSINESS SUBSCRIPTION
Method: changeUserSubordination
Permissions to Run the Request
Account Owner and Account Administrators, 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
Parameter | Type | Description | |
---|---|---|---|
token (required) | string | Access token. You can obtain a token by making a request. | |
userId (required) | string | The ID of the user you are assigning a supervisor to. | |
subordination (optional) | array | An array with data on the type of supervisor subordination. | |
coSubordination (optional) | array | An array with data on the type of functional manager subordination. | |
subordinationType (required) | string | The type of supervisor and functional manager subordination.
| |
supervisorId (optional) | string | The supervisor and functional manager ID. | Specify if subordinationType = manual. |
- | If subordinationType = inherit, no_supervisor, there is no need to specify the supervisor ID. |
Return Value
After the request has been successfully processed, the system returns an object with the following properties:
Parameter | Type | Description |
---|---|---|
success | bool | True if the manager's subordination type has changed. |
Possible Errors
Type | Description |
---|---|
Permission Denied | The user doesn't have enough permissions to get information on subordination. |
Wrong parameters | The system failed to process the request because the parameter`s value is not specified or invalid. |
Sample Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap="http://ispringlearn.com/go/services/api/soap">
<soapenv:Body>
<soap:ChangeUserSubordinationRequest>
<soap:credentials>
<soap:token>p-1sJDjmULL5DdpXPJTcbm4jVIaWVHvNmrjAxATRbNE</soap:token>
</soap:credentials>
<soap:userId>0ccca211-b60f-11ea-bc49-028d9ecdf612</soap:userId>
<soap:subordination>
<soap:subordinationType>manual</soap:subordinationType>
<soap:supervisorId>ea100904-279b-11ed-82e7-0242ac160042</soap:supervisorId>
</soap:subordination>
<soap:coSubordination>
<soap:subordinationType>inherit</soap:subordinationType>
</soap:coSubordination>
</soap:ChangeUserSubordinationRequest>
</soapenv:Body>
</soapenv:Envelope>
XML
Sample Response
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://ispringlearn.com/go/services/api/soap">
<SOAP-ENV:Body>
<ns1:SuccessResult>
<ns1:success>true</ns1:success>
</ns1:SuccessResult>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
XML