Page tree
Skip to end of metadata
Go to start of metadata

You can add an organization with the addDepartment method.

Permissions to run the request: Account OwnerAdministrators,

Parameters

ParameterTypeDescription
credentials (required)credentialsRead the description of the Credentials object.
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="http://schemas.xmlsoap.org/soap/envelope/"
                   xmlns="http://ispringlearn.com/go/services/api/soap">
   <SOAP-ENV:Body>
     <AddDepartmentRequest>
       <credentials>
         <accountUrl>http://myaccount.ispringlearn.com</accountUrl>
         <email>email@email.com</email>
         <password>password</password>
       </credentials>
       <name>string</name>
       <parentDepartmentId>string</parentDepartmentId>
       <code>string</code>
    </AddDepartmentRequest>
  </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://ispringlearn.com/go/services/api/soap">
  <SOAP-ENV:Body>
    <AddDepartmentResult>
      <departmentId>string</departmentId>
    </AddDepartmentResult>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
  • No labels