# 使用userid刷新员工数据

接口说明:通过user_id刷新员工的数据

请求方式:POST

请求地址:https://$basehost/gateway/qopen/GetStaffByWwUserId

body参数

{
    "ww_user_id": "员工ww_user_id",
    "robot_id": "机器人id",
}
字段 类型 必填 说明
ww_user_id string 员工ww_user_id
robot_id string 机器人id

返回值:

{
    "data": {
        "serial_no": "请求序列号"
    },
    "errmsg": "",
    "errcode": 0,
    "hint": ""
}

返回说明

字段 类型 说明
errcode int 状态码,0为正常,非0代表错误
errmsg string 错误信息
hint string 请求日志ID

处理结果,异步返回值:

{
    "data": {
        "avatar": "https://wework.qpic.cn/wwpic/7jkdjflkdaslfadsi/0",
        "name": "成员名称",
        "open_id": "accxUmi9hSXU4681FEjHEym",
        "ww_user_id": "ceshi001"
    },
    "err_code": 0,
    "err_msg": "success",
    "event_type": 20004,
    "hint": "KMxCoasL3RhSF3QQ6SQA.MOF0kh.1752488991",
    "robot_id": "accsvQ1yOXP95Hdwk2MLA0I",
    "serial_no": "0657e1bbb3ce434c921b6e4013c96fd5"
}

说明

字段 类型 说明
event_type int 事件类型,40029
err_code int 状态码,0为正常,非0代表错误
err_msg string 错误信息
serial_no string 请求序列号
robot_id string 发送请求的机器人id
mobile string 好友的手机号

完整请求示例:

curl -X POST \
  https://$basehost/gateway/qopen/RefreshCompanyContactByUserId \
  -H 'Content-Type: application/json; charset=UTF-8' \
  -H 'Token: c2NdxDHKXIJ5j1zrhJeq2eJEHjh9xxx' \
  -d '{
    "ww_user_id": "员工ww_user_id",
    "robot_id": "机器人id"
}'
最后更新时间: 2025/7/14 18:32:57