注册内推账户
通过内推人的手机号或邮箱注册「内推奖励账户」。注册后,可通过查询内推账户接口获取内推账户 ID、积分余额、现金余额等,可通过「全额提取内推账号余额」接口提取账户余额,可通过启动内推账户、「停用内推账户」接口启/停用账户。
请求
| 项目 | 值 |
|---|---|
| HTTP URL | https://open.feishu.cn/open-apis/hire/v1/referral_account |
| HTTP Method | POST |
| 接口频率限制 | 100 次/分钟 |
| 支持的应用类型 | custom,isv |
| 权限要求 调用该 API 所需的权限。开启其中任意一项权限即可调用 | hire:referral_account 更新内推账号信息 |
请求头
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| Authorization | string | 是 | tenant_access_token 值格式:"Bearer access_token" 示例值:"Bearer t-7f1bcd13fc57d46bac21793a18e560" 了解更多:如何选择与获取 access token |
| Content-Type | string | 是 | 固定值:"application/json; charset=utf-8" |
请求体
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
mobile | mobile | 否 | 电话,该参数与 email 参数必传一个 |
└ code | string | 否 | 电话国际区号,遵守国际统一标准,请参考百度百科-国际长途电话区号 示例值:"86" |
└ number | string | 否 | 手机号码,在传 mobile 参数的情况下必传 示例值:"18900001111" |
email | string | 否 | 邮箱,该参数与 mobile 参数必传一个 示例值:"hire@open.com" |
请求体示例
json
{
"mobile": {
"code": "86",
"number": "18900001111"
},
"email": "hire@open.com"
}响应
响应体
| 名称 | 类型 | 描述 |
|---|---|---|
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: 停用 |
响应体示例
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
}
}
}错误码
| HTTP状态码 | 错误码 | 描述 | 排查建议 |
|---|---|---|---|
| 500 | 1002001 | 系统错误 | 请根据实际报错信息定位或咨询技术支持 |
| 400 | 1002002 | 参数错误 | 请根据实际报错信息定位或咨询技术支持 |
| 400 | 1002551 | 用户不存在 | 请使用正确的员工邮箱或手机号进行注册 |
| 400 | 1002552 | 无法匹配唯一用户 | 请检查员工手机或邮箱是否重复。 |
