AVAILABLE WITH BUSINESS SUBSCRIPTION
Request: POST /department/{departmentId}
Permissions to Run the Request
Account Owner, Account Administrators, Department Administrators, or custom roles.
Department Administrators and users with a custom role can update only the department they manage and its sub-departments.
Header | Description |
---|
Authorization (required) | Access token. You can obtain a token by making a request. |
Parameter | Description |
---|
departmentId (required) | The ID of a department you want to edit. |
name (optional) | The department name. |
parentDepartmentId (optional) | The ID of the parent department. |
code (optional) | The department code. |
Response Codes
Code | Text | Description |
---|
204 | No Content | The parameter is successfully updated. |
400 | Bad Request | A request error. |
401 | Unauthorized | An authorization error. |
403 | Permission denied | The user doesn't have enough permissions to update a department. For instance, Department Administrators can't edit departments they don't manage. |
Sample Request
POST /department/d48bd4fa-5b70-11e9-b12b-22e9fbac4a59 https/1.1
Host: api-learn.ispringlearn.com
Authorization: p-1sJDjmULL5DdpXPJTcbm4jVIaWVHvNmrjAxATRbNE
Content-Type:application/xml
<?xml version="1.0" encoding="UTF-8"?>
<request>
<name>Quality Assurance</name>
<parentDepartmentId>be676588-5448-11e9-b7f7-62fb686e6fbe</parentDepartmentId>
<code>5</code>
</request>
XML
Sample Response
https/1.1 204 No Content
XML