批量查询部门信息
调用该接口批量查询部门信息。
请求
| 基本 | |
|---|---|
| 请求方式 | POST |
| 请求地址 | /openapi/v3/contacts/departments/batch_get |
请求头
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| Authorization | string | 是 | 值格式:Bearer {{access_token}}调用 API 时,需要通过访问凭证(access_token)进行身份鉴权,不同类型的访问凭证可获取的数据范围不同,参考 获取访问凭证 。 支持鉴权类型: • 应用级token:以应用身份调用 API,校验应用的数据访问范围。参考 获取企业内部应用access_token。• 用户级token:以登录用户身份调用 API,校验用户的可见数据范围。参考 获取登录用户access_token。 |
| Content-Type | string | 是 | 固定值:application/json; charset=utf-8 |
请求参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| department_ids | array[string] | 是 | 部门id列表 |
| need_manager_union_ids | bool | 否 | 是否需要部门负责人 |
请求体示例
1{2 "department_ids": [3 "sunt incididunt Ut"4 ],5 "need_manager_union_ids": true6}
响应
响应体
1{2 "code": 0,3 "data": {4 "departments": [{5 "department_id": "string",6 "department_name": "string",7 "has_child": true,8 "department_parent_id": "string",9 "manager_union_ids": ["222", "333"]10 }]11 },12 "msg": "ok",13 "trace_id": "ae4bd3d6d939f7790fa354e2402450e0"14}
