【单券-全场-满减券】API请求示例

更新时间:2025.12.02
||
curl
Java
Go

 

1## 场景2: 单券-全场-满减券 (usage_mode=SINGLE, scope=ALL, type=NORMAL)
2
3```bash
4curl -X POST \
5  https://api.mch.weixin.qq.com/v3/marketing/partner/product-coupon/product-coupons \
6  -H "Authorization: WECHATPAY2-SHA256-RSA2048 mchid=\"服务商商户号\",..." \
7  -H "Accept: application/json" \
8  -H "Content-Type: application/json" \
9  -d '{
10    "out_request_no": "SINGLE_ALL_NORMAL_20250101_002", # 必填,创建请求单号
11    "brand_id": "120344", # 必填,品牌ID
12    "scope": "ALL", # 必填,优惠范围:ALL=全场券
13    "type": "NORMAL", # 必填,商品券类型:NORMAL=满减券
14    "usage_mode": "SINGLE", # 必填,使用模式:SINGLE=单券模式
15    
16    "single_usage_info": { # 当usage_mode=SINGLE且scope=ALL时,在此配置优惠规则
17      "normal_coupon": { # 当type=NORMAL且scope=ALL时必填,满减券使用规则
18        "threshold": 10000, # 必填,门槛金额,单位为分,满100元可用填10000
19        "discount_amount": 1500 # 必填,固定减免金额,单位为分,减15元填1500
20      }
21    },
22    
23    "display_info": { # 必填,商品券展示信息
24      "name": "全场满100减15", # 必填,商品券名称
25      "image_url": "https://wxpaylogo.qpic.cn/wxpaylogo/xxxxx/xxx", # 必填,商品图片URL
26      "background_url": "https://wxpaylogo.qpic.cn/wxpaylogo/xxxxx/xxx", # 必填,背景图URL
27      "detail_image_url_list": [ # 选填,详情图URL列表
28        "https://wxpaylogo.qpic.cn/wxpaylogo/xxxxx/xxx"
29      ]
30    },
31    
32    "out_product_no": "Product_SINGLE_002", # 选填,外部商品ID
33    
34    "stock": { # 必填,批次信息
35      "remark": "8月工作日有效批次", # 选填,备注
36      "coupon_code_mode": "WECHATPAY", # 必填,券Code分配模式
37      
38      "stock_send_rule": { # 必填,发放规则
39        "max_count": 10000000, # 必填,总发放次数上限
40        "max_count_per_day": 100000, # 选填,每日发放上限
41        "max_count_per_user": 1 # 必填,每用户领取上限
42      },
43      
44      "single_usage_rule": { # 当usage_mode=SINGLE时必填,单券使用规则
45        "coupon_available_period": { # 必填,券可核销时间
46          "available_begin_time": "2025-08-01T00:00:00+08:00", # 必填,开始时间
47          "available_end_time": "2025-08-31T23:59:59+08:00", # 必填,结束时间
48          "available_days": 30, # 选填,生效后N天有效
49          "wait_days_after_receive": 0, # 选填,领取后N天生效
50          "weekly_available_period": { # 选填,每周可用时间
51            "day_list": ["MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY"] # 当配置weekly_available_period时必填
52          },
53          "irregular_available_period_list": [ # 选填,无规律可用时间段
54            {
55              "begin_time": "2025-08-15T00:00:00+08:00", # 当配置此列表时必填
56              "end_time": "2025-08-15T23:59:59+08:00" # 当配置此列表时必填
57            }
58          ]
59        }
60        # 注意:scope=ALL时,优惠规则在single_usage_info中配置,此处不配置normal_coupon
61      },
62      
63      "usage_rule_display_info": { # 必填,使用规则展示信息
64        "coupon_usage_method_list": ["OFFLINE", "MINI_PROGRAM", "PAYMENT_CODE"], # 必填,使用方式
65        "mini_program_appid": "wx1234567890", # 当coupon_usage_method_list包含MINI_PROGRAM时必填
66        "mini_program_path": "/pages/index/product", # 当coupon_usage_method_list包含MINI_PROGRAM时必填
67        "usage_description": "工作日可用", # 必填,使用说明
68        "coupon_available_store_info": { # 选填,可用门店信息
69          "description": "所有门店可用", # 当配置此对象时必填
70          "mini_program_appid": "wx1234567890", # 选填
71          "mini_program_path": "/pages/index/store-list" # 选填
72        }
73      },
74      
75      "coupon_display_info": { # 必填,用户券展示信息
76        "code_display_mode": "QRCODE", # 必填,Code展示模式
77        "background_color": "Color010", # 选填,背景颜色
78        "entrance_mini_program": { # 选填,小程序入口
79          "appid": "wx1234567890", # 当配置此对象时必填
80          "path": "/pages/index/product", # 当配置此对象时必填
81          "entrance_wording": "欢迎选购", # 当配置此对象时必填
82          "guidance_wording": "获取更多优惠" # 当配置此对象时必填
83        },
84        "entrance_official_account": { # 选填,公众号入口
85          "appid": "wx1234567890" # 当配置此对象时必填
86        },
87        "entrance_finder": { # 选填,视频号入口
88          "finder_id": "gh_12345678", # 当配置此对象时必填
89          "finder_video_id": "UDFsdf24df34dD456Hdf34", # 当配置此对象时必填
90          "finder_video_cover_image_url": "https://wxpaylogo.qpic.cn/wxpaylogo/xxxxx/xxx" # 当配置此对象时必填
91        }
92      },
93      
94      "notify_config": { # 必填,事件通知配置
95        "notify_appid": "wx4fd12345678" # 必填
96      },
97      
98      "store_scope": "NONE" # 必填,可用门店范围
99    }
100  }'
101```

 

 

 

元宝AI
反馈
目录
置顶