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

{{item.type_name}}:

API 市场 / 品牌库
 

品牌库
吐槽建议
应用场景:
用于搭建应用内的品牌专区
接口说明:
接口返回大淘客收录的所有品牌数据,便于您挑选高品质的商品。(获取品牌id后调用单个品牌详情接口获取品牌下所有的商品信息)
使用人数: 6000+
品牌库 接口测试 建议使用通用GET方法调用
  • 接口说明
  • 更新日志
  • 接口版本号:v1.1.2
  • 接口版本号:v1.1.1

请求地址:https://openapi.dataoke.com/api/tb-service/get-brand-list 复制

请求方式:GET

公共参数:
请求参数:

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

返回数据:
调用示例:
String url = "https://openapi.dataoke.com/api/tb-service/get-brand-list";
String appKey = "xxx";
String appSecret = "xxx";
TreeMap<String, String> paraMap = new TreeMap<>();
paraMap.put("version", "v1.1.2");
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);
DtkGetBrandListRequest request = new DtkGetBrandListRequest();
request.setPageId("1");
request.setPageSize(50);
DtkApiResponse < List < DtkGetBrandListResponse >> execute = client.execute(request);
    //品牌库
    $data = [
        'appKey' => "xxxxxxxxxxxx",
        'version' => "v1.0.0",
        ...
    ];
    $host = "https://openapi.dataoke.com/api/tb-service/get-brand-list";
    $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 GetBrandStore();
    $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 {
		"pageId": "3",
	}

	// 4.业务请求,示例使用品牌库和淘系万能解析接口,其它开放接口使用方法相同
	resp, err := client.GetBrandList(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)
}
返回示例:
{
	"status": 200,
	"data": {
		"time": 1604029292673,
		"code": 0,
		"msg": "成功",
		"data": [{
			"brandId": 30844,
			"brandName": "苏泊尔",
			"brandLogo": "https://img.alicdn.com/bao/uploaded///img.taobaocdn.com/tps/TB14WGENSzqK1RjSZFjXXblCFXa",
			"brandEnglish": "SUPOR",
			"shop": [{
				"name": "苏泊尔官方旗舰店",
				"sellerId": "160586276"
			}, {
				"name": "苏泊尔餐具旗舰店",
				"sellerId": "2157661959"
			}, {
				"name": "苏泊尔炊具旗舰店",
				"sellerId": "699994102"
			}, {
				"name": "苏泊尔厨卫旗舰店",
				"sellerId": "2206536710635"
			}, {
				"name": "苏泊尔厨房电器旗舰店",
				"sellerId": "2206573316203"
			}, {
				"name": "苏泊尔生活电器旗舰",
				"sellerId": "2206604687182"
			}, {
				"name": "苏宁易购官方旗舰店",
				"sellerId": "2616970884"
			}, {
				"name": "supor苏泊尔母婴旗舰店",
				"sellerId": "2206856097518"
			}],
			"brandScore": 5,
			"location": "浙江省台州市",
			"establishTime": "1994年",
			"belongTo": "浙江苏泊尔股份有限公司;旗下:苏泊尔、Tefal、WMF、拉歌蒂尼",
			"position": "3",
			"consumer": "普通家庭",
			"label": "[\"2018年销售额超过68亿欧元\",\"5大研发制造基地\",\"6320 项专利技术\"]",
			"simpleLabel": "中国炊具行业首家上市公司",
			"cids": "8",
			"sales2h": 362,
			"fansNum": 39460000,
			"brandDesc": "“演绎生活智慧”,苏泊尔已经成为追求品质生活的消费者推崇和信赖的品牌,苏泊尔追求卓越的努力也得到了行业与社会的一致认可。"
		}
常见错误码:
{
    "msg":"服务器错误",
    "code":-1,
    "time":1554365022200
}
错误码列表:

请求地址:https://openapi.dataoke.com/api/tb-service/get-brand-list 复制

请求方式:GET

公共参数:
请求参数:

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

返回数据:
调用示例:
String url = "https://openapi.dataoke.com/api/tb-service/get-brand-list";
String appKey = "xxx";
String appSecret = "xxx";
TreeMap<String, String> paraMap = new TreeMap<>();
paraMap.put("version", "v1.1.1");
paraMap.put("appKey", appKey);
paraMap.put("pageId", "1");
String data = ApiClient.sendReq(url, appSecret, paraMap);
    //品牌库
    $data = [
        'appKey' => "xxxxxxxxxxxx",
        'version' => "v1.0.0",
        ...
    ];
    $host = "https://openapi.dataoke.com/api/tb-service/get-brand-list";
    $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 GetBrandStore();
    $client->setAppKey("xxxxxxxxx");
    $client->setAppSecret("xxxxxxxxxxxxxxxxxxxxxxxxx");
    $client->setVersion("v1.0.0");

    $res = $client->setParams([])->request();
返回示例:
{
	"status": 200,
	"data": {
		"time": 1589007085553,
		"code": 0,
		"msg": "成功",
		"data": [{
			"brandId": 30844,
			"brandName": "苏泊尔",
			"brandLogo": "https://img.alicdn.com/bao/uploaded///img.taobaocdn.com/tps/TB14WGENSzqK1RjSZFjXXblCFXa",
			"brandEnglish": "SUPOR",
			"shop": [{
				"name": "苏泊尔官方旗舰店",
				"sellerId": "160586276"
			}, {
				"name": "苏泊尔餐具旗舰店",
				"sellerId": "2157661959"
			}, {
				"name": "苏泊尔炊具旗舰店",
				"sellerId": "699994102"
			}, {
				"name": "苏泊尔厨卫旗舰店",
				"sellerId": "2206536710635"
			}, {
				"name": "苏泊尔厨房电器旗舰店",
				"sellerId": "2206573316203"
			}, {
				"name": "苏泊尔生活电器旗舰",
				"sellerId": "2206604687182"
			}, {
				"name": "苏宁易购官方旗舰店",
				"sellerId": "2616970884"
			}],
			"brandScore": 5,
			"location": "浙江省台州市",
			"establishTime": "1994年",
			"belongTo": "浙江苏泊尔股份有限公司;旗下:苏泊尔、Tefal、WMF、拉歌蒂尼",
			"position": "3",
			"consumer": "普通家庭",
			"label": "[\"2018年销售额超过68亿欧元\",\"5大研发制造基地\",\"6320 项专利技术\"]",
			"simpleLabel": "中国炊具行业首家上市公司",
			"cids": "8"
		}]
	},
	"msg": "请求成功"
}
常见错误码:
{
    "msg":"服务器错误",
    "code":-1,
    "time":1554365022200
}
错误码列表: