请求方式:GET
注:请求参数须区分大小写
String url = "https://openapi.dataoke.com/api/goods/get-half-price-day";
String appKey = "xxx";
String appSecret = "xxx";
String sessions = "xxx";
TreeMap<String, String> paraMap = new TreeMap<>();
paraMap.put("version", "v1.1.0");
paraMap.put("appKey", appKey);
paraMap.put("sessions", 08);
paraMap.put("page", 1);
paraMap.put("pageSize", 10);
String data = ApiClient.sendReq(url, appSecret, paraMap);
SDK调用示例
String appKey = "xxx";
String appSecret = "xxx";
DtkApiClient client = DtkApiClient.getInstance(appKey,appSecret);
DtkGetHalfPriceDayRequest request = new DtkGetHalfPriceDayRequest();
request.setSessions("08");
request.setPage("1");
request.setPageSize("10");
DtkApiResponse < DtkGetHalfPriceDayResponse > execute = client.execute(request);
id: 38657959, goodsId: "559262725678", title: "好巴食豆干素肉零食大礼包约45包网红休闲食品聚餐零食小吃1080g", dtitle: "【疯抢立减20】好巴食豆干素肉约45包*1080g", originalPrice: 29.9, actualPrice: 27.9, shopType: 1, monthSales: 10187, twoHoursSales: 39, dailySales: 56, commissionType: 3, commissionRate: 8.5, desc: "【疯抢立减20元+满2件59折!返卡3元!拍3件凑140-10单件到手低至22.4元】四川地道麻辣风味,居家,休闲,露天野炊必备零食大礼包~", couponReceiveNum: 0, couponTotalNum: 100000, couponRemainCount: 100000, couponLink: "https://uland.taobao.com/quan/detail?sellerId=725677994&activityId=5a94068354b940958896512730f7ffa9", couponId: "5a94068354b940958896512730f7ffa9", couponEndTime: "2022-07-03 23:59:59", couponStartTime: "2022-07-01 00:00:00", couponPrice: 2, couponConditions: "2.01", activityType: 3, activityStartTime: "2022-07-01 10:00:00", activityEndTime: "2022-07-04 08:59:59", shopName: "天猫超市", shopLevel: 20, descScore: 4.9, dsrScore: 4.88, dsrPercent: 0, shipScore: 4.89, shipPercent: 1.87, serviceScore: 4.89, servicePercent: 3.49, brand: 1, brandId: 7896274, brandName: "好巴食", hotPush: 0, teamName: "瀚海星拓电商", itemLink: "https://detail.tmall.com/item.htm?id=559262725678", quanMLink: 0, hzQuanOver: 0, yunfeixian: 0, estimateAmount: 0, freeshipRemoteDistrict: 1, discountType: 0, discountFull: 0, discountCut: 0, discounts: 0.93, marketGroup: [], activityInfo: [], inspectedGoods: 0, divisor: 1, mainPic: "https://img.alicdn.com/i4/6000000004899/O1CN01oun86M1m3mvoAePfp_!!6000000004899-0-at.jpg", marketingMainPic: "https://sr.ffquan.cn/dtk_www/20220628/catdbtil2gh7gptv54kg0.jpg", sellerId: "725677994", cid: 6, tbcid: 123256001, subcid: [], haitao: 0, tchaoshi: 1, lowest: 0, goldSellers: 0, video: "", createTime: "2022-07-01 11:11:04", specialText: [ "满2件59折" ], directCommissionType: 1, directCommission: 0, directCommissionLink: "", brandWenan: "", cpaRewardAmount: 0, previewStartTime: "2022-07-01 12:00:00", zlowest: "", zsFullMinusInfo: "", shopLogo: "//img.alicdn.com/imgextra//3b/e5/TB1yS0Xjmf2gK0jSZFPwu0sopXa.png", nineCid: 0 },
请求方式:GET
注:请求参数须区分大小写
String url = "https://openapi.dataoke.com/api/goods/get-half-price-day";
String appKey = "xxx";
String appSecret = "xxx";
String sessions = "xxx";
TreeMap<String, String> paraMap = new TreeMap<>();
paraMap.put("version", "v1.1.0");
paraMap.put("appKey", appKey);
paraMap.put("sessions", 08);
String data = ApiClient.sendReq(url, appSecret, paraMap);
SDK调用示例
String appKey = "xxx";
String appSecret = "xxx";
DtkApiClient client = DtkApiClient.getInstance(appKey,appSecret);
DtkGetHalfPriceDayRequest request = new DtkGetHalfPriceDayRequest();
request.setSessions("08");
DtkApiResponse < DtkGetHalfPriceDayResponse > execute = client.execute(request);
{
"time": 1603265188709,
"code": 0,
"msg": "成功",
"data": {
"halfPriceInfo": {
"banner": "https://img.alicdn.com/imgextra/i4/2053469401/O1CN01bxRFEY2JJhz5KNm0P_!!2053469401.png?v=662917",
"list": [
{
"top": 0,
"hdLeixing": 2,
"qiangNum": 50,
"updateTime": "2020-10-21T07:06:12.000+0000",
"id": 4033112,
"itemSoldNum": 36,
"todaySellNum": "0",
"itemId": "626222897152",
"name": "荣事达取暖器电暖风机家用立式",
"picUrl": "https://gju2.alicdn.com/tps/i3/O1CN013uPewK29SHILluP7s_!!0-juitemmedia.jpg",
"price": 499.00,
"yijuhua": "前2小时限50件",
"preferential": "拍下半价",
"couponAmount": 0.000,
"startTime": "2020-10-21T00:00:00.000+0000",
"activityId": 10002441045631,
"restCount": 14,
"serverTime": "2020-10-21T07:26:27.000+0000",
"tmall": 1,
"activityType": 1,
"useQuan": -1,
"isMamaQuan": 0
},
{
"top": 0,
"hdLeixing": 2,
"qiangNum": 100,
"updateTime": "2020-10-21T07:06:22.000+0000",
"id": 4033115,
"itemSoldNum": 568,
"todaySellNum": "0",
"itemId": "598557767778",
"name": "3包装诗帛洗脸巾",
"picUrl": "https://gju2.alicdn.com/tps/i1/2200717325263/O1CN01bovg4i1okV3JcsNI4_!!0-item_pic.jpg",
"price": 18.80,
"yijuhua": "前2小时限100件",
"preferential": "拍下半价",
"couponAmount": 2.000,
"startTime": "2020-10-21T00:00:00.000+0000",
"activityId": 10002422098923,
"restCount": 0,
"serverTime": "2020-10-21T07:26:27.000+0000",
"tmall": 1,
"activityType": 1,
"useQuan": -1,
"isMamaQuan": 1
},
{
"top": 0,
"hdLeixing": 2,
"qiangNum": 150,
"updateTime": "2020-10-21T07:06:14.000+0000",
"id": 4033118,
"itemSoldNum": 137,
"todaySellNum": "0",
"itemId": "627941372651",
"name": "网红老爹鞋女ins潮2020爆款超",
"picUrl": "https://gju2.alicdn.com/tps/i3/O1CN01HwSylO2GJIqI4bT4c_!!0-juitemmedia.jpg",
"price": 118.00,
"yijuhua": "前2小时限150件",
"preferential": "拍下半价",
"couponAmount": 20.000,
"startTime": "2020-10-21T00:00:00.000+0000",
"activityId": 10002427067926,
"restCount": 13,
"serverTime": "2020-10-21T07:26:27.000+0000",
"tmall": 1,
"activityType": 1,
"useQuan": -1,
"isMamaQuan": 1
},
{
"top": 0,
"hdLeixing": 2,
"qiangNum": 150,
"updateTime": "2020-10-21T02:00:00.000+0000",
"id": 4033119,
"itemSoldNum": 50,
"todaySellNum": "0",
"itemId": "627127874518",
"name": "荣事达电煮锅宿舍学生电热锅",
"picUrl": "https://gju1.alicdn.com/tps/i4/O1CN01RJAafB2EbxkX1crfu_!!0-juitemmedia.jpg",
"price": 99.90,
"yijuhua": "前2小时限150件",
"preferential": "拍下半价",
"couponAmount": 5.000,
"startTime": "2020-10-21T00:00:00.000+0000",
"activityId": 10002429710472,
"restCount": 100,
"serverTime": "2020-10-21T07:26:27.000+0000",
"tmall": 1,
"activityType": 1,
"useQuan": 0,
"isMamaQuan": 1
},
{
"top": 0,
"hdLeixing": 2,
"qiangNum": 350,
"updateTime": "2020-10-21T07:06:15.000+0000",
"id": 4033114,
"itemSoldNum": 367,
"todaySellNum": "0",
"itemId": "625027498623",
"name": "2瓶共1000克滴露抑菌洗手液",
"picUrl": "https://gju3.alicdn.com/tps/i1/2207895997260/O1CN01sAPgSi23V83rqtbfi_!!0-item_pic.jpg",
"price": 24.90,
"yijuhua": "前2小时限350件",
"preferential": "拍下半价",
"couponAmount": 3.000,
"startTime": "2020-10-21T00:00:00.000+0000",
"activityId": 10002445027397,
"restCount": 0,
"serverTime": "2020-10-21T07:26:27.000+0000",
"tmall": 1,
"activityType": 1,
"useQuan": -1,
"isMamaQuan": 1
}
]
},
"sessionsList": [
{
"hpdTime": "00",
"status": "0"
},
{
"hpdTime": "08",
"status": "0"
},
{
"hpdTime": "10",
"status": "0"
},
{
"hpdTime": "11",
"status": "0"
},
{
"hpdTime": "12",
"status": "0"
},
{
"hpdTime": "13",
"status": "0"
},
{
"hpdTime": "15",
"status": "1"
},
{
"hpdTime": "19",
"status": "2"
},
{
"hpdTime": "21",
"status": "2"
},
{
"hpdTime": "00",
"status": "2"
}
]
}
}
{
"msg":"服务器错误",
"code":-1,
"time":1554365022200
}