AVAILABLE WITH BUSINESS SUBSCRIPTION
Method: updateDepartment
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 | ID of the department you want to edit. |
name (optional) | string | Name of the department. |
code (optional) | string | Code of the department. |
parentDepartmentId (optional) | string | ID of the parent department. |
Return Values
Parameter | Type | Description |
---|
success | bool | True if the department was successfully updated. |
Possible Errors
Тип | Описание |
---|
Unknown Department | The department is not found. |
Permission denied | The user doesn't have enough permissions to update the information about the department. |
Wrong Parameters | One of the specified parameters is wrong. |
Sample Call
POST /api/v2/soap/2.0 https/1.1
SOAPAction: "updateDepartment"
<?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>
<UpdateDepartmentRequest>
<credentials>
<accountUrl>https://myaccount.ispringlearn.com</accountUrl>
<email>email@mail.com</email>
<password>password</password>
</credentials>
<departmentId>2bbc2ed0-8841-11e9-93c1-0242c0a85016</departmentId>
<name>Quality Assurance</name>
<code>1</code>
<parentDepartmentId>be676588-5448-11e9-b7f7-62fb686e6fbe</parentDepartmentId>
</UpdateDepartmentRequest>
</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://new.webservice.namespace">
<SOAP-ENV:Body>
<updateDepartmentResult>
<success>true</success>
</updateDepartmentResult>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
XML