子管理充值-v2
子管理为广告主充值接口。
权限说明
使用子管理充值功能,应用可选择agent权限或sub_agent权限

请求地址
https://openapi.aiclk.com/openapi/v1/charge/sub-agent-v2
所属权限
sub_agent
请求方式
POST
请求参数
| 字段名 | 类型 | 是否必须 | 描述 |
|---|---|---|---|
| account_id | int | 是 | 授权账户ID |
Post body(json)
json体是一个列表结构,列表中的每一个元素结构如下:
| 字段名 | 类型 | 是否必须 | 描述 |
|---|---|---|---|
| sub_agent_user | uint64 | 是 | 子管理ID |
| target_user | uint64 | 是 | 广告主账号ID |
| money | int32 | 是 | 充值金额,单位分,为负时业务逻辑为扣款 |
| comment | string | 否 | 备注 |
Body 示例
{"sub_agent_user":1000003,"target_user":1000003,"money":10000,"comment":""}
请求示例
curl --location 'https://openapi.aiclk.com/openapi/v1/charge/sub-agent-v2?account_id=1000003' \
--header 'Content-Type: application/json' \
--header 'OGW_ACCESS_TOKEN: your_access_token' \
--data '{"sub_agent_user":1000003,"target_user":1000003,"money":10000,"comment":""}'
成功返回示例
{
"code": 200,
"data": null,
"message": "success",
"trace_id": "5ea90f84c5ec8c7f"
}
失败返回示例
{
"code": 400,
"data": null,
"message": "账户余额不足",
"trace_id": "51e3db63b922cc8d"
}