POST Coupon/CreateCouponStock
创建一个商家券批次
请求信息
请求URI参数
无
请求数据参数
微信券创建信息
MerchantCouponStockInfo| 名称 | 说明 | 类型 | 扩展说明 |
|---|---|---|---|
| coupon_name |
微信券名称 |
字符串 |
无 |
| coupon_type |
1:商家券 2:代金券 3:优惠券组合 |
整数 |
无 |
| discount_type |
礼券折扣类型 NORMAL:固定面额满减券 DISCOUNT:折扣券 EXCHANGE:换购券 |
字符串 |
无 |
| stock_id |
微信券批次号 |
字符串 |
无 |
| creator |
批次创建商户号 |
字符串 |
无 |
| merchant_brand |
归属微信券编码(连锁商户号) |
字符串 |
无 |
| merchant_creator |
创建微信券的商户号 |
字符串 |
无 |
| comment |
微信券备注 |
字符串 |
无 |
| start_datetime |
可用开始时间 |
字符串 |
无 |
| end_datetime |
可用结束时间 |
字符串 |
无 |
| effective_day |
生效天数 |
整数 |
无 |
| orig_sale_start_datetime |
原始可售开始时间,不受区间设置影响 |
字符串 |
无 |
| orig_sale_end_datetime |
原始可售结束时间,不受区间设置影响 |
字符串 |
无 |
| sale_start_datetime |
当前可售开始时间 |
字符串 |
无 |
| sale_end_datetime |
当前可售结束时间 |
字符串 |
无 |
| sale_time_info |
销售时间段,用于区间循环上下架 |
字符串 |
无 |
| effective_time |
适用时间 |
字符串 |
无 |
| coupon_type_name |
礼券类型名称(废弃) |
字符串 |
无 |
| discount_type_name |
礼券折扣类型说明 |
字符串 |
无 |
| mini_amount |
最低消费金额即消费门槛,整数,单位为分 |
整数 |
无 |
| app_id |
发券小程序APPID |
字符串 |
无 |
| discount |
这个数值根据coupon_type,如果是"NORMAL"则为"优惠金额","DISCOUNT"为"折扣比例","EXCHANGE"为"单品换购价",价格和金额单位为分,折扣为整数 |
整数 |
无 |
| item_names |
适用商品 |
字符串 |
无 |
| goods_list |
适用商品清单列表 |
Collection of Goods |
无 |
| store_names |
适用门店中文 |
字符串 |
无 |
| store_list |
适用门店ID |
Collection of 字符串 |
无 |
| description |
礼券使用信息 |
字符串 |
无 |
| logo_img_url |
礼券logo的图片 |
字符串 |
无 |
| back_color |
背景颜色 |
字符串 |
无 |
| total_num |
总的张数 |
整数 |
无 |
| person_num |
个人最大领用张数 0 表示没有限制 |
整数 |
无 |
| can_sale_num |
当前可领用张数 |
整数 |
无 |
| reason |
如果当前可领用张数为零即不能领用,这里是不能领用的原因 |
字符串 |
无 |
| day_num |
当日最大领用张数 0 表示没有限制 |
整数 |
无 |
| person_day_num |
用户单日最大领用张数 0 表示没有限制 |
整数 |
无 |
| group_buy |
微信券的拼购数量,值大于等于2才参与拼购,否则表示不参与拼购,正常销售 |
整数 |
无 |
| group_buy_finished |
当前查询用户微信券的已经完成的拼购数量,为0表示没有参与拼购 |
整数 |
无 |
| sell_price |
领用价格 整数,单位为分 |
整数 |
无 |
| saled_num |
已经销售张数,如果支付了未领券也算销售张数 |
整数 |
无 |
| send_num |
已经领用张数 |
整数 |
无 |
| used_num |
已经核销张数 |
整数 |
无 |
| code_mode |
卡号模式 |
字符串 |
无 |
| show_area |
礼券展示区域 0:橱窗区 1:特价区 2:普通区 |
整数 |
无 |
| coupon_img_url |
礼券对应的图片 |
字符串 |
无 |
| show_img_url |
礼券对应的普通区的图片 340*340 |
字符串 |
无 |
| topshow_img_url |
礼券对应的橱窗区的图片 690*400 |
字符串 |
无 |
| qr_img_url |
对应的领用二维码图片地址 |
字符串 |
无 |
| pay_stock_list |
对应的支付券批次ID清单,用于一次购买多个券号的情况 |
Collection of 字符串 |
无 |
| group_item_list |
对于券组合,这里是组合里面的券的信息 |
Collection of MerchantCouponStockGroupItemInfo |
无 |
| pay_price |
对应的支付券价格,即优惠金额,整数,单位为分 |
整数 |
无 |
| app_show |
是否上架 |
整数 |
无 |
| auto_app_show |
是否自动上架 |
布尔 |
无 |
| auto_app_show_pretime |
提早多少分钟自动上架 |
整数 |
无 |
| group_buy_list |
当前请求用户参加此优惠券的拼购信息,若未传入OpenID则为空 |
Collection of MerchantCouponGroupBuyInfo |
无 |
| status |
批次状态 unactivated:未激活 (代金券专有) audit:审核中 (代金券专有) running:运行中 stoped:已停止 paused:暂停发放 (代金券专有) |
字符串 |
无 |
| coupon_data |
创建该礼券的数据,只有获取单张礼券详情才会展示,获取礼券列表的时候该属性会被忽略 |
MerchantCouponStockDataInfo |
无 |
请求数据格式
application/json, text/json
{
"coupon_name": "sample string 1",
"coupon_type": 2,
"discount_type": "sample string 3",
"stock_id": "sample string 4",
"creator": "sample string 5",
"merchant_brand": "sample string 6",
"merchant_creator": "sample string 7",
"comment": "sample string 8",
"start_datetime": "sample string 9",
"end_datetime": "sample string 10",
"effective_day": 11,
"orig_sale_start_datetime": "sample string 12",
"orig_sale_end_datetime": "sample string 13",
"sale_start_datetime": "sample string 14",
"sale_end_datetime": "sample string 15",
"sale_time_info": "sample string 16",
"effective_time": "sample string 17",
"coupon_type_name": "sample string 18",
"discount_type_name": "sample string 19",
"mini_amount": 20,
"app_id": "sample string 21",
"discount": 22,
"item_names": "sample string 23",
"goods_list": [
{
"goods_no": "sample string 1",
"goods_name": "sample string 2",
"quantity": 3,
"expandlist": [
{
"expand_name": "sample string 1",
"expand_value": "sample string 2"
},
{
"expand_name": "sample string 1",
"expand_value": "sample string 2"
}
]
},
{
"goods_no": "sample string 1",
"goods_name": "sample string 2",
"quantity": 3,
"expandlist": [
{
"expand_name": "sample string 1",
"expand_value": "sample string 2"
},
{
"expand_name": "sample string 1",
"expand_value": "sample string 2"
}
]
}
],
"store_names": "sample string 24",
"store_list": [
"sample string 1",
"sample string 2"
],
"description": "sample string 25",
"logo_img_url": "sample string 26",
"back_color": "sample string 27",
"total_num": 28,
"person_num": 29,
"can_sale_num": 30,
"reason": "sample string 31",
"day_num": 32,
"person_day_num": 33,
"group_buy": 34,
"group_buy_finished": 35,
"sell_price": 36,
"saled_num": 37,
"send_num": 38,
"used_num": 39,
"code_mode": "sample string 40",
"show_area": 41,
"coupon_img_url": "sample string 42",
"show_img_url": "sample string 43",
"topshow_img_url": "sample string 44",
"qr_img_url": "sample string 45",
"pay_stock_list": [
"sample string 1",
"sample string 2"
],
"group_item_list": [
{
"stock_id": "sample string 1",
"coupon_name": "sample string 2",
"coupon_type": 3,
"quantity": 4
},
{
"stock_id": "sample string 1",
"coupon_name": "sample string 2",
"coupon_type": 3,
"quantity": 4
}
],
"pay_price": 46,
"app_show": 47,
"auto_app_show": true,
"auto_app_show_pretime": 49,
"group_buy_list": [
{
"group_buy_order_no": "sample string 1",
"order_time": "sample string 2",
"openid": "sample string 3",
"nickname": "sample string 4",
"headimgurl": "sample string 5",
"stock_id": "sample string 6"
},
{
"group_buy_order_no": "sample string 1",
"order_time": "sample string 2",
"openid": "sample string 3",
"nickname": "sample string 4",
"headimgurl": "sample string 5",
"stock_id": "sample string 6"
}
],
"status": "sample string 50",
"coupon_data": {
"stock_name": "sample string 1",
"belong_merchant": "sample string 2",
"comment": "sample string 3",
"goods_name": "sample string 4",
"stock_type": "sample string 5",
"coupon_use_rule": {
"coupon_available_time": {
"available_begin_time": "sample string 1",
"available_end_time": "sample string 2",
"available_day_after_receive": 3,
"available_week": {
"week_day": [
1,
2
],
"available_day_time": [
{
"begin_time": 1,
"end_time": 2
},
{
"begin_time": 1,
"end_time": 2
}
]
},
"irregulary_avaliable_time": {
"begin_time": 1,
"end_time": 2
},
"wait_days_after_receive": 4
},
"fixed_normal_coupon": {
"discount_amount": 1,
"transaction_minimum": 2
},
"discount_coupon": {
"discount_percent": 1,
"transaction_minimum": 2
},
"exchange_coupon": {
"exchange_price": 1,
"transaction_minimum": 2
},
"use_method": "sample string 1",
"mini_programs_appid": "sample string 2",
"mini_programs_path": "sample string 3"
},
"stock_send_rule": {
"max_coupons": 1,
"max_coupons_per_user": 2,
"max_coupons_by_day": 3,
"natural_person_limit": true,
"prevent_api_abuse": true
},
"out_request_no": "sample string 6",
"custom_entrance": {
"mini_programs_info": {
"mini_programs_appid": "sample string 1",
"mini_programs_path": "sample string 2",
"entrance_words": "sample string 3",
"guiding_words": "sample string 4"
},
"appid": "sample string 1",
"hall_id": "sample string 2",
"store_id": "sample string 3",
"code_display_mode": "sample string 4"
},
"display_pattern_info": {
"description": "sample string 1",
"merchant_logo_url": "sample string 2",
"merchant_name": "sample string 3",
"background_color": "sample string 4",
"coupon_image_url": "sample string 5"
},
"coupon_code_mode": "sample string 7",
"notify_config": {
"notify_appid": "sample string 1"
}
}
}
响应数据
资源说明
ResultInfoOfString| 名称 | 说明 | 类型 | 扩展说明 |
|---|---|---|---|
| code | ResultCode |
无 |
|
| msg | 字符串 |
无 |
|
| data | 字符串 |
无 |
响应数据格式
application/json, text/json
{
"code": "SUCCESS",
"msg": "sample string 1",
"data": "sample string 2"
}