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 | Type | Description |
---|---|---|
credentials (required) | credentials | Read the description of the Credentials object. |
departmentId (required) | string | The ID of the department that you want to remove. |
Return Value
Parameter | Type | Description |
---|---|---|
success | bool | 'True' if the specified department has been removed. |
Possible Errors
Error | Description |
---|---|
Permission denied | You have no permissions to delete departments. |
Wrong parameters | The 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> <accountUrl>https://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="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>