Method: updateUserProfile

Permissions to Run the Request

Account Owner, Account Administrators, Department Administrators, or custom roles

Department Administrators and users with a custom role can edit profiles of the users belonging to the departments they manage and their sub-departments.

Request Headers

ParameterTypeDescription
credentials (required)credentialsRead the description of the Credentials object.
userId (required)stringThe ID of the user whose profile you want to update.
email (optional)stringThe email of the user.
password (optional)stringThe password of the user. 
login (required)stringThe login of the user.
departmentId (required)stringThe department ID the user belongs to.
role (required)string

If you assign one of the standard roles to the user (apart from Account Owner and Publisher), set one of the following values to the role parameter:

  • learner
  • department_administrator
  • administrator

If you assign one of the custom roles to the users, set the custom value to the role parameter. 

roleId (required if the user role isPublisheror a custom role)stringThe roleId parameter is used, if you assign one of the custom roles or the Publisher role to the user.
manageableDepartmentIds (required if the user's role is Department Administrator,Publisher,or a custom role)string[]

An array with the IDs of the departments the user will manage.

groups (optional)string[]Array of IDs of the groups the user will be added to.

All required fields of the user profile must be included in the request (excluding the Country field type). 


Return Value

After the request has been completed, the system returns an object with the following properties:

ParameterTypeDescription
successboolTrue if the user's profile has been updated.

Possible Errors

TypeDescription
Unknown userThe user with the specified ID was not found.
Permission deniedThe user has no permissions to update info of the specified user.
Wrong ParametersOne of the specified parameters is incorrect.
Invalid value <field_value>. Field <field_name> must be unique.An error occurs if the Login and Email 'user_fields' have been changed. They should be unique.

Sample Call

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
                   xmlns="http://new.webservice.namespace">
  <SOAP-ENV:Body>
    <UpdateUserProfileRequest>
      <credentials>
        <accountUrl>http://myaccount.ispringlearn.com</accountUrl>
        <email>email@email.com</email>
        <password>password</password>
      </credentials>
      <userId>string</userId>
      <fields>
        <field>
          <name>LOGIN</name>
          <value>john@gmail.com</value>
        </field>
        <field>
          <name>PASSWORD</name>
          <value>1234</value>
        </field>
        <field>
          <name>EMAIL</name>
          <value>john@gmail.com</value>
        </field>
        <field>
          <name>FIRST_NAME</name>
          <value>John</value>
        </field>
        <field>
          <name>LAST_NAME</name>
          <value>Smith</value>
        </field>
        <field>
          <name>COUNTRY</name>
          <value>1</value>
        </field>
      </fields>
      <groups>
        <id>string</id>
        <id>string</id>
      </groups>
      <role>department_administrator</role>
      <departmentId>string</departmentId>
      <manageableDepartmentIds>
        <id>string</id>
        <id>string</id>
      </manageableDepartmentIds>
    </UpdateUserProfileRequest>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Sample Response

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
                   xmlns="http://new.webservice.namespace">
  <SOAP-ENV:Body>
    <UpdateUserProfileResult>
      <success>true</success>
    </UpdateUserProfileResult>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>