post https://{subdomain}.workable.com/spi/v3/departments//merge
Merges an existing department with a target one in your account. Required scope: w_departments
. Accessible with all token types.
Request
An example of the request body:
{
"target_department_id": "3ff4d64b",
"force": false
}
Results
Calling the POST /departments/:id/merge
endpoint will merge the given department with the target department and will return the full department
object that is referring to the target department. If resources are affected by this merge, the endpoint will return a 409 error along with a list of those affected resources. To bypass this restriction, the client can set the force
parameter to true
{
"id": "3ff4d64b",
"name": "HR",
"parent_id": null,
"sample": false
}
Each department
will have the following keys:
key | type | description |
---|---|---|
id | string | The department identifier |
name | string | The name of the department |
parent_id | string | The department identifier of the parent department or null if it is a top level department |
sample | boolean | Indicates whether the department is a sample created department |