收藏
回答

【求助】https://api.weixin.qq.com/card/create 提示缺少字段?

【错误信息】:错误代码:41011, 错误信息:missing required fields! please check document and request json! hint: [bv5WYa0085r269],微信原始报文:{"errcode":41011,"errmsg":"missing required fields! please check document and request json! hint: [bv5WYa0085r269]"}

根据开发文档https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/Create_a_Coupon_Voucher_or_Card.html#9

检查了参数,必填的参数都传了,请问还缺什么参数?

请求参数👇

{

    "card": {
        "card_type": "DISCOUNT",
        "discount": {
            "discount": 100,
            "base_info": {
                "logo_url": "http://mmbiz.qpic.cn/mmbiz_png/iah3dHsB0jbIjscngI2t26cnqdNzEDmXkIicAGEWK65jCtjh8F5XibCuuicF85zKkWiatqB3yJDuBTicDdbXqxfAfsMA/0",
                "code_type": "CODE_TYPE_NONE",
                "is_pay_and_qrcode": false,
                "brand_name": "夏夜",
                "title": "123",
                "color": "Color070",
                "notice": "请转到点餐小程序中使用",
                "description": "21",
                "sku": {
                    "quantity": 100000000
                },
                "date_info": {
                    "type": "DATE_TYPE_FIX_TIME_RANGE",
                    "begin_timestamp": 1572796800,
                    "end_timestamp": 1573315200,
                    "fixed_term": 0,
                    "fixed_begin_term": 0
                },
                "use_custom_code": false,
                "bind_openid": false,
                "service_phone": "13677777777",
                "use_all_locations": true,
                "get_limit": 1,
                "can_share": false,
                "can_give_friend": true,
                "need_push_on_view": false,
                "center_app_brand_user_name": "gh_b3f879f6c6c7@App",
                "center_app_brand_pass": "pages/menu/index"
            },
            "advanced_info": {
                "use_condition": {
                    "accept_category": "[1]",
                    "reject_category": "茶位费",
                    "can_use_with_other_discount": false
                },
                "abstract": {
                    "abstract": "查看优惠详情",
                    "icon_url_list": "http://mmbiz.qpic.cn/mmbiz_jpg/iah3dHsB0jbIjscngI2t26cnqdNzEDmXkxBNPZeyaibdX6w9dDuRJ0pbGWNSTUe5IkaltykPu4NdlrGK6F31ehicg/0"
                },
                "text_image_list": [
                    {
                        "image_url": "http://mmbiz.qpic.cn/mmbiz_jpg/iah3dHsB0jbIjscngI2t26cnqdNzEDmXkxBNPZeyaibdX6w9dDuRJ0pbGWNSTUe5IkaltykPu4NdlrGK6F31ehicg/0",
                        "text": "21"
                    }
                ]
            }
        }
    }
}


最后一次编辑于  2019-11-05
回答关注问题邀请回答
收藏

1 个回答

  • Snail
    Snail
    2019-11-05

    原来是discount值不合法,那就提示illegal或invalid,missing是什么情况??!!

    2019-11-05
    赞同
    回复
登录 后发表内容
问题标签