全量导入部门接口
POST
/v5/corp/department/import
全量导入部门接口
接口版本 | 更新时间 | 版本说明 |
---|---|---|
v1 | 2018.12.4 | 使用 _id 作为 id |
v2 | 2019.6.21 | 使用 dept_no 作为 id |
v4 | 2022.6.30 | 返回值新增字段 type、status、integrate_id |
v5 | 2022.10.28 | 在 v4 的基础上,接口请求频率由 5 次每秒提升至 10 次每秒;接口路由修改为 POST corp/department/import |
1.
2.
3.
4.
5.
6.
7.
8.
9.
参数 | 是否必需 | 类型 | 说明 |
---|---|---|---|
departments | 是 | Array | 部门列表 |
departments[].dept_no | 是 | Number | 部门编号(上限 9007199254740991) |
departments[].name | 是 | String | 部门名称 |
departments[].parent_no | 否 | Number | 父部门编号,不传默认为根部门下 |
{
"departments": [{
"dept_no": 11,
"name": "研发部门",
"parent_no": 1
}, {
"dept_no": 12,
"name": "测试部门",
"parent_no": 1
}]
}
注:在使用批量导入部门的 API 接口时,在传入新部门的同时,还需要写入新部门的根部门,以保证部门树结构的完整性。
参数 | 类型 | 说明 |
---|---|---|
status | String | 返回请求结果 |
{
"status": "success"
}
请求参数
Body 参数application/json