AVAILABLE WITH BUSINESS SUBSCRIPTION
Request: POST /department
Permissions to Run the Request
Account Owner, Account Administrators, or custom roles.
Request Headers
Header | Description |
---|
Authorization (required) | Access token. You can obtain a token by making a request. |
Parameter | Description |
---|
parentDepartmentId (required) | The ID of the department wich will the parent for the added one. |
Possible Response Codes
Code | Text | Description |
---|
201 | Created | A new department has been added. The body of the response contains ID of the added department. |
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. |
Sample Request
POST /department https/1.1
Host: api-learn.ispringlearn.com
Authorization: p-1sJDjmULL5DdpXPJTcbm4jVIaWVHvNmrjAxATRbNE
Content-Type:application/xml
<?xml version="1.0" encoding="UTF-8"?>
<request>
<name>New Department</name>
<parentDepartmentId>3fa85f64-5717-4562-b3fc-2c963f66afa6</parentDepartmentId>
<code>12345W</code>
</request>
XML
Sample Response
https/1.1 201 Created
<?xml version="1.0" encoding="UTF-8"?>
<response>d48bd4fa-5b70-11e9-b12b-22e9fbac4a59</response>
XML