| HTTP状态码 | 错误码 | 描述 | 排查建议 |
|---|---|---|---|
| 400 | 43005 | duplicate order error | 部门的order必须唯一,请检查后重试。 |
| 400 | 40002 | process root dept error | 不能对根部门进行移除部门群处理 |
| 400 | 40003 | internal error | 内部错误,请提供 X-Request-Id向客服反馈。联系客服。 |
| 403 | 40004 | no dept authority error | 操作的部门需在通讯录权限范围中,了解更多 |
| 400 | 40008 | dept Info is null error | 部门的信息不能为空 |
| 400 | 40010 | chat id is invalid error | 部门群ID格式错误。 |
| 403 | 40014 | no parent dept authority error | 没有父部门权限(组织架构可见范围权限)。 |
| 401 | 42008 | tenant id is invalid error | 请检查请求租户是否为合法租户。 |
| 400 | 40016 | dept name can not be nul error | 部门名不能为空。 |
| 400 | 40017 | parent id can not be null in updateRequest | 父部门id不能为空 |
| 400 | 40018 | duplicate name error | (同一父部门下)部门名必须唯一,请检查后重试。 |
| 400 | 43004 | illegal unit error | 部门unit id无效。 |
| 400 | 43017 | relate dept over limit | 关联部门超过限制 |
| 400 | 43018 | duplicate i18n name | 重复的i18n名字 |
| 400 | 43019 | exceed dept max level | 超过部门层级深度 |
| 400 | 43021 | department chat not exist | 部门群不存在 |
| 400 | 43022 | department name duplicate | 部门名重复 |
| 400 | 43023 | dept structure no permissione | 组织架构没有权限 |
| 400 | 43024 | dept structure tenant lock fail | 部门结构变动获取租户锁失败 |
| 400 | 43025 | top department leader unjoined | 用户未加入不能成为企业负责人 |
| 400 | 43026 | employee type is not valid | 请使用准确的雇员类型 |
curl --location --request PUT '/contact/v3/departments/od-4e6ac4d14bcd5071a37a39de902c7141?user_id_type=open_id&department_id_type=open_department_id' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "DemoName",
"i18n_name": {
"zh_cn": "Demo名称",
"ja_jp": "デモ名",
"en_us": "Demo Name"
},
"parent_department_id": "D067",
"leader_user_id": "ou_7dab8a3d3cdcc9da365777c7ad535d62",
"order": "100",
"unit_ids": [
"custom_unit_id"
],
"create_group_chat": false,
"leaders": [
{
"leaderID": "ou_357368f98775f04bea02afc6b1d33478",
"leaderType": 1
}
],
}'{
"code": 0,
"msg": "success",
"data": {
"department": {
"name": "DemoName",
"i18n_name": {
"zh_cn": "Demo名称",
"ja_jp": "デモ名",
"en_us": "Demo Name"
},
"parent_department_id": "D067",
"department_id": "D096",
"open_department_id": "od-4e6ac4d14bcd5071a37a39de902c7141",
"leader_user_id": "ou_7dab8a3d3cdcc9da365777c7ad535d62",
"chat_id": "oc_5ad11d72b830411d72b836c20",
"order": "100",
"unit_ids": [
"custom_unit_id"
],
"member_count": 100,
"status": {
"is_deleted": false
}
}
}
}