跳转至

子管理充值优惠券

子管理为广告主充值优惠券接口。

权限说明

使用子管理充值功能,应用必须选择sub_agent权限

image-8e0f0577-9e1e-4d4b-ad63-e824280a43e1

请求地址

https://openapi.aiclk.com/openapi/v1/charge/sub-agent-coupon

所属权限

sub_agent

请求方式

POST

请求参数

字段名 类型 是否必须 描述
account_id int 子管理ID

Post body(json)

json体是一个列表结构,列表中的每一个元素结构如下:

字段名 类型 是否必须 描述
target_user uint64 广告主账号ID
coupon int32 充值优惠券金额,单位分,为负时业务逻辑为扣款
comment string 备注

Body 示例

{"target_user":1000003,"coupon":10000,"comment":""}

请求示例

curl --location 'https://openapi.aiclk.com/openapi/v1/charge/sub-agent-coupon?account_id=1000003' \
--header 'Content-Type: application/json' \
--header 'OGW_ACCESS_TOKEN: your_access_token' \
--data '{"target_user":1000003,"coupon":10000,"comment":""}'

成功返回示例

{
  "code": 200,
  "data": null,
  "message": "success",
  "trace_id": "5ea90f84c5ec8c7f"
}

失败返回示例

{
  "code": 400,
  "data": null,
  "message": "账户余额不足",
  "trace_id": "51e3db63b922cc8d"
}