Skip to Content
PeopleForce
Departments

Deprecated

Company API v2 is deprecated. It no longer receives changes and will stop being supported, so move integrations to Company API v3, which serves every v2 path under /api/public/v3.

Update a department

Deprecated

PUT
/api/public/v2/departments/{id}

Path Parameters

id*integer
Formatint64

Request Body

application/json
  1. body
name?string
parent_id?integer
Formatint64
manager_id?integer
Formatint64
department_level_id?integer
Formatint64
cost_centre?string

Response Body

The updated department.

application/json
  1. response
data*
Example Request
curl -X PUT 'https://app.peopleforce.io/api/public/v2/departments/0' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "data": {    "id": 0,    "name": "string",    "parent_id": 0,    "manager_id": 0,    "department_level": {      "id": 0,      "name": "string",      "hex_color": "string"    },    "created_at": "2019-08-24T14:15:22Z",    "updated_at": "2019-08-24T14:15:22Z",    "ancestors": [      {        "id": 0,        "name": "string",        "department_level": {          "id": 0,          "name": "string",          "hex_color": "string"        }      }    ],    "fields": {      "property1": {        "name": "string",        "value": "string"      },      "property2": {        "name": "string",        "value": "string"      }    }  }}