AVAILABLE WITH BUSINESS SUBSCRIPTION

Method: addDepartment

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.
name (required)stringThe name of the new department.
parentDepartmentId (required)stringThe ID of the parent department.
code (optional)stringThe department code.

Return Value

ParameterTypeDescription
departmentIdstringThe ID of the created department.

Possible Errors

ErrorDescription
Permission deniedThe user has no permissions to add departments.
Wrong parametersThe system failed to process the request because it did not contain all necessary parameters.

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>
     <AddDepartmentRequest>
       <credentials>
          <token>p-1sJDjmULL5DdpXPJTcbm4jVIaWVHvNmrjAxATRbNE</token>
       </credentials>
       <name>string</name>
       <parentDepartmentId>string</parentDepartmentId>
       <code>string</code>
    </AddDepartmentRequest>
  </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>
    <AddDepartmentResult>
      <departmentId>string</departmentId>
    </AddDepartmentResult>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
XML