# 优惠券核销信息添加/更新
开发之前请创建腾讯数据接入数据源 (dataSourceId),可将 dataSourceId 理解为数据的集合。创建一个数据仓库后,所有接口传输数据时都可重复使用。
# 请求地址
域名/data-api/v1/order/coupon/consume
# 请求方法
POST
# 请求参数
参数名 | 样例 | 描述 |
---|---|---|
app_id | abc | 分配的app_id |
nonce | 61794670f155b | 随机字符串 |
sign | sha256 | 签名算法 |
timestamp | 1569232087 | 请求时间戳(秒级) |
signature | aee30792812d7b09ba7d3aa67c24e16c6a7ea81282ac728ad5966dd1b3eef6d5 | 签名结果 |
# 请求体类型
application/json
# 请求体参数
名称 | 类型 | 必填 | 描述 |
---|---|---|---|
dataSourceId | string | Y | 数据源id(create方法返回的data.dataSource.id) |
coupons | array | Y | 卡券列表列表,数组,最大长度 50 |
external_coupon_id | string | Y | 卡券批次ID,一批次的卡券会产生多个卡券ID |
coupon_code | string | Y | 卡券ID |
external_order_id | string | 卡券被核销的订单id,字段长度最小1字节,长度最大128字节 | |
consume_time | string | C | 优惠券核销时间,时间戳,毫秒 |
user | object | Y | 领取卡券的用户信息 |
miniprogram_appid | string | C | 微信小程序 appid,当落地页为微信小程序时必填 |
open_id | string | C | 微信小程序 open_id,当落地页为微信小程序时必填 |
qb_account_info | string | C | qq浏览器用户标识,例 5dd6ddffe1440, 接入qq浏览器业务必填 |
chan_id_hj | string | C | 用户标识,例 63_5a23p4ded6ff6384,接入惠聚-发现福利业务必填 |
# 请求体示例
{
"dataSourceId": "101",
"coupons": [
{
"external_coupon_id": "10000001",
"coupon_code": "10000001000002",
"external_order_id": "34452222",
"user": {
"miniprogram_appid": "wxxxxxxxxxxxxxx3",
"open_id": "ovxxxxxxxxxxxxxxxxxxx"
}
}
]
}
# 应答体结构
名称 | 类型 | 描述 |
---|---|---|
retcode | integer | 返回码 |
errmsg | string | 错误信息 |
data | json object | 响应内容 |
# 应答示例
{
"retcode": 0,
"errmsg": "",
"data": {}
}
← 用户领券信息添加/变更 上报页面访问 →