说明:
该接口主要用于查询已创建的会员卡模板参数详细信息,官方接口文档请点击【会员卡模板查询接口】
创建模板接口参考该贴:[url]https://openclub.alipay.com/read.php?tid=1577&fid=71[/url]
修改模板接口参考该贴:[url]https://openclub.alipay.com/read.php?tid=4503&fid=71[/url]
代码调用示例:
//alipay.marketing.card.template.query (会员卡模板查询接口) public static void template_query(){ AlipayClient alipayClient=alipayclient(); AlipayMarketingCardTemplateQueryRequest request = new AlipayMarketingCardTemplateQueryRequest(); request.setBizContent("{" + "\"template_id\":\"20180131000000000782698000300330\"" + " }"); AlipayMarketingCardTemplateQueryResponse response = null; try { response = alipayClient.execute(request); System.out.println(response.getBody()); } catch (AlipayApiException e) { // TODO Auto-generated catch block e.printStackTrace(); } if(response.isSuccess()){ System.out.println("调用成功"); } else { System.out.println("调用失败"); } }
接口同步返回:
{"alipay_marketing_card_template_query_response":{"code":"10000","msg":"Success","biz_no_prefix":"prex","biz_no_suffix_len":"10","card_type":"OUT_MEMBER_CARD","column_info_list":[{"code":"BENEFIT_INFO","more_info":{"descs":["会员生日7折"],"params":"{}","title":"会员专享权益001","url":"http:\/\/www.baidu.com"},"operate_type":"openNative","title":"会员专享","value":"190"}],"field_rule_list":[{"field_name":"Balance","rule_name":"ASSIGN_FROM_REQUEST","rule_value":"Balance"}],"shop_ids":["2016083000077000000018269663"],"template_benefit_info":[{"benefit_desc":["消费即折扣"],"end_date":"2022-08-03 12:12:12","start_date":"2016-07-18 15:17:23","title":"消费即折扣"}],"template_style_info":{"background_id":"1T8Pp00AT7eo9NoAJkMR3AAAACMAAQEC","bg_color":"rgb(255,255,0)","brand_name":"可乐","card_show_name":"颠覆白的黑模板修改","color":"rgb(255,0,0)","feature_descriptions":["测试修改展示"],"logo_id":"1T8Pp00AT7eo9NoAJkMR3AAAACMAAQEC","slogan":"测试测试测试","slogan_img_id":"1T8Pp00AT7eo9NoAJkMR3AAAACMAAQEC"}},"sign":"ciqt+SPyNbSuqhn1MWA2fvvqgl5ZGW9yTwK2b37es4q7GrdaZQWYNmpVLJuuPqysv049OTDSbIh21NJ6TMvWXIMhFs7+VAnna9iBOxMscqT3Mag18/YFDnTRTiYVGVEBQ6S+wUX2YbsHETGO7DlWBU4v80RC0xqIjCpRlg/fPdk="}
注意点:
1.template_id值为创建模板接口返回值,可参考我上面对应的帖子
2.该接口比较简单,有坑请回帖^_^
报错提供信息:
appid+接口名+调用接口时间,最好将本次请求的完整参数一并发过来
如果大家在测试过程中遇到问题欢迎在帖子下方追问,请按照标准方式提问