Method: updateDepartment

Permissions to Run the Request

Account Owner, Account Administrators, or custom roles

Parameters

ПараметрТипОписание
credentials (required)credentialsRead the description of the Credentials object.
departmentId (required)stringID of the department you want to edit.
name (optional)stringName of the department.
code (optional)stringCode of the department.
parentDepartmentId (optional)stringID of the parent department.

Return Values

ПараметрТипОписание
successboolTrue if the department was successfully updated.

Possible Errors

ТипОписание
Unknown DepartmentThe department is not found.
Permission denied

The user doesn't have enough permissions to update the information about the department.

Wrong ParametersOne of the specified parameters is wrong.

Sample Call

POST /api/v2/soap/2.0 HTTP/1.1
SOAPAction: "updateDepartment"

<?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>
      <UpdateDepartmentRequest>
        <credentials>
          <accountUrl>http://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>

Sample Response

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
                   xmlns="http://new.webservice.namespace">
  <SOAP-ENV:Body>
    <updateDepartmentResult>
      <success>true</success>
    </updateDepartmentResult>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>