文档中心 部门接口 更新部门

更新部门

1.功能说明

更新部门

2.接口调用说明

请求URL

https://openapi.guanaitong.tech/department/update

HTTP请求方式

POST

输入参数说明

(1)公共参数

发送请求是必须传入公共参数,详见公共参数

(2)私有参数

参数名称 是否必须 参数类型 长度限制 描述
enterprise_code string [1,20] 企业编号(集团同步,企业无需填写)
dept_code string [1,50] 部门编码
name string [1,100] 部门名称
parent_code string [1,50] 上级部门编码
manager_code string [0,20] 部门主管工号
status int [1] 部门是否有效,1有效、2无效(该字段已废弃)
请求示例
POST /department/update HTTP/1.1
Host: openapi.guanaitong.tech
Content-Type: application/x-www-form-urlencoded
Cache-Control: no-cache

access_token=6007bf4c6efeb798da35b843e4614cff&dept_code=S100&manager_code=HB200&name=部门测试&
timestamp=1501741860&parent_code=S000&status=1&sign=dc2cb643d101d8ae96e857ff4ca24de23bf4f27f
                    
返回参数说明
参数名称 描述
code 返回码。详见错误返回码
msg 如果错误,返回错误信息。
data 如果没有错误,返回部门编号
正确返回示例
{
    "code": 0,
    "data": "S100",
    "msg": "OK"
}
错误返回示例
{
    "code": 1000210001,
    "msg": "timestamp check failed!",
    "data": null
}