汇报关系
根据账号Id添加汇报关系
鉴权方式
HAP 组织授权开放接口为每个组织提供一套独立的密钥信息(AppKey 和 SecretKey),组织可通过此密钥信息安全调用 HAP 平台开放的各类接口,包括人员组织管理、汇报关系管理、应用管理、流程待办等数据接口。
版本
请求地址
Body 参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
appKey | string | 是 | AppKey |
sign | string | 是 | 签名 |
timestamp | integer | 是 | 时间戳 |
projectId | string | 是 | HAP组织Id |
superiorId | string | 否 | 上级的HAP账号Id,不传则代表添加到顶级 |
subordinateIds | string[] | 是 | 下级的的HAP账号Id列表 |
响应参数
200| 名称 | 类型 | 描述 |
|---|---|---|
error_code | integer | 状态码,1表示成功,非1表示操作异常。 (为1时error_msg字段不存在,非1时data字段不存在) |
error_msg | string | 状态描述 |
success | boolean | error_code为1时该参数值为true,否则为false |
data | object[] | 部分添加失败的下级成员列表 |
data.accountId | string | 成员账号Id |
data.failCode | integer | 错误码,10001-员工已离职,10002-汇报关系已存在 |
curl -X POST "https://example.com/v2/open/structure/addStructuresByAccountId" \ -H "Content-Type: application/json" \ -d '{ "appKey": "string", "sign": "string", "timestamp": 0, "projectId": "string", "subordinateIds": [ "string" ] }'{ "error_code": 1, "error_msg": "string", "success": true, "data": [ { "accountId": "string", "failCode": 10001 } ]}