授权成员权益
该接口用于为成员或用户发放权益与金币,在资源充足前提下完成授权配置。
接口调用
说明
| 接口描述 | 给团队下的坐席成员或用户授权相关权益及金币数 可授权角色: 1.团队成员需为坐席成员。 2.普通C端用户 授权前提:团队存在相关的权益和金币数未过期及数量充足 该接口按照具体的业务而定是否需要调用,如统一走平台的则不需要调用该接口进行授权 |
|---|---|
| 请求域名 | https://ai-user-api.jbangai.com |
| 接口地址 | /api/open/ai/v1/user/equity/gift |
| 请求方式 | POST |
| 权限校验 | 是 |
提交参数
Header请求头
| 参数 | 类型 | 是否必传 | 参数说明 |
|---|---|---|---|
| Access-Token | string | 是 | 从 获取令牌 中获取到对应的参数值accessToken,详情请查看文档 |
Body请求体
| 参数 | 子参数 | 类型 | 是否必传 | 参数说明 |
|---|---|---|---|---|
| points | — | string | 否 | 金币数 |
| targetList | giveTimes | int | 否 | 授权次数 |
| targetId | string | 否 | 机器人id/guid | |
| targetType | object | 否 | 目标类型:bot | |
| userList | sourceId | string | 否 | 接入方系统用户ID |
| type | string | 否 | user 代表用户,sys_user代表员工 |
请求示例
curl --location --request POST 'https://ai-user-api.jbangai.com/api/open/ai/v1/user/equity/gift' \
--header 'Access-Token: eyJhbGciOiJIUzUxMiJ9...' \
--header 'Content-Type: application/json' \
--header 'Accept: */*' \
--header 'Host: ai-user-api.jbangai.com' \
--header 'Connection: keep-alive' \
--data-raw '{
"points": 20,
"targetList": [
{
"giveTimes": "1",
"targetId": "1y6p0w4x8l",
"targetType": "bot"
},
{
"giveTimes": "1",
"targetId": "18b7rnr6j0",
"targetType": "bot"
}
],
"userList": [
{
"sourceId": "41",
"type": "sys_user"
},
{
"sourceId": "42",
"type": "sys_user"
}
]
}'
返回参数
| 参数 | 类型 | 说明 |
|---|---|---|
| code | string | 响应编码 |
| message | string | 返回提示信息 |
| serverTime | string | 当前时间戳 |
响应示例
{
"code": 0,
"message": "操作成功",
"serverTime": 1745723490
}