全额提取内推账户余额
通过账户 ID 全额提取内推账户下的积分/现金。全额提现后,内推人在飞书招聘系统中的积分/现金余额会变为 0,对应的积分/现金奖励状态也会变为「已发放」。
请求
| 项目 | 值 |
|---|---|
| HTTP URL | https://open.feishu.cn/open-apis/hire/v1/referral_account/:referral_account_id/withdraw |
| 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" |
路径参数
| 名称 | 类型 | 描述 |
|---|---|---|
referral_account_id | string | 账户 ID,通过注册内推账户生成 示例值:"6942778198054125570" |
请求体
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
withdraw_bonus_type | int\[\] | 是 | 提取的奖励类型 示例值:[1] 可选值有: - 1: 积分 - 2: 现金 |
external_order_id | string | 是 | 外部提取单 ID,由请求方提供,用于保证接口的幂等性,需要保证唯一。传入重复 ID 会返回原 ID 对应的提取详情 示例值:"6942778198054125570" |
请求体示例
json
{
"withdraw_bonus_type": [
1
],
"external_order_id": "6942778198054125570"
}响应
响应体
| 名称 | 类型 | 描述 |
|---|---|---|
code | int | 错误码,非 0 表示失败 |
msg | string | 错误描述 |
data | \- | - |
└ external_order_id | string | 提取单 ID |
└ trans_time | string | 交易时间,毫秒时间戳 |
└ withdrawal_details | bonus_amount | 提取详情 |
└ point_bonus | int | 提取的积分数量 |
└ cash_bonus | cash\[\] | 提取的现金奖励 |
└ currency_type | string | 币种,详情可查看:枚举常量介绍中「币种(currency)枚举定义」 |
└ amount | number(float) | 数额,保留到小数点后两位 |
响应体示例
json
{
"code": 0,
"msg": "SUCCESS",
"data": {
"external_order_id": "6942778198054125570",
"trans_time": "1683634459543",
"withdrawal_details": {
"point_bonus": 100,
"cash_bonus": [
{
"currency_type": "CNY",
"amount": 100
}
]
}
}
}错误码
| HTTP状态码 | 错误码 | 描述 | 排查建议 |
|---|---|---|---|
| 500 | 1002001 | 系统错误 | 请根据实际报错信息定位或咨询技术支持 |
| 400 | 1002002 | 参数错误 | 检查参数是否正确,例如类型,大小 |
| 400 | 1002553 | 账户不存在 | 请检查入参referral_account_id ,或注册内推账户 |
| 400 | 1002555 | 账户已停用 | 已停用账户无法提取余额,请参考停用内推账户 |
