开发者社区> 扬朋> 正文

koubei.marketing.data.indicator.query(口碑商户经营数据查询接口)JAVA版本demo

简介: 说明:        经营报表产品是官方提供的一套标准接口,开发者通过此接口包可以获取商家的经营指标及商家会员的消费习惯洞察,同时接口支撑实时指标查询,口碑商户经营数据查询接口(koubei.marketing.data.indicator.query)可获取商户经营指标,包含会员发展、交易现状、活动评估。
+关注继续查看

说明: 
       经营报表产品是官方提供的一套标准接口,开发者通过此接口包可以获取商家的经营指标及商家会员的消费习惯洞察,同时接口支撑实时指标查询,口碑商户经营数据查询接口(koubei.marketing.data.indicator.query)可获取商户经营指标,包含会员发展、交易现状、活动评估。此接口支撑实时指标查询 

接口请求示例: 

//koubei.marketing.data.indicator.query(口碑商户经营数据查询接口)public  static void DataIndicator_Query(){    AlipayClient   alipayClient=alipayclient();    KoubeiMarketingDataIndicatorQueryRequest request = new KoubeiMarketingDataIndicatorQueryRequest();    request.setBizContent("{" +    "\"begin_date\":\"20180101\"," +    "\"end_date\":\"20180315\"," +    "\"page_num\":\"1\"," +    "\"page_size\":\"20\"," +    "\"biz_type\":\"MemberQuery\"" +    "  }");    KoubeiMarketingDataIndicatorQueryResponse 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("调用失败");    }}

接口同步返回示例: 

{    "koubei_marketing_data_indicator_query_response": {        "code": "10000",        "msg": "Success",        "indicator_infos": "[{\"biz_date\":\"20180315\",\"today_campaign_new_user_cnt\":\"0\",\"today_new_user_cnt\":\"0\"},{\"biz_date\":\"20180314\",\"today_campaign_new_user_cnt\":\"0\",\"trade_cnt_ge_twice_user_cnt\":\"323\",\"total_user_cnt\":\"467\",\"total_trade_user_cnt\":\"467\",\"today_new_user_cnt\":\"2\"},{\"biz_date\":\"20180313\",\"today_campaign_new_user_cnt\":\"0\",\"trade_cnt_ge_twice_user_cnt\":\"322\",\"total_user_cnt\":\"465\",\"total_trade_user_cnt\":\"465\",\"today_new_user_cnt\":\"1\"},{\"biz_date\":\"20180312\",\"today_campaign_new_user_cnt\":\"0\",\"trade_cnt_ge_twice_user_cnt\":\"322\",\"total_user_cnt\":\"464\",\"total_trade_user_cnt\":\"464\",\"today_new_user_cnt\":\"2\"},{\"biz_date\":\"20180311\",\"today_campaign_new_user_cnt\":\"0\",\"trade_cnt_ge_twice_user_cnt\":\"321\",\"total_user_cnt\":\"462\",\"total_trade_user_cnt\":\"462\",\"today_new_user_cnt\":\"1\"},{\"biz_date\":\"20180310\",\"today_campaign_new_user_cnt\":\"0\",\"trade_cnt_ge_twice_user_cnt\":\"320\",\"total_user_cnt\":\"461\",\"total_trade_user_cnt\":\"461\",\"today_new_user_cnt\":\"1\"},{\"biz_date\":\"20180309\",\"today_campaign_new_user_cnt\":\"0\",\"trade_cnt_ge_twice_user_cnt\":\"320\",\"total_user_cnt\":\"460\",\"total_trade_user_cnt\":\"460\",\"today_new_user_cnt\":\"1\"},{\"biz_date\":\"20180308\",\"today_campaign_new_user_cnt\":\"0\",\"trade_cnt_ge_twice_user_cnt\":\"320\",\"total_user_cnt\":\"459\",\"total_trade_user_cnt\":\"459\",\"today_new_user_cnt\":\"1\"},{\"biz_date\":\"20180307\",\"today_campaign_new_user_cnt\":\"0\",\"trade_cnt_ge_twice_user_cnt\":\"319\",\"total_user_cnt\":\"458\",\"total_trade_user_cnt\":\"458\",\"today_new_user_cnt\":\"0\"},{\"biz_date\":\"20180306\",\"today_campaign_new_user_cnt\":\"0\",\"trade_cnt_ge_twice_user_cnt\":\"318\",\"total_user_cnt\":\"458\",\"total_trade_user_cnt\":\"458\",\"today_new_user_cnt\":\"1\"},{\"biz_date\":\"20180305\",\"today_campaign_new_user_cnt\":\"0\",\"trade_cnt_ge_twice_user_cnt\":\"317\",\"total_user_cnt\":\"457\",\"total_trade_user_cnt\":\"457\",\"today_new_user_cnt\":\"0\"},{\"biz_date\":\"20180304\",\"today_campaign_new_user_cnt\":\"0\",\"trade_cnt_ge_twice_user_cnt\":\"317\",\"total_user_cnt\":\"457\",\"total_trade_user_cnt\":\"457\",\"today_new_user_cnt\":\"0\"},{\"biz_date\":\"20180303\",\"today_campaign_new_user_cnt\":\"0\",\"trade_cnt_ge_twice_user_cnt\":\"317\",\"total_user_cnt\":\"457\",\"total_trade_user_cnt\":\"457\",\"today_new_user_cnt\":\"0\"},{\"biz_date\":\"20180302\",\"today_campaign_new_user_cnt\":\"0\",\"trade_cnt_ge_twice_user_cnt\":\"317\",\"total_user_cnt\":\"457\",\"total_trade_user_cnt\":\"457\",\"today_new_user_cnt\":\"0\"},{\"biz_date\":\"20180301\",\"today_campaign_new_user_cnt\":\"0\",\"trade_cnt_ge_twice_user_cnt\":\"317\",\"total_user_cnt\":\"457\",\"total_trade_user_cnt\":\"457\",\"today_new_user_cnt\":\"2\"},{\"biz_date\":\"20180228\",\"today_campaign_new_user_cnt\":\"0\",\"trade_cnt_ge_twice_user_cnt\":\"317\",\"total_user_cnt\":\"455\",\"total_trade_user_cnt\":\"455\",\"today_new_user_cnt\":\"0\"},{\"biz_date\":\"20180227\",\"today_campaign_new_user_cnt\":\"0\",\"trade_cnt_ge_twice_user_cnt\":\"317\",\"total_user_cnt\":\"455\",\"total_trade_user_cnt\":\"455\",\"today_new_user_cnt\":\"1\"},{\"biz_date\":\"20180226\",\"today_campaign_new_user_cnt\":\"0\",\"trade_cnt_ge_twice_user_cnt\":\"317\",\"total_user_cnt\":\"454\",\"total_trade_user_cnt\":\"454\",\"today_new_user_cnt\":\"2\"},{\"biz_date\":\"20180225\",\"today_campaign_new_user_cnt\":\"0\",\"trade_cnt_ge_twice_user_cnt\":\"315\",\"total_user_cnt\":\"452\",\"total_trade_user_cnt\":\"452\",\"today_new_user_cnt\":\"0\"},{\"biz_date\":\"20180224\",\"today_campaign_new_user_cnt\":\"0\",\"trade_cnt_ge_twice_user_cnt\":\"315\",\"total_user_cnt\":\"452\",\"total_trade_user_cnt\":\"452\",\"today_new_user_cnt\":\"0\"}]",        "total_size": "74"    },    "sign": "IQ7f8WZLVT8xnSD01RzUFCjcOjFpx9ZiNjLu6B5PGaVfFxB4h6XFXJf5vugisOoH25s9JbXaAIQDnLtoS4+yiGGHqwh2cFCWSEAi7OyBH2dVqTo77SuvagS55iR2o//vbR7z+6rSLlbYT+lN4eG/6DLRkDwid+cUsCH3bSg0Ulo="}

