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

You can delete a department with the removeDepartment method.

Permissions to run the request: Account OwnerAdministrators, Department Administrators.

Department Administrator can delete only the department they manage and its daughter departments.

You can't delete a department if:

  • it contains users,
  • it is managed by Department Administrator or Author,
  • it is the root one.

Parameters

Parameter

TypeDescription
credentials (required)credentialsRead the description of the Credentials object.
departmentId (required)stringThe ID of the department that you want to remove.

Return Value

ParameterTypeDescription
successbool'True' if the specified department has been removed.

Possible Errors

ErrorDescription
Permission deniedYou have no permissions to delete departments.
Wrong parametersThe department with the specified ID was not found or it is the root one.

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>
     <RemoveDepartmentRequest>
       <credentials>
         <accountUrl>http://myaccount.ispringlearn.com</accountUrl>
         <email>email@email.com</email>
         <password>password</password>
       </credentials>
       <departmentId>string</departmentId>
     </RemoveDepartmentRequest>
   </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://ispringlearn.com/go/services/api/soap">
  <SOAP-ENV:Body>
    <successResult>
      <success>true</success>
    </successResult>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
  • No labels