AVAILABLE WITH BUSINESS SUBSCRIPTION

Method: removeDepartment

You can't delete a department if:

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

Permissions to Run the Request

Account Owner, Account Administrators, or custom roles

Parameters

Parameter

TypeDescription
token (required)stringAccess token. You can obtain a token by making a request.
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="https://schemas.xmlsoap.org/soap/envelope/"
                    xmlns="https://ispringlearn.com/go/services/api/soap">
   <SOAP-ENV:Body>
     <RemoveDepartmentRequest>
       <credentials>
          <token>p-1sJDjmULL5DdpXPJTcbm4jVIaWVHvNmrjAxATRbNE</token>
       </credentials>
       <departmentId>string</departmentId>
     </RemoveDepartmentRequest>
   </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="https://ispringlearn.com/go/services/api/soap">
  <SOAP-ENV:Body>
    <successResult>
      <success>true</success>
    </successResult>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
XML