# 接口说明
- 1.最新接口
- 2.不支持批量添加,先添加父部门,后添加子部门
- 3.部门名称中避免出现特殊字符,如:. * + ( ) $ / \ ? [ ] ^ { }等
| 请求方式 | 请求地址 |
|---|---|
| POST | /openapi/func/department/create |
请求参数:
| 字段 | 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|---|
| timestamp | 时间戳 | long | Y | 13位时间戳 |
| sign | 签名 | string | Y | 4ergfdsawesf |
| access_token | token | string | Y | 登录 token |
| employee_id | 操作人id | string | Y | 操作人id,调用接口人 id |
| employee_type | 用户类型 | string | Y | 类型,0为分贝用户,1为第三方用户 |
| data | 请求数据 | jsonstring | Y | 请求数据 |
| data.org_unit_name | 部门名称 | string | Y | 审计部 |
| data.third_parent_id | 直属部门id | string | Y | 第三方直属部门ID,即添加部门的父部门三方id |
| data.third_org_id | 部门id | string | Y | 第三方部门ID,即添加部门的三方id |
| data.operator_id | 操作人id | string | N | 实际操作人ID(同employee_id) |
| data.expand_json | 扩展属性 | jsonobject | N | 该字段用于同步部门的扩展内容,{} |
| data.org_unit_code | 部门编码 | string | N | 部门编码 |
请求示例:
"access_token": "xxx.xxx.xxx",
"timestamp": 1596697247000,
"employee_id":"third_jianyuan",
"employee_type":"1",
"sign": "83su83jld83ujdmsliemxkoncksow",
"data":
{
"org_unit_name": "审计部",
"third_parent_id": "第三方直属部门ID",
"third_org_id": "第三方机构部门ID",
"operator_id": "57ab054c2528225bd523",
"org_unit_code": "676878",
"expand_json": {}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
返回结果
{
"request_id": "QvvES5ZqPXkIHMRAVHGI",
"code": 0,
"msg": "success"
}
{
"request_id": "JOI8njN23AMukbv4iy6r",
"code": 200002,
"msg": "当前第三方部门ID已经存在"
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
← 3.1.1.部门绑定 3.1.3.更新部门 →