注意点: 
1.该接口参数中主要是biz_type值的传参的不同,所查询出来的数据也有所不同,具体的分析类型如下(通过参数biz_type区分): 
①MemberQuery 商户会员数据查询 
②MemberQueryByStore 门店会员数据查询 
③TradeQuery 商户交易数据查询 
④TradeQueryByStore 门店交易数据查询 
⑤CampaignQuery 商户活动数据查询 
⑥CampaignQueryByStore 门店活动数据查询 
⑦ConponsQuery 商户券数据查询 
⑧ConponsQueryByStore 门店券数据查询 
2.接口同步返回信息中的indicator_infos,每个对象表示一个门店某个具体日期的指标信息,KEY为指标代码,VALUE为该指标对应的值,各biz_type入参以及返回值的详细信息参见【快速接入】 


报错提供信息: 
appid+接口名+调用接口时间,最好将本次请求的完整参数一并发过来 

如果大家在测试过程中遇到问题欢迎在帖子下方追问,请按照标准方式提问

版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。

相关文章
自然框架的源代码、Demo、数据库、配置信息管理程序下载(2011.1.7更新)
自然框架在线演示:http://demo.naturefw.com/ 目前在线演示不开放管理员账号。   自然框架的网站已经基本完成,下载就转到网站里面了,http://www.naturefw.com/down/List1.aspx 请到这里下载。
834 0
ML之FE:对爬取的某平台二手房数据进行数据分析以及特征工程处理(二)
ML之FE:对爬取的某平台二手房数据进行数据分析以及特征工程处理
47 0
云端数据仓库的模式选型与建设
数据仓库是否也需要上云?如果考虑上云,都需要注意哪些方面?目前主流云厂商产品又有何特点呢?本文将一一解答。
3103 0
+关注
扬朋
支付宝小程序开发者运营专家
516
文章
69
问答
来源圈子
更多
文章排行榜
最热
最新
相关电子书
更多
JS零基础入门教程(上册)
立即下载
性能优化方法论
立即下载
手把手学习日志服务SLS,云启实验室实战指南
立即下载