Page tree
Skip to end of metadata
Go to start of metadata

You can update a user's profile with the updateUserProfile method.

Permissions to run the request: Account OwnerAdministratorsDepartment Administrators.

Department Administrators can update profiles of users belonging only to the department they manage and its daughter departments.

Request Headers

ParameterTypeDescription
credentials (required)credentialsRead the description of the Credentials object.
userId (required)stringID of the user whose profile you want to update.
email (optional)stringEmail of the new user.
password (optional)stringPassword of the new user. 
login (required)stringLogin of the new user.
departmentId (required)stringDepartment ID the user will be added to.
role (required)string

The user might be assigned to one of the roles:

learner
publisher
department_administrator
administrator

manageableDepartmentIds (required if the user's role is department_administrator or publisher)string[]

An array with the IDs of the departments the user will manage if their role is Department Administrator or Publisher.

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>publisher</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>
  • No labels