English
Update Department
About 187 wordsLess than 1 minute
2026-10-23
Description
Update Department.
Request Specification
Method: POST + application/json
Endpoint: https://${Cloud Domain}/cgi/department/update?thirdTraceId=${Random String}
Headers: Refer to Common Parameters
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| department | Map | Yes | |
| id | Int | Yes | Department ID |
| name | String | Yes | Department name (must be unique); if not provided, it is not modified |
| parentId | Int | Yes | Parent department ID (0 for a top-level department); if not provided, it is not modified |
| order | Int | Yes | Department sort number; if not provided, it is not modified |
| principalOpenUserId | String | Yes | Open platform employee account of the department owner |
Request Example
{
"department": {
"id": 25.0,
"name": "Department 2",
"parentId": 2.0,
"order": 10.0,
"principalOpenUserId": "FSUID_XXXXXXXXXXXXXXXXXX"
}
}Response Parameters
| Parameter | Type | Description |
|---|---|---|
| dataId | String | Data ID |
| traceId | string | Unique request ID |
| errorDescription | string | Error description |
| errorMessage | string | Error message |
| errorCode | Int | Error Codes |
Response Example
{
"dataId": "68faxxxxxx",
"traceId": "E-O.827xxxxxx",
"errorDescription": "success",
"errorMessage": "OK",
"errorCode": 0
}Notes
- Do not use the
messagefield in the response for logical judgments, aserrorMessagemay change.
