1、设置会员卡支持动态二维码功能
"use_dynamic_code":true
结果:动态码生成
2、根据动态码查询真实会员卡信息
失败:
{
"errcode": 40056,
"errmsg": "invalid serial code hint: [UDKR301659034]"
}
对应入参:
{
"code": "163652150534672204",
"is_expire_dynamic_code":false
}
对应card_id:pnuEE0mRMCPfzvCh_K5YL8Z3yi0k
测试环境:沙箱账号,接口测试
创建卡券入参(就是开发文档上的参数示例):
{ "card" : { "card_type" : "MEMBER_CARD" , "member_card" : { "background_pic_url" : "https://mmbiz.qlogo.cn/mmbiz/" , "base_info" : { "logo_url" : "http://mmbiz.qpic.cn/mmbiz/iaL1LJM1mF9aRKPZ/0" , "brand_name" : "会员卡测试" , "code_type" : "CODE_TYPE_ONLY_QRCODE" , "title" : "测试会员卡" , "color" : "Color010" , "notice" : "使用时向服务员出示此券" , "service_phone" : "020-88888888" , "description" : "不可与其他优惠同享" , "date_info" : { "type" : "DATE_TYPE_PERMANENT" }, "sku" : { "quantity" : 80 }, "get_limit" : 3 , "use_custom_code" : true , "use_dynamic_code" : true , "can_give_friend" : true , "location_id_list" : [ 123 , 12321 ], "custom_url_name" : "立即使用" , "custom_url" : "http://weixin.qq.com" , "custom_url_sub_title" : "6个汉字tips" , "promotion_url_name" : "营销入口1" , "promotion_url" : "http://www.qq.com" , "need_push_on_view" : true }, "advanced_info" : { "use_condition" : { "accept_category" : "鞋类" , "reject_category" : "阿迪达斯" , "can_use_with_other_discount" : true }, "abstract" : { "abstract" : "微信餐厅推出多种新季菜品,期待您的光临" , "icon_url_list" : [ "http: //mmbiz.qpic.cn/mmbiz/p98FjXy8LacgHxp3sJ3vn97bGLz0ib0Sfz1bjiaoOYA027iasqSG0sj piby4vce3AtaPu6cIhBHkt6IjlkY9YnDsfw/ 0 " ] }, "text_image_list" : [ { "image_url" : "http://mmbiz.qpic.cn/mmbiz/p98FjXy8LacgHxp3sJ3vn97bGLz0ib0Sfz1bjiaoOYA027iasqSG0sjpiby4vce3AtaPu6cIhBHkt6IjlkY9YnDsfw/0" , "text" : "此菜品精选食材,以独特的烹饪方法,最大程度地刺激食 客的味蕾" }, { "image_url" : "http://mmbiz.qpic.cn/mmbiz/p98FjXy8LacgHxp3sJ3vn97bGLz0ib0Sfz1bjiaoOYA027iasqSG0sj piby4vce3AtaPu6cIhBHkt6IjlkY9YnDsfw/0" , "text" : "此菜品迎合大众口味,老少皆宜,营养均衡" } ], "time_limit" : [ { "type" : "MONDAY" , "begin_hour" : 0 , "end_hour" : 10 , "begin_minute" : 10 , "end_minute" : 59 }, { "type" : "HOLIDAY" } ], "business_service" : [ "BIZ_SERVICE_FREE_WIFI" , "BIZ_SERVICE_WITH_PET" , "BIZ_SERVICE_FREE_PARK" , "BIZ_SERVICE_DELIVER" ] }, "supply_bonus" : false , "supply_balance" : true , "prerogative" : "test_prerogative" , "auto_activate" : true , "custom_field1" : { "name_type" : "FIELD_NAME_TYPE_LEVEL" , "url" : "http://www.qq.com" }, "activate_url" : "http://www.qq.com" , "custom_cell1" : { "name" : "使用入口2" , "tips" : "激活后显示" , "url" : "http://www.xxx.com" }, "bonus_rule" : { "cost_money_unit" : 100 , "increase_bonus" : 1 , "max_increase_bonus" : 200 , "init_increase_bonus" : 10 , "cost_bonus_unit" : 5 , "reduce_money" : 100 , "least_money_to_use_bonus" : 1000 , "max_reduce_bonus" : 50 }, "discount" : 10 } } } |
在创建会员卡中搜索"use_custom _code"(你没看错,的确有空格)。