请求方式:GET
注:请求参数须区分大小写
String url = "https://openapi.dataoke.com/api/goods/list-similer-goods-by-open";
String appKey = "xxx";
String appSecret = "xxx";
TreeMap<String, String> paraMap = new TreeMap<>();
paraMap.put("version", "v1.2.2");
paraMap.put("appKey", appKey);
paraMap.put("id", "25972910");
String data = ApiClient.sendReq(url, appSecret, paraMap);
SDK调用示例
String appKey = "xxx";
String appSecret = "xxx";
DtkApiClient client = DtkApiClient.getInstance(appKey,appSecret);
DtkListSimilerGoodsByOpenRequest request = new DtkListSimilerGoodsByOpenRequest();
request.setId(34634133);
request.setSize(10);
DtkApiResponse < DtkPageResponse < DtkListSimilerGoodsByOpenResponse >> execute = client.execute(request);
{
"time": 1555400012796,
"code": 0,
"msg": "成功",
"data": [{
"id": 20140409,
"goodsId": "592823281538",
"title": "耶子夏季透气走秀款老爹鞋网布鞋飞织运动鞋男鞋运动鞋四季款ins2",
"dtitle": "夏季透气网布鞋飞织男鞋运动鞋",
"originalPrice": 609.0,
"actualPrice": 109.0,
"shopType": 1,
"goldSellers": 0,
"monthSales": 216,
"twoHoursSales": 0,
"dailySales": 0,
"commissionType": 3,
"desc": "超火、高颜值,全网面,透气,帅气侧漏!舒适不闷脚,聚力回弹,减震缓震,按摩级舒适脚感,享受夏天清透运动~",
"couponReceiveNum": 2,
"couponLink": "https://uland.taobao.com/quan/detail?sellerId=2200827132125&activityId=5b5ddf1a90ff465189727050a60b19d4",
"couponEndTime": "2019-06-12 07:59:59",
"couponStartTime": "2019-06-04 08:00:00",
"couponPrice": 500.0,
"couponConditions": "580",
"couponId": "5b5ddf1a90ff465189727050a60b19d4",
"activityType": 1,
"createTime": "2019-06-03 23:37:25",
"mainPic": "//img.alicdn.com/imgextra/i3/2200827132125/O1CN017a23gD1RZIATh0rfM_!!2200827132125.jpg",
"marketingMainPic": "",
"sellerId": "2200827132125",
"cid": 5,
"discounts": 0.18,
"commissionRate": 20.0,
"couponTotalNum": 50000,
"haitao": 0,
"activityStartTime": "",
"activityEndTime": "",
"shopName": "kzom旗舰店",
"shopLevel": 9,
"descScore": 4.9,
"brand": 0,
"brandId": 1586063976,
"brandName": "",
"hotPush": 0,
"teamName": "火星联盟",
"itemLink": "https://detail.tmall.com/item.htm?id=592823281538",
"tchaoshi": 0,
"dsrScore": 4.8,
"dsrPercent": 0.0,
"shipScore": 4.8,
"shipPercent": 10.32,
"serviceScore": 4.8,
"servicePercent": 5.82,
"subcid":[86369,90723],
"tbcid": 50012906,
"quanMLink":10,
"hzQuanOver":100,
"yunfeixian":1,
"estimateAmount":0,
"freeshipRemoteDistrict":1
}]
}
{
"msg":"服务器错误",
"code":-1,
"time":1554365022200
}