API 名称:小商店创建优惠券
API 文档:https://developers.weixin.qq.com/doc/ministore/minishopopencomponent/API/coupon/create_coupon.html
请求参数:
{
"type": 4,
"coupon_info": {
"name": "5元直减券",
"discount_info": {
"discount_condition": {
"product_ids": [
28438968
]
},
"discount_fee": 500
},
"ext_info": {
"jump_product_id": 28438968,
"notes": "测试拉拉",
"valid_time": 1618570716,
"invalid_time": 1621162716
},
"promote_info": {
"customize_channel": "测试",
"promote_type": 2
},
"receive_info": {
"start_time": 1618570716,
"end_time": 1621162716,
"limit_num_one_person": 1,
"total_num": 1
},
"valid_info": {
"valid_type": 0,
"start_time": 1618570716,
"end_time": 1621162716
}
}
}
返回结果:
{ errcode: 109110, errmsg: ' rid: 60796ddd-6f1dcb88-7530e175' }
已经解决了,把 coupon_info 字段去掉,里面的内容往外提一层就可以了。
PS:商店这块API有两个文档,分别在小程序的交易组件和小商店的服务端 API,小商店这块的文档是不对的。。。