You can add a department by sending the POST request to the following URL: /department.
Permission to run the request: Account Owner, Administrators.
|X-Auth-Account-Url (required)||Base URL of the account, e.g. http://myaccount.ispringlearn.com|
|X-Auth-Email (required)||Login of Account Owner or Administrator.|
|X-Auth-Password (required)||Password of Account Owner or Administrator.|
|parentDepartmentId (required)||ID of the department wich will the parent for the added one.|
After the request has been completed, the system returns the response with the 201 code. The body of the response contains ID of the added department.
Possible Response Codes
|201||Successful operation||A new department has been added.|
|400||Bad Request||Some of the sent parameters are incorrect.|
|401||Unauthorized||An authorization error.|
|403||Permission denied||The user doesn't have enough permissions to add departments.|