绑定接口
绑定接口是正式公开 API,用于维护第三方账号与当前 API Key 下员工 virtualId 的映射关系。
GET
/api/openplatform/bindings
查询当前 API Key 下的绑定列表。
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
page | int | 否 | 页码,默认 1。 |
pageSize | int | 否 | 每页条数,默认 20,最大 100。 |
{
"statusCode": 100,
"msg": "获取成功",
"data": {
"total": 1,
"items": [
{
"id": "7e6c92f1-6a34-4f5c-8bcf-faf6db5132a8",
"thirdPartyUserId": "u_10001",
"thirdPartyUserName": "张三-外部账号",
"employeeVirtualId": "emp_T7dQ2mYk8rLp4cN1sVx3bH9wAe6fJuKz",
"createdAt": "2026-06-17T16:00:00+08:00",
"updatedAt": "2026-06-17T16:00:00+08:00"
}
]
}
}
GET
/api/openplatform/bindings/{id}
查询单个绑定详情,返回结构与绑定列表中的单条记录一致。
POST
/api/openplatform/bindings
新增或更新绑定关系。
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
thirdPartyUserId | string | 是 | 第三方系统用户唯一标识。 |
thirdPartyUserName | string | 否 | 第三方系统用户名。 |
employeeVirtualId | string | 是 | 当前 API Key 下员工的 virtualId。 |
{
"thirdPartyUserId": "u_10001",
"thirdPartyUserName": "张三-外部账号",
"employeeVirtualId": "emp_T7dQ2mYk8rLp4cN1sVx3bH9wAe6fJuKz"
}兼容性提示:
thirdPartyUserName 为空时建议直接省略或传 null;必填字段 thirdPartyUserId、employeeVirtualId 仍必须传有效字符串。
DELETE
/api/openplatform/bindings?thirdPartyUserId=u_10001
按第三方用户 ID 解绑。
{
"statusCode": 100,
"msg": "解绑成功",
"data": null
}