代理商充值优惠券
代理商为子管理充值优惠券接口。
权限说明
使用代理商充值功能,应用必须选择agent权限

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