Account Owner, Account Administrators, Department Administrators, or custom roles.
Department Administrators and users with a custom role can get information about the users belonging to the departments they manage and their sub-departments.
Parameters
Parameter | Type | Description |
---|---|---|
token (required) | string | Access token. You can obtain a token by making a request. |
userId (required) | string | ID of the user whose information you want to get. |
Return Value
After the request has been completed, the system returns an object with the following properties.
Parameter | Type | Description |
---|---|---|
userId | string | ID of the specified user |
status | int | User status: 1 — active, 3 — inactive |
departmentId | string | ID of the department the user belongs to |
string | The email of the user | |
groups | string[] | IDs of groups the user belongs to |
fields | string[][2] | User profile fields — an array of objects with the following properties: Id, value |
addedDate | date | The date the user was added to the account |
lastLoginDate | date | The date the user last timed logged in to the account |
manageableDepartmentIds | string[] | IDs of departments the users manages if their role is Department Administrator or Publisher |
role | string | The user's role |
workLeaveStatus (optional) | string | A work leave status. An array with the following parameters:
|
Possible Errors
Error | Description |
---|---|
Unknown user | The user with the given ID cannot be found. |
Permission denied | You do not have enough permissions to get user info. |
<?xml version="1.0" encoding="utf-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="https://schemas.xmlsoap.org/soap/envelope/" xmlns="https://ispringlearn.com/go/services/api/soap"> <SOAP-ENV:Body> <GetUserProfileRequest> <credentials> <token>p-1sJDjmULL5DdpXPJTcbm4jVIaWVHvNmrjAxATRbNE</token> </credentials> <userId>string</userId> </GetUserProfileRequest> </SOAP-ENV:Body> </SOAP-ENV:Envelope> |
<?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="https://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://ispringlearn.com/go/services/api/soap"> <SOAP-ENV:Body> <ns1:GetUserProfileResult> <ns1:userProfile> <ns1:userId>string</ns1:userId> <ns1:fields> <ns1:field> <ns1:Id>FIRST_NAME</ns1:Id> <ns1:value>Helen</ns1:value> </ns1:field> <ns1:field> <ns1:Id>LAST_NAME</ns1:Id> <ns1:value>Jones</ns1:value> </ns1:field> <ns1:field> <ns1:Id>EMAIL</ns1:Id> <ns1:value>helen@ispringsolutions.com</ns1:value> </ns1:field> <ns1:field> <ns1:Id>JOB_TITLE</ns1:Id> <ns1:value>Sales Manager</ns1:value> </ns1:field> <ns1:field> <ns1:Id>COUNTRY</ns1:Id> <ns1:value>5</ns1:value> </ns1:field> <ns1:field> <ns1:Id>USER_DEFINED_FIELD3</ns1:Id> <ns1:value>Higher Education</ns1:value> </ns1:field> <ns1:groups> <ns1:id>string</ns1:id> <ns1:id>string</ns1:id> </ns1:groups> <ns1:status>1</ns1:status> <ns1:role>department_administrator</ns1:role> <ns1:departmentId>string</ns1:departmentId> <ns1:addedDate>2019-03-26</ns1:addedDate> <ns1:lastLoginDate>2019-04-06</ns1:lastLoginDate> <ns1:manageableDepartmentIds> <ns1:id>string</ns1:id> <ns1:id>string</ns1:id> </ns1:manageableDepartmentIds> <ns1:userRoles> <ns1:userRole> <ns1:roleId>eaf01e14-2ae1-11e9-89a5-0242ac13000a</ns1:roleId> <ns1:roleType>department_administrator</ns1:roleType> <ns1:manageableDepartmentIds> <ns1:id>f9de0c52-6f59-11ea-b88f-cee299842653</ns1:id> <ns1:id>f9d9f306-6f59-11ea-ad9a-cee299842653</ns1:id> </ns1:manageableDepartmentIds> </ns1:userRole> </ns1:userRoles> </ns1:userProfile> </ns1:GetUserProfileResult> </SOAP-ENV:Body> </SOAP-ENV:Envelope> |