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

Method: changeUserStatus

Permissions to Run the Request

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

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

Parameters

Parameter
Type
Description
credentials (required)credentialsRead the description of the Credentials object.
userId (required)stringID of the user whose profile you want to update.
status (required)string

Specify user status:

1 - active

3 - inactive


Return Value

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

Parameter
Type
Description
successboolTrue if the user's profile has been updated.

Possible Errors

TypeDescription
Unknown userA user with the specified ID was not found.
Permission deniedA user does not have enough permissions to handle the operation. For example, an organization admin can't add users to another organization.
User status must be 1 or 3, <status> givenAn unacceptable status.


Sample Call

<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
                   xmlns="http://ispringlearn.com/go/services/api/soap">
  <SOAP-ENV:Body>
    <ChangeUserStatusRequest>
      <credentials>
        <accountUrl>http://myaccount.ispringlearn.com</accountUrl>
        <email>email@email.com</email>
        <password>password</password>
      </credentials>
      <userId>string</userId>
      <status>1</status>
    </changeUserStatusRequest>
  </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: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>
  • No labels