部门信息查询接口,返回包括部门成员和管理员等信息;
POST https://qw-openapi-tx.dustess.com/open-integration-api/customer/v1/getDeptDetails?accessToken=
Content-Type: application/json| 字段 | 类型 | 描述 | 是否必须 |
|---|---|---|---|
| accessToken | String | accessToken | true |
| 请求参数名 | 类型 | 说明 | 是否必须 |
|---|---|---|---|
| deptIds | String[] | 查询的部门id列表,最多200条 | false |
| deptName | String | 部门名称,只支持中文、字母和数字,且不能超过32位 | false |
json - Request-Example:{
"deptIds": [],
"deptName": "che"
}| 响应参数名 | 类型 | 说明 |
|---|---|---|
| success | Bool | 请求状态,true:成功,false:失败_Allowed values: true,false_ |
| code | Int | 响应代码 |
| msg | String | 消息提示 |
| data | Object | 数据信息 |
| data.deptList | Object[] | 部门列表 |
| data.deptList.id | String | 部门id |
| data.deptList.name | String | 部门名称 |
| data.deptList.parentId | String | 父级部门id |
| data.deptList.deptLeaderIdList | String[] | 部门负责人员工id集合 |
| data.deptList.empList | Object[] | 部门员工列表 |
| data.deptList.empList.id | String | 员工id |
| data.deptList.empList.avatar | String | 员工头像 |
| data.deptList.empList.name | String | 员工名称 |
| data.deptList.empList.qwUserId | String | 员工企微id |
| data.deptList.empList.status | String | 员工状态 |
| trace_id | String | 跟踪id |
{
"success": true,
"code": 0,
"msg": "success",
"data": {
"deptList": [{
"id": "67",
"name": "chen1",
"parentId": "1",
"deptLeaderIdList": [],
"empList": []
}, {
"id": "68",
"name": "chen2",
"parentId": "1",
"deptLeaderIdList": [],
"empList": []
}]
},
"trace_id": "1c1804e8-d8f9-4915-965b-eca105d7f278"
} {
"success": false,
"code": 10001,
"msg": "system unknown error",
"data": null
}