查询内推账户
根据账户 ID 查询内推账户信息。
请求
| 项目 | 值 |
|---|---|
| HTTP URL | https://open.feishu.cn/open-apis/hire/v1/referral_account/get_account_assets |
| HTTP Method | GET |
| 接口频率限制 | 10 次/秒 |
| 支持的应用类型 | custom,isv |
| 权限要求 调用该 API 所需的权限。开启其中任意一项权限即可调用 开启任一权限即可 | hire:referral_account 更新内推账号信息 hire:referral_account:readonly 获取内推账户信息 |
| 字段权限要求 | > Tip: 该接口返回体中存在下列敏感字段,仅当开启对应的权限后才会返回;如果无需获取这些字段,则不建议申请 contact:user.employee_id:readonly 获取用户 user ID hire:employee.email:readonly 查看员工邮箱 hire:employee.mobile:readonly 查看员工手机号 |
请求头
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| Authorization | string | 是 | tenant_access_token 值格式:"Bearer access_token" 示例值:"Bearer t-7f1bcd13fc57d46bac21793a18e560" 了解更多:如何选择与获取 access token |
查询参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
referral_account_id | string | 是 | 账户 ID,注册账户后获取:注册内推账户 示例值:6942778198054125570 |
user_id_type | string | 否 | 用户 ID 类型 示例值:open_id 可选值有: - open_id: 标识一个用户在某个应用中的身份。同一个用户在不同应用中的 Open ID 不同。了解更多:如何获取 Open ID - union_id: 标识一个用户在某个应用开发商下的身份。同一用户在同一开发商下的应用中的 Union ID 是相同的,在不同开发商下的应用中的 Union ID 是不同的。通过 Union ID,应用开发商可以把同个用户在多个应用中的身份关联起来。了解更多:如何获取 Union ID? - user_id: 标识一个用户在某个租户内的身份。同一个用户在租户 A 和租户 B 内的 User ID 是不同的。在同一个租户内,一个用户的 User ID 在所有应用(包括商店应用)中都保持一致。User ID 主要用于在不同的应用间打通用户数据。了解更多:如何获取 User ID?默认值: open_id当值为 user_id,字段权限要求: contact:user.employee_id:readonly 获取用户 user ID |
响应
响应体
| 名称 | 类型 | 描述 |
|---|---|---|
code | int | 错误码,非 0 表示失败 |
msg | string | 错误描述 |
data | \- | - |
└ account | account | 账户信息 |
└ account_id | string | 账户 ID |
└ assets | assets | 账户资产 |
└ confirmed_bonus | bonus_amount | 已确认的奖励 |
└ point_bonus | int | 积分奖励 |
└ cash_bonus | cash\[\] | 现金奖励 |
└ currency_type | string | 币种,详情可查看:枚举常量介绍中「币种(currency)枚举定义」 |
└ amount | number(float) | 数额,保留到小数点后两位 |
└ status | int | 账户状态 可选值有: - 1: 可用 - 2: 停用 |
└ referrer | account_referrer | 账户绑定的内推人信息 |
└ id | string | 内推人 ID,与入参user_id_type类型一致 |
└ name | i18n | 内推人名称 |
└ zh_cn | string | 内推人中文名称 |
└ en_us | string | 内推人英文名称 |
└ email | string | 内推人邮箱 字段权限要求: hire:employee.email:readonly 查看员工邮箱 |
└ mobile | string | 内推人手机 字段权限要求: hire:employee.mobile:readonly 查看员工手机号 |
响应体示例
json
{
"code": 0,
"msg": "SUCCESS",
"data": {
"account": {
"account_id": "6942778198054125570",
"assets": {
"confirmed_bonus": {
"point_bonus": 100,
"cash_bonus": [
{
"currency_type": "CNY",
"amount": 100
}
]
}
},
"status": 1,
"referrer": {
"id": "7413952589321914668",
"name": {
"zh_cn": "张三",
"en_us": "zhangSan"
},
"email": "27188272xxxx1.com",
"mobile": "1879087xxx8"
}
}
}
}错误码
| HTTP状态码 | 错误码 | 描述 | 排查建议 |
|---|---|---|---|
| 500 | 1002001 | 系统错误 | 请根据实际报错信息定位或咨询技术支持 |
| 400 | 1002002 | 参数错误 | 请根据实际报错信息定位或咨询技术支持 |
| 400 | 1002553 | 账户不存在 | 请注册内推账户:注册内推账户 |
