码迷,mamicode.com
首页 > 微信 > 详细

最近i学习微信卡券中的会员卡功能,弄清楚不容易 ,分享一下。

时间:2018-03-07 21:46:37      阅读:2808      评论:0      收藏:0      [点我收藏+]

标签:target   lan   reduce   推送   use   ips   http   not   resource   

创建会员卡接口

https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1451025283 【4.1 创建会员卡接口】

{
  "card": {
    "card_type": "MEMBER_CARD",
    "member_card": {
      "background_pic_url": "",
      "base_info": {
        "logo_url": "http://mmbiz.qpic.cn/mmbiz/iaL1LJM1mF9aRKPZ/0",
        "brand_name": "VIP会员卡",
        "code_type": "CODE_TYPE_ONLY_BARCODE",
        "is_pay_and_qrcode": true,
        "title": "会员卡",
        "color": "Color010",
        "notice": "使用时向服务员出示此券",
        "service_phone": "15167008326",
        "description": "不可与其他优惠同享",
        "date_info": {
          "type": "DATE_TYPE_PERMANENT"
        },
        "sku": {
          "quantity": 50000000
        },
        "get_limit": 3,
        "use_custom_code": true,
        "can_give_friend": true,
        "need_push_on_view": true
      },
      "supply_bonus": false,
      "supply_balance": false,
      "prerogative": "会员特权说明",
      "activate_url": "http://www.qq.com",
      "discount": 10
      //"auto_activate": true,
      //"center_title": "立即使用    ",
      //"center_sub_title": "center_sub_title",
      //"center_url": "center_url",
      //"custom_url_name": "",
      //"custom_url": "",
      //"custom_url_sub_title": "",
      //"custom_field1": {
      //  "name_type": "FIELD_NAME_TYPE_LEVEL",
      //  "name": "会员中心",
      //  "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
      //},
    }
  }
}

 

 

更改会员卡信息接口

https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1466494654_K9rNz【8.2 更改会员卡信息接口】

 

{
  "card_id": "pq9q5jp0E0cZkwYHzch-j1mz-USE",
  "member_card": {
    "base_info": {
      "title": "微信会员卡",
      "notice": "请出示二维码",
      "code_type": "CODE_TYPE_ONLY_BARCODE",
      "is_pay_and_qrcode": true,
      "pay_info": {
        "swipe_card": {
          "is_swipe_card": true
        }
      },
      "center_title": "立即使用    ",
      "center_sub_title": "center_sub_title",
      "center_url": "center_url",
      "custom_url_name": "",
      "custom_url": "",
      "custom_url_sub_title": "",
      "promotion_url_name": "",
      "promotion_url": "",
      "promotion_url_sub_title": ""
    },
    "custom_cell1": {
      "name": "",
      "tips": "",
      "url": ""
    }
} 
}

 

 

激活会员卡接口

https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1451025283 【6.1 接口激活】

 

可参考会员卡推送事件

https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1451025274【2.7 进入会员卡事件推送】

{
    "membership_number": "15167008326",
    "code": "2392583481",
    "card_id": "pq9q5jsBze5RNKjCANwvPMqSlLCs",
    "background_pic_url": "https://mmbiz.qlogo.cn/mmbiz/0?wx_fmt=jpeg",
    "init_custom_field_value1": "xxxxx"
}

 

最近i学习微信卡券中的会员卡功能,弄清楚不容易 ,分享一下。

标签:target   lan   reduce   推送   use   ips   http   not   resource   

原文地址:https://www.cnblogs.com/wujiangling/p/8524966.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!