请求方式:GET
注:请求参数须区分大小写
String url = "https://openapi.dataoke.com/api/dels/taobao/kit/coupon/get-coupon-info";
String appKey = "xxx";
String appSecret = "xxx";
TreeMap<String, String> paraMap = new TreeMap<>();
paraMap.put("version", "v1.0.0");
paraMap.put("content", 12);
String data = ApiClient.sendReq(url, appSecret, paraMap);
SDK调用示例
String appKey = "xxx";
String appSecret = "xxx";
DtkApiClient client = DtkApiClient.getInstance(appKey,appSecret);
DtkCouponQueryRequest request = new DtkCouponQueryRequest();
request.setVersion("v1.0.0");
request.setContent("https://detail.tmall.com/item.htm?spm=a230r.1.14.4.3b014bb1PkrElh&id=630464637415&cm_id=140105335569ed55e27b&abbucket=13"); //√
DtkApiResponse < DtkCouponQueryResponse > execute = client.execute(request);
{
"requestId": "2b9ed72ef6844429909c0edbf748e7a2",
"time": 1611284342959,
"code": 0,
"msg": "成功",
"data": {
"couponId": "271dbf9d1f7c498eb8f19ae3cc38f5de",
"couponAmount": 40,
"couponTotalNum": 100000,
"couponReceiveNum": 7000,
"couponRemainNum": 93000,
"couponConditions": "59",
"couponStartTime": "2021-01-21",
"couponEndTime": "2021-01-23",
"couponLink": "https://uland.taobao.com/quan/detail?sellerId=752847099&activityId=271dbf9d1f7c498eb8f19ae3cc38f5de"
}
}
[{"id":1,"code":"-1","desc":"服务器错误","faq":"稍后尝试访问","pid":-1},{"id":1,"code":"1","desc":"参数错误","faq":"请根据msg提示信息进行修改","pid":-1}]