English
Set Department Status
About 145 wordsLess than 1 minute
2026-01-19
Not Recommended to Continue Using Deprecated Interfaces!!!
Description
Set department status
Request Specification
Method: POST + application/json
Endpoint: https://${Cloud Domain}/cgi/crm/v2/data/update?thirdTraceId=${Random String}
This interface is deprecated. Recommended to use object-oriented APIs (modify department object) instead
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| corpAccessToken | String | Yes | Enterprise app access token |
| corpId | String | Yes | Open platform company account |
| departmentId | Int | Yes | Department ID |
| status | Int | Yes | Status (1: disabled, 2: enabled) |
Request Example
{
"corpAccessToken": "{corpAccessToken}",
"corpId": "{corpId}",
"departmentId": 1,
"status": 1
}Response Parameters
| Parameter | Type | Description |
|---|---|---|
| traceId | string | Unique request ID |
| errorDescription | string | Error description |
| errorMessage | string | Error message |
| errorCode | Int | Error codes |
Response Example
{
"traceId": "E-O.827xxxxxx",
"errorDescription": "success",
"errorMessage": "OK",
"errorCode": 0
}Notes
- Do not use the message field in the response for logical judgment as errorMessage may change;
