AVAILABLE WITH BUSINESS SUBSCRIPTION

Method: getUserProfile 

Permissions to Run the Request

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


ParameterTypeDescription
token (required)stringAccess token. You can obtain a token by making a request.
userId (required)stringID 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.

ParameterTypeDescription
userIdstringID of the specified user
statusintUser status: 1 — active, 3 — inactive
departmentIdstringID of the department the user belongs to
emailstringThe email of the user
groupsstring[]IDs of groups the user belongs to
fieldsstring[][2]User profile fields — an array of objects with the following properties: Id, value
addedDatedate

The date the user was added to the account

lastLoginDatedate

The date the user last timed logged in to the account

manageableDepartmentIdsstring[]

IDs of departments the users manages if their role is Department Administrator or Publisher

rolestring

The user's role

workLeaveStatus (optional)string

A work leave status. An array with the following parameters:

  • workLeaveReason  
    Reasons for work leave status
  • startDate
    The work leave status start date. You can add it in the yyyy-mm-dd format
  • endDate
    The work leave status end date. You can add it in the yyyy-mm-dd format


Possible Errors

ErrorDescription
Unknown userThe user with the given ID cannot be found.
Permission deniedYou do not have enough permissions to get user info.

Sample Call


<?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

Sample Response

<?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>
XML