AVAILABLE WITH BUSINESS SUBSCRIPTION

Method: updateDepartment

Permissions to Run the Request

Account Owner, Account Administrators, or custom roles

Parameters

ParameterTypeDescription
token (required)stringAccess token. You can obtain a token by making a request.
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

ParameterTypeDescription
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 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>
           <token>p-1sJDjmULL5DdpXPJTcbm4jVIaWVHvNmrjAxATRbNE</token> 
        </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