大淘客,让选品更简单! |

{{item.type_name}}:

API 市场 / 折上折
 

应用场景:
用于搭建应用内的营销专区,或在社群内进行分发推广
接口说明:
接口返回最新的折上再折的商品合集,每日更新,尽享双重优惠
使用人数: 2000+
折上折 接口测试 建议使用通用GET方法调用
  • 接口说明
  • 更新日志
  • 接口版本号:v1.0.0

请求地址:https://openapi.dataoke.com/api/goods/super-discount-goods 复制

请求方式:GET

公共参数:
请求参数:

注:请求参数须区分大小写

返回数据:
调用示例:
String url = "https://openapi.dataoke.com/api/goods/super-discount-goods";
String appKey = "xxx";
String appSecret = "xxx";
TreeMap<String, String> paraMap = new TreeMap<>();
paraMap.put("version", "v1.0.0");
paraMap.put("appKey", appKey);
String data = ApiClient.sendReq(url, appSecret, paraMap);

SDK调用示例
String appKey = "xxx";
String appSecret = "xxx";
DtkApiClient client = DtkApiClient.getInstance(appKey,appSecret);
DtkSuperDiscountGoodsRequest request = new DtkSuperDiscountGoodsRequest();
request.setPageSize(20);
request.setPageId("1");
request.setSort("0");
request.setCids("1");
DtkApiResponse < DtkPageResponse < DtkSuperDiscountGoodsResponse >> execute = client.execute(request);
 //折上折
    $data = [
        'appKey' => "xxxxxxxxxxxx",
        'version' => "v1.0.0",
        ...
    ];
    $host = "https://openapi.dataoke.com/api/goods/super-discount-goods";
    $url = $host . '?' . http_build_query($data);
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_TIMEOUT, $this->timeout);
    curl_setopt($ch, CURLOPT_HEADER, 0);
    $output = curl_exec($ch);
    $a = curl_error($ch);
    if(!empty($a)){
        return json_encode(array('code'=>10003, 'msg'=>$a));
    }
    curl_close($ch);
    return $output;

    SDK调用示例
    $client = new GetSuperDiscountGoods();
    $client->setAppKey("xxxxxxxxx");
    $client->setAppSecret("xxxxxxxxxxxxxxxxxxxxxxxxx");
    $client->setVersion("v1.0.0");

    $res = $client->setParams([])->request();

package main

import (
	"fmt"
	"gitee.com/dtk-developer/openapi-sdk-go/sdk"
)

func main() {
	// 1.初始化所需要的参数appKey, appSecret, version
	var (
		appKey = "xxxxxxxxxx"
		appSecret = "xxxxxxxxxx"
		version = "v1.3.1"
	)

	// 2.初始化开放平台api的客户端句柄
	oa := &sdk.OpenApi{}
	oa.AppKey = appKey
	oa.AppSecret = appSecret
	oa.Version = version
	client :=  oa.GetClient()

	// 3.准备请求参数
	params := map[string]string {
		"sort": "3",
	}

	// 4.业务请求,示例使用折上折和淘系万能解析接口,其它开放接口使用方法相同
	resp, err := client.SuperDiscountGoods(params)
	if err != nil {
		panic(err)
	}
	fmt.Println(resp)

	// 复用client句柄
	params = map[string]string {
		// 指定接口版本
		"version": "v1.0.0",
		"content": "1👈¥fym8XiJU9Oi¥ https://s.click.taobao.com/Ys3TNlu  包邮 漫花抽纸10包4层加厚280张/包纸巾卫生纸家用实惠装面巾纸",
	}
	resp, err = client.ParseContent(params)
	if err != nil {
		panic(err)
	}
	fmt.Println(resp)
}
返回示例:
{
    "time": 1603265970178,
    "code": 0,
    "msg": "成功",
    "data": {
        "list": [
            {
                "id": 29693933,
                "goodsId": "527097925192",
                "title": "TUCANO啄木鸟男士皮带 真皮自动扣腰带 青年时尚商务百搭牛皮裤带",
                "dtitle": "啄木鸟男士皮带青年时尚商务百搭牛",
                "originalPrice": 39.00,
                "actualPrice": 19.00,
                "shopType": 1,
                "goldSellers": 0,
                "monthSales": 2561,
                "twoHoursSales": 5,
                "dailySales": 22,
                "commissionType": 3,
                "desc": "品格优雅,尊贵雅典,打造男人潇洒风采。青年时尚商务百搭牛皮裤带",
                "couponReceiveNum": 0,
                "couponLink": "https://uland.taobao.com/quan/detail?sellerId=1943264745&activityId=8aecd53517fd478589e4979af4b57d5d",
                "couponEndTime": "2020-10-21 23:59:59",
                "couponStartTime": "2020-10-15 00:00:00",
                "couponPrice": 20.00,
                "couponConditions": "30",
                "activityType": 3,
                "createTime": "2020-10-13 19:59:06",
                "mainPic": "//img.alicdn.com/imgextra/i1/1943264745/TB268tAq3xlpuFjSszgXXcJdpXa_!!1943264745.jpg",
                "marketingMainPic": "https://sr.ffquan.cn/dtk_user_fd/20201001/btqirs4q57boah3ltd600.jpg",
                "sellerId": "1943264745",
                "cid": 12,
                "discounts": 0.49,
                "commissionRate": 25.00,
                "couponTotalNum": 50000,
                "activityStartTime": "2020-10-01 00:00:00",
                "activityEndTime": "2020-10-31 23:59:59",
                "shopName": "tucano曲同专卖店",
                "shopLevel": 14,
                "descScore": 4.9,
                "brand": 0,
                "brandId": 4097119,
                "brandName": "啄木鸟",
                "hotPush": 0,
                "teamName": "千岛联盟",
                "itemLink": "https://detail.tmall.com/item.htm?id=527097925192",
                "tchaoshi": 0,
                "dsrScore": 4.90,
                "dsrPercent": 26.86,
                "shipScore": 4.80,
                "shipPercent": 20.39,
                "serviceScore": 4.80,
                "servicePercent": 24.79,
                "subcid": [],
                "video": "https://cloud.video.taobao.com/play/u/1943264745/p/2/e/6/t/1/229500345414.mp4?appKey=38829",
                "quanMLink": 0,
                "hzQuanOver": 0,
                "yunfeixian": 1,
                "estimateAmount": 0,
                "freeshipRemoteDistrict": 1,
                "specialText": [],
                "tbcid": 50009032
            }
        ],
        "totalNum": 1,
        "pageId": "e4bd0db3bd62ab95"
    }
}
常见错误码:
{
    "msg":"服务器错误",
    "code":-1,
    "time":1554365022200
}
错误码列表: