请求方式:GET
注:请求参数须区分大小写
String url = "https://openapi.dataoke.com/api/dels/taobao/kit/create-tlj";
String appKey = "xxx";
String appSecret = "xxx";
TreeMap<String, String> paraMap = new TreeMap<>();
paraMap.put("version", "v1.0.0");
paraMap.put("alimamaAppKey", "xxxx");
paraMap.put("alimamaAppSecret", "xxxx");
paraMap.put("itemId", "xxxx");
paraMap.put("name", "xxxx");
paraMap.put("campaignType", "xxxx");
paraMap.put("perFace", 1);
paraMap.put("totalNum", 1);
paraMap.put("winNumLimit", 1);
paraMap.put("sendStartTime", "2020-12-30 12:00:00");
paraMap.put("sendEndTime", "2020-12-30");
paraMap.put("useEndTimeMode", 1);
paraMap.put("useStartTime", "xxxx");
paraMap.put("userEndTime", "xxxx");
paraMap.put("securityLevel", 1);
paraMap.put("securitySwitch", 1);
paraMap.put("pid", "xxxx");
String data = ApiClient.sendReq(url, appSecret, paraMap);
SDK调用示例
String appKey = "xxx";
String appSecret = "xxx";
DtkApiClient client = DtkApiClient.getInstance(appKey,appSecret);
DtkTbCashGiftRequest request = new DtkTbCashGiftRequest();
request.setVersion("v1.0.0");
request.setAlimamaAppKey("https://survey.taobao.com/apps/zhiliao/BQ2RPRlpU");
request.setAlimamaAppSecret("xxxx");
request.setName("xxx");
request.setItemId("xxx_1");
request.setPerFace("10.00");
request.setTotalNum(1);
request.setWinNumLimit(1);
request.setSendStartTime("2021-07-15 16:00:00");
request.setSendEndTime("2021-07-15 16:40:00");
request.setPid("mm_27399943_1915200219_110990500489");
request.setCampaignType(1);
request.setUseEndTimeMode("1");
request.setUseStartTime("3");
request.setUserEndTime("3");
DtkApiResponse < DtkTbCashGiftResponse > execute = client.execute(request);
{
"requestId": "aebc263a6c61435aa674a083a8e19703",
"time": 1609300259661,
"code": 0,
"msg": "成功",
"data": {
"rightsId": "YdZGbHSRRV0L%2BobGZwG2WczTPWDIp1%2Bz",
"sendUrl": "https://uland.taobao.com/taolijin/edetail?vegasCode=9A24PX2K&type=qtz&union_lens=lensId%3A212c3a2a_1434_176b1c52acb_7195%3Btraffic_flag%3Dlm",
"tpwd": "5¥IBoOcITuOy6¥/",
"longTpwd": "53.0¥IBoOcITuOy6¥钉开Τao宝或點҉击҉链节 https://m.tb.cn/h.4SfjxPX 至浏łan器【點击“打开”查看并浏览页面详情,精选商品任您选购】/"
}
}
{
msg: "服务器错误",
code: -1,
time: 1554365022200
}