AVAILABLE WITH BUSINESS SUBSCRIPTION
Method: addDepartment
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. |
name (required) | string | The name of the new department. |
parentDepartmentId (required) | string | The ID of the parent department. |
code (optional) | string | The department code. |
Return Value
Parameter | Type | Description |
---|
departmentId | string | The ID of the created department. |
Possible Errors
Error | Description |
---|
Permission denied | The user has no permissions to add departments. |
Wrong parameters | The 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>
<accountUrl>https://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>
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