请求方式:GET
注:请求参数须区分大小写
String url = "https://openapi.dataoke.com/api/goods/get-goods-list";
String appKey = "xxx";
String appSecret = "xxx";
TreeMap<String, String> paraMap = new TreeMap<>();
paraMap.put("version", "v1.2.4");
paraMap.put("appKey", appKey);
paraMap.put("pageId", "1");
String data = ApiClient.sendReq(url, appSecret, paraMap);
SDK调用示例
String appKey = "xxx";
String appSecret = "xxx";
DtkApiClient client = DtkApiClient.getInstance(appKey,appSecret);
DtkGoodsListRequest request = new DtkGoodsListRequest();
request.setPageId("10");
request.setPageSize(100);
request.setCids("1,2,3");
request.setSort("0");
request.setSubcid(1);
request.setSpecialId(1);
request.setJuHuaSuan(1);
request.setTaoQiangGou(0);
request.setTmall(1);
request.setTchaoshi(1);
request.setGoldSeller(1);
request.setHaitao(1);
request.setPre(1);
request.setPreSale(0);
request.setBrand(0);
request.setBrandIds("296748800");
request.setPriceLowerLimit(BigDecimal.ONE);
request.setPriceUpperLimit(BigDecimal.TEN);
request.setCouponPriceLowerLimit(BigDecimal.ONE);
request.setCommissionRateLowerLimit(BigDecimal.ONE);
request.setMonthSalesLowerLimit(BigDecimal.ONE);
request.setFreeshipRemoteDistrict(1);
request.setDirectCommissionType(0);
request.setChoice(1);
DtkApiResponse < DtkPageResponse < DtkGoodsListItemResponse >> execute = client.execute(request);
{
"status": 200,
"data": {
"requestId": "5cb7f39b72b8aaafdd417c78b4a7ec32",
"time": 1608686317276,
"code": 0,
"msg": "成功",
"data": {
"list": [{
"id": 31227470,
"goodsId": "618271344990",
"title": "【主播力荐】咔啰卡曼日式法芙饼干网红零食蛋黄煎饼儿童营养代餐",
"dtitle": "【拍5发6包 】咔啰卡曼日式法芙饼",
"originalPrice": 22.9,
"actualPrice": 12.9,
"shopType": 1,
"goldSellers": 0,
"monthSales": 68348,
"twoHoursSales": 6,
"dailySales": 23,
"commissionType": 3,
"desc": "【拍5件到手6袋】咔啰卡曼网红法芙饼,华夫饼,双面烘烤,蛋香味浓郁,松脆味美,特别解馋!健康美味,小朋友超爱的零食,吃货宝宝千万不能错过哦~",
"couponReceiveNum": 10,
"couponLink": "https://uland.taobao.com/quan/detail?sellerId=2206903000361&activityId=f6443ce6754543ff9e27f6ac28f5875d",
"couponEndTime": "2020-12-25 23:59:59",
"couponStartTime": "2020-12-23 00:00:00",
"couponPrice": 10,
"couponConditions": "27",
"activityType": 1,
"createTime": "2020-12-22 19:24:08",
"mainPic": "//img.alicdn.com/imgextra/i3/2206903000361/O1CN01ktv7DZ1EXNZewua5k_!!2206903000361.jpg",
"marketingMainPic": "https://sr.ffquan.cn/dtk_user_fd/20201210/bv8uhmaulrgf6phupue00.jpg",
"sellerId": "2206903000361",
"brandWenan": "",
"cid": 6,
"discounts": 0.56,
"commissionRate": 40.03,
"couponTotalNum": 100000,
"haitao": 0,
"activityStartTime": "",
"activityEndTime": "",
"shopName": "咔啰卡曼食品旗舰店",
"shopLevel": 15,
"descScore": 4.8,
"brand": 0,
"brandId": 2631338729,
"brandName": "",
"hotPush": 0,
"teamName": "超级飞侠_速推客",
"itemLink": "https://detail.tmall.com/item.htm?id=618271344990",
"tchaoshi": 0,
"dsrScore": 4.83,
"dsrPercent": 0.82,
"shipScore": 4.86,
"shipPercent": 8.68,
"serviceScore": 4.85,
"servicePercent": 7.48,
"subcid": [90318],
"quanMLink": 0,
"hzQuanOver": 0,
"yunfeixian": 1,
"estimateAmount": 0,
"shopLogo": "https://img.alicdn.com/imgextra//a1/a0/TB1p14FseH2gK0jSZJnSuuT1FXa.jpg",
"specialText": ["拍5件到手6袋"],
"freeshipRemoteDistrict": 0,
"video": "https://cloud.video.taobao.com/play/u/2206903000361/p/2/e/6/t/1/264844940154.mp4?appKey=38829",
"directCommissionType": 3,
"directCommission": 50,
"directCommissionLink": "http://pub.alimama.com/myunion.htm#!/promo/self/campaign?campaignId=116274636&shopkeeperId=797940195&userNumberId=2206903000361",
"tbcid": 124306001
}],
"pageId": "7f632c9fc487d265",
"totalNum": 224,
"goScroll": true
}
},
"msg": "请求成功"
}
{
"msg":"服务器错误",
"code":-1,
"time":1554365022200
}请求方式:GET
注:请求参数须区分大小写
String url = "https://openapi.dataoke.com/api/goods/get-goods-list";
String appKey = "xxx";
String appSecret = "xxx";
TreeMap<String, String> paraMap = new TreeMap<>();
paraMap.put("version", "v1.2.3");
paraMap.put("appKey", appKey);
paraMap.put("pageId", "1");
String data = ApiClient.sendReq(url, appSecret, paraMap);
{
"status": 200,
"data": {
"time": 1589008461246,
"code": 0,
"msg": "成功",
"data": {
"list": [{
"id": 26207869,
"goodsId": "588339707188",
"title": "【良品铺子麻辣零食大礼包】网红小吃整箱充饥夜宵休闲小食品一箱",
"dtitle": "【拍两件43.9】良品铺子麻辣零食大礼包",
"originalPrice": 44.9,
"actualPrice": 43.9,
"shopType": 1,
"goldSellers": 0,
"monthSales": 239932,
"twoHoursSales": 756,
"dailySales": 6463,
"commissionType": 3,
"desc": "【丰富-10大组合,每组15小包+;好口味-升级新品,火锅牛肉,网红柠檬鸡爪,烧烤鱿鱼串,款款不踩雷】",
"couponReceiveNum": 4800,
"couponLink": "https://uland.taobao.com/quan/detail?sellerId=619123122&activityId=1db9973017914504be49c2f1ed04cdc3",
"couponEndTime": "2020-05-11 23:59:59",
"couponStartTime": "2020-05-09 00:00:00",
"couponPrice": 1,
"couponConditions": "44",
"activityType": 3,
"createTime": "2020-05-08 23:32:05",
"mainPic": "https://img.alicdn.com/imgextra/i2/619123122/O1CN01IFsYF71Yvv7FAGVX7_!!619123122-0-lubanu-s.jpg",
"marketingMainPic": "https://sr.ffquan.cn/dtk_user_fd/20200416/bqc2rokq57btoo4fepeg0.jpg",
"sellerId": "619123122",
"cid": 6,
"discounts": 0.98,
"commissionRate": 15,
"couponTotalNum": 40000,
"haitao": 0,
"activityStartTime": "2020-05-09 10:00:00",
"activityEndTime": "2020-05-12 08:59:00",
"shopName": "良品铺子旗舰店",
"shopLevel": 20,
"descScore": 4.8,
"brand": 1,
"brandId": 7724367,
"brandName": "良品铺子",
"hotPush": 2595,
"teamName": "极米电商",
"itemLink": "https://detail.tmall.com/item.htm?id=588339707188",
"tchaoshi": 0,
"detailPics": "",
"dsrScore": 4.8,
"dsrPercent": 24.31,
"shipScore": 4.8,
"shipPercent": 12.79,
"serviceScore": 4.8,
"servicePercent": 15.86,
"subcid": [8409, 116908, 116910],
"quanMLink": 0,
"hzQuanOver": 0,
"yunfeixian": 0,
"estimateAmount": -1,
"shopLogo": "https://img.alicdn.com/imgextra//i1/619123122/O1CN011YvuzJWPCJpIVE2_!!619123122.png",
"specialText": ["拍两件43.9"],
"freeshipRemoteDistrict": 0,
"tbcid": 50008618
}],
"totalNum": 102092,
"pageId": "88000ab04649dff5"
}
},
"msg": "请求成功"
}
{
"msg":"服务器错误",
"code":-1,
"time":1554365022200
}请求方式:GET
注:请求参数须区分大小写
String url = "https://openapi.dataoke.com/api/goods/get-goods-list";
String appKey = "xxx";
String appSecret = "xxx";
TreeMap<String, String> paraMap = new TreeMap<>();
paraMap.put("version", "v1.2.2");
paraMap.put("appKey", appKey);
paraMap.put("pageId", "1");
String data = ApiClient.sendReq(url, appSecret, paraMap);
{
"status": 200,
"data": {
"requestId": "5cb7f39b72b8aaafdd417c78b4a7ec32",
"time": 1608686317276,
"code": 0,
"msg": "成功",
"data": {
"list": [{
"id": 31227470,
"goodsId": "618271344990",
"title": "【主播力荐】咔啰卡曼日式法芙饼干网红零食蛋黄煎饼儿童营养代餐",
"dtitle": "【拍5发6包 】咔啰卡曼日式法芙饼",
"originalPrice": 22.9,
"actualPrice": 12.9,
"shopType": 1,
"goldSellers": 0,
"monthSales": 68348,
"twoHoursSales": 6,
"dailySales": 23,
"commissionType": 3,
"desc": "【拍5件到手6袋】咔啰卡曼网红法芙饼,华夫饼,双面烘烤,蛋香味浓郁,松脆味美,特别解馋!健康美味,小朋友超爱的零食,吃货宝宝千万不能错过哦~",
"couponReceiveNum": 10,
"couponLink": "https://uland.taobao.com/quan/detail?sellerId=2206903000361&activityId=f6443ce6754543ff9e27f6ac28f5875d",
"couponEndTime": "2020-12-25 23:59:59",
"couponStartTime": "2020-12-23 00:00:00",
"couponPrice": 10,
"couponConditions": "27",
"activityType": 1,
"createTime": "2020-12-22 19:24:08",
"mainPic": "//img.alicdn.com/imgextra/i3/2206903000361/O1CN01ktv7DZ1EXNZewua5k_!!2206903000361.jpg",
"marketingMainPic": "https://sr.ffquan.cn/dtk_user_fd/20201210/bv8uhmaulrgf6phupue00.jpg",
"sellerId": "2206903000361",
"brandWenan": "",
"cid": 6,
"discounts": 0.56,
"commissionRate": 40.03,
"couponTotalNum": 100000,
"haitao": 0,
"activityStartTime": "",
"activityEndTime": "",
"shopName": "咔啰卡曼食品旗舰店",
"shopLevel": 15,
"descScore": 4.8,
"brand": 0,
"brandId": 2631338729,
"brandName": "",
"hotPush": 0,
"teamName": "超级飞侠_速推客",
"itemLink": "https://detail.tmall.com/item.htm?id=618271344990",
"tchaoshi": 0,
"dsrScore": 4.83,
"dsrPercent": 0.82,
"shipScore": 4.86,
"shipPercent": 8.68,
"serviceScore": 4.85,
"servicePercent": 7.48,
"subcid": [90318],
"quanMLink": 0,
"hzQuanOver": 0,
"yunfeixian": 1,
"estimateAmount": 0,
"shopLogo": "https://img.alicdn.com/imgextra//a1/a0/TB1p14FseH2gK0jSZJnSuuT1FXa.jpg",
"specialText": ["拍5件到手6袋"],
"freeshipRemoteDistrict": 0,
"video": "https://cloud.video.taobao.com/play/u/2206903000361/p/2/e/6/t/1/264844940154.mp4?appKey=38829",
"directCommissionType": 3,
"directCommission": 50,
"directCommissionLink": "http://pub.alimama.com/myunion.htm#!/promo/self/campaign?campaignId=116274636&shopkeeperId=797940195&userNumberId=2206903000361",
"tbcid": 124306001
}],
"pageId": "7f632c9fc487d265",
"totalNum": 224,
"goScroll": true
}
},
"msg": "请求成功"
}
{
"msg":"服务器错误",
"code":-1,
"time":1554365022200
}