收藏
回答

调用【创建代金券批次API】,返回:批次发放规则或核销规则有误,请修改后重试?

https://api.mch.weixin.qq.com/v3/marketing/favor/coupon-stocks

返回:{"code":"INVALID_REQUEST","message":"批次发放规则或核销规则有误,请修改后重试"}

请求参数:

{"available_begin_time":"2020-09-07T09:45:00.000+08:00","available_end_time":"2020-10-01T00:00:00.000+08:00","belong_merchant":"1575832071","coupon_use_rule":{"available_merchants":["1575832071"],"coupon_available_time":{"fix_available_time":{"available_week_day":[1,2,3,4,5,6,0],"begin_time":15422,"end_time":26942},"second_day_available":false},"fixed_normal_coupon":{"coupon_amount":1899,"transaction_minimum":1900}},"no_cash":true,"out_request_no":"15758320711599442961296","stock_name":"19","stock_type":"NORMAL","stock_use_rule":{"max_amount":36081,"max_coupons":19,"max_coupons_per_user":60,"natural_person_limit":true,"prevent_api_abuse":true}}

available_week_day字段只填1天的值就可以,比如[1]

如果传了多天[1,2,3,4,5,6,0]就报错


回答关注问题邀请回答
收藏

3 个回答

  • 张小巍
    张小巍
    2021-03-30

    {

    "stock_name": "测试",

    "comment": "商户活动",

    "belong_merchant": "1272107701",

    "available_begin_time": "2021-03-31T00:00:00.00+08:00",

    "available_end_time": "2021-03-31T00:00:00.00+08:00",

    "stock_use_rule": {

    "max_coupons": 1,

    "max_amount": 100,

    "max_amount_by_day": 100,

    "max_coupons_per_user": 1,

    "natural_person_limit": true,

    "prevent_api_abuse": true

    },

    "pattern_info": {

    "description": "123",

    "merchant_logo": "https://wxpaylogo.qpic.cn/wxpaylogo/PiajxSqBRaEIPAeia7Imvtsv8BpFsOPCzfsk7rIb0C8uZSUZcwXHibpVg/0",

    "background_color": "COLOR020",

    "merchant_name": "123",

    "coupon_image": "https://wxpaylogo.qpic.cn/wxpaylogo/PiajxSqBRaEIPAeia7Imvtsgr2Tibd2Pic5HSVxkHxgDbkEdA5WmNsZVFw/0"

    },

    "coupon_use_rule": {

    "available_merchants": ["1272107701"],

    "fixed_normal_coupon": {

    "coupon_amount": 100,

    "transaction_minimum": 100000

    }

    },

    "no_cash": false,

    "stock_type": "NORMAL",

    "out_request_no": "686202103301929986690"

    }


    和他一样的错误怎么解决

    2021-03-30
    有用
    回复 1
    • Zn
      Zn
      2021-06-20
      老哥,我遇到跟你一样的错误,,有解决的办法吗。。
      2021-06-20
      回复
  • 微信支付技术助手8
    微信支付技术助手8
    2020-09-07

    {

        "stock_name": "GD测批次4",

        "comment": "验证活动",

        "belong_merchant": "xxxxxx",

        "available_begin_time": "2020-02-13T18:00:00.120+08:00",

        "available_end_time": "2020-02-20T23:59:59.120+08:00",

        "stock_use_rule": {

            "max_coupons": 10,

            "max_amount": 100,

            "max_coupons_per_user": 10,

            "natural_person_limit": false,

            "prevent_api_abuse": false

        },

        "coupon_use_rule": {

            "fixed_normal_coupon": {

                "coupon_amount": 10,

                "transaction_minimum": 10

            },

            "available_merchants": [

                "209784532",

                "221003827"

            ]

        },

        "no_cash": false,

        "stock_type": "NORMAL",

        "out_request_no": "207662xxxxxx"

    }

    参考示例,按照这个写。

    2020-09-07
    有用
    回复 3
    • Y.
      Y.
      2020-09-08
      这个示例没有设置固定时间段可用,我想设置券可用时段内的每个周六日可以使用,available_week_day属性配置后就报错了
      2020-09-08
      回复
    • 微信支付技术助手8
      微信支付技术助手8
      2020-09-08回复Y.
      时间这一块不要传
      2020-09-08
      回复
    • 张小巍
      张小巍
      2021-03-30回复微信支付技术助手8
      2021-03-30
      回复
  • Y.
    Y.
    2020-09-07

    request-id:1oof4v

    2020-09-07
    有用
    回复
登录 后发表内容
问题标签