查询部门
https://openapi.guanaitong.tech/department/get
POST
(1)公共参数
发送请求是必须传入公共参数,详见公共参数
(2)私有参数
| 参数名称 | 是否必须 | 参数类型 | 长度限制 | 描述 |
| enterprise_code | 否 | string | [1,20] | 企业编号(集团同步,企业无需填写) |
| dept_code | 是 | string | [1,50] | 部门编码 |
POST /department/get HTTP/1.1
Host: openapi.guanaitong.tech
Content-Type: application/x-www-form-urlencoded
Cache-Control: no-cache
access_token=6007bf4c6efeb798da35b843e4614cff&dept_code=S100&
timestamp=1495094685&sign=dc2cb643d101d8ae96e857ff4ca24de23bf4f27f
| 参数名称 | 描述 |
| code | 返回码。详见错误返回码。 |
| msg | 如果错误,返回错误信息。 |
| data | 如果没有错误,返回部门信息 |
| data.dept_code | 部门编码 |
| data.name | 部门名称 |
| data.parent_code | 上级部门编码 |
| data.manager_code | 部门主管工号 |
| data.status | 部门状态,1有效、2无效 |
{
"code": 0,
"data": {
"name": "销售部",
"status": 1,
"dept_Code": "S100",
"parent_code": "A001",
"manager_code": "SN123"
},
"msg": "OK"
}
{
"code": 1000210001,
"msg": "timestamp check failed!",
"data": null
}