https://developers.weixin.qq.com/doc/store/shop/API/coupon/api_getcouponlist.htmlhttps://developers.weixin.qq.com/doc/store/shop/API/coupon/api_getcouponlist.htmlhttps://developers.weixin.qq.com/doc/oplatform/developers/dev/appid.html
POST https://api.weixin.qq.com/channels/ec/coupon/get_list?access_token=ACCESS_TOKEN
微信小店查询优惠券id列表的接口,请求后只能获取到type枚举为2的信息,我想获取所有类型的优惠券

def get_id_list(access_token): id_list = [] page = 1 page_ctx = '' while True: params_data = { "status": 2, "page": page, "page_size": 100, "page_ctx": page_ctx } url = f'https://api.weixin.qq.com/channels/ec/coupon/get_list?access_token={access_token}' response = requests.post(url,json=params_data) print(response.json()) if response.json()['coupons'] == []: break id_list += response.json()['coupons'] page += 1 page_ctx = response.json()['page_ctx'] return id_list亲测通过列表API获取type=2以外的类型 ,看下是否已经获取了全部的券id?,或者自己拿个类型其他的券id,通过获取券详情调用下。
https://developers.weixin.qq.com/doc/store/shop/API/coupon/api_getcouponlist.html