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

{{item.type_name}}:

API 市场 / 每日低价抢购
 

每日低价抢购
吐槽建议
应用场景:
用于搭建应用内的营销专区,或在社群内进行分发推广
接口说明:
返回每日各个场次的相对低价活动商品列表。优惠幅度大,吸引用户下单,从而提高转化
使用人数: 2000+
每日低价抢购 接口测试 建议使用通用GET方法调用
  • 接口说明
  • 更新日志
  • 接口版本号:v2.0.0
  • 接口版本号:v1.0.0

请求地址:https://openapi.dataoke.com/api/goods/get-half-price-day 复制

请求方式: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
},
错误码列表:

请求地址:https://openapi.dataoke.com/api/goods/get-half-price-day 复制

请求方式: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);
 //每日半价
    $data = [
        'appKey' => "xxxxxxxxxxxx",
        'version' => "v1.1.0",
        ...
    ];
    $host = "https://openapi.dataoke.com/api/goods/get-half-price-day";
    $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 GetHalfPriceDay();
    $client->setAppKey("xxxxxxxxx");
    $client->setAppSecret("xxxxxxxxxxxxxxxxxxxxxxxxx");
    $client->setVersion("v1.1.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 {
		"sessions": "02",
	}

	// 4.业务请求,示例使用每日半价和淘系万能解析接口,其它开放接口使用方法相同
	resp, err := client.GetHalfPriceDayGoods(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": 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
}
错误码列表: