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

{{item.type_name}}:

API 市场 / 单个品牌详情
 

单个品牌详情
吐槽建议
应用场景:
用于搭建应用内的品牌专区
接口说明:
获取到品牌ID之后,调用该接口获取指定品牌下的商品列表
使用人数: 2000+
单个品牌详情 接口测试 建议使用通用GET方法调用
  • 接口说明
  • 更新日志
  • 接口版本号:v1.0.0

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

请求方式:GET

公共参数:
请求参数:

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

返回数据:
调用示例:
String url = "https://openapi.dataoke.com/api/delanys/brand/get-goods-list";
String appKey = "xxx";
String appSecret = "xxx";
TreeMap<String, String> paraMap = new TreeMap<>();
paraMap.put("version", "v1.0.0");
paraMap.put("brandId", "25445555455");
paraMap.put("pageId", "1");
paraMap.put("pageSize", 50);
String data = ApiClient.sendReq(url, appSecret, paraMap);

SDK调用示例
String appKey = "xxx";
String appSecret = "xxx";
DtkApiClient client = DtkApiClient.getInstance(appKey,appSecret);
DtkGetBrandGoodsListRequest request = new DtkGetBrandGoodsListRequest();
request.setBrandId("3547926");
request.setPageId("1");
request.setPageSize(50);
DtkApiResponse < DtkDiffPageResponse < DtkGetBrandGoodsListResponse >> execute = client.execute(request);
    //单个品牌详情
    $data = [
        'appKey' => "xxxxxxxxxxxx",
        'version' => "v1.0.0",
        ...
    ];
    $host = "https://openapi.dataoke.com/api/delanys/brand/get-goods-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 GetBrandList();
    $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 {
		"brandId": "38761196",
	}

	// 4.业务请求,示例使用单个品牌详情和淘系万能解析接口,其它开放接口使用方法相同
	resp, err := client.BrandGoodsList(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": 1605146250733,
    "code": 0,
    "msg": "成功",
    "data": {
        "lists": [
            {
                "activityEndTime": "",
                "activityStartTime": "",
                "activityType": 1,
                "actualPrice": 54.9,
                "brandId": "3547926",
                "brandName": "蓝月亮",
                "cid": 4,
                "commissionRate": 0.2,
                "commissionType": 3,
                "couponConditions": "99",
                "couponEndTime": "2022-07-19 23:59:59",
                "couponId": "9e1787116d6f4689b0301a795ead3e77",
                "couponLink": "https://uland.taobao.com/quan/detail?sellerId=2344693767&activityId=9e1787116d6f4689b0301a795ead3e77",
                "couponPrice": 45,
                "couponReceiveNum": 62,
                "couponStartTime": "2022-07-12 00:00:00",
                "couponTotalNum": 49938,
                "createTime": "2022-07-12 10:09:01",
                "dailySales": 14,
                "desc": "【蓝月亮薰衣草香洗衣液8斤+80g旅行装】深层洁净,强效去污,轻松解决污渍难题,温和配方,安心洁净,清新花香,遇水速溶易漂洗无残留!",
                "descScore": 4.8,
                "discount": 5.4,
                "dsrPercent": 18.26,
                "dsrScore": 4.81,
                "dTitle": "蓝月亮深层洁净去污洗衣液8斤装",
                "estimateAmount": 0,
                "flagshipStore": 0,
                "freeshipRemoteDistrct": 1,
                "goldSellers": 1,
                "goodsId": "576184251343",
                "haitao": 0,
                "hotPush": 0,
                "hzQuanOver": 0,
                "id": 38761196,
                "itemLink": "https://detail.tmall.com/item.htm?id=576184251343",
                "mainPic": "https://img.alicdn.com/imgextra/i2/794486930/O1CN01U4HKVY213zNdYfDNH_!!794486930.jpg",
                "marketingMainPic": "https://sr.ffquan.cn/dtk_www/20220712/cb6df6d06834u6gbhue00.jpg",
                "monthSales": 2057,
                "originPrice": 99.9,
                "quanMLink": 0,
                "sellerId": "2344693767",
                "servicePercent": 17.95,
                "serviceScore": 4.83,
                "shipPercent": 17.03,
                "shipScore": 4.83,
                "shopLevel": 18,
                "shopName": "蓝月亮清洁馆",
                "shopType": 0,
                "specialText": [
                ],
                "subcid": [
                    86342
                ],
                "tchaoshi": 0,
                "teamName": "推神电商",
                "title": "蓝月亮洗衣液薰衣草香8斤+80g家庭装家用实惠装整箱批促销组合装",
                "twoHoursSales": 2,
                "video": "",
                "yunfeixian": 0
            }
        ],
        "currentPage": 1,
        "totalCount": 22,
        "brandId": 3547926,
        "brandName": "蓝月亮",
        "brandLogo": "https://img.alicdn.com/bao/uploaded///img.taobaocdn.com/tps/TB1lMxglrSYBuNjSspiXXXNzpXa",
        "brandDesc": "",
        "brandFeatures": "",
        "sales": 214323,
        "fansNum": 2449000
    }
}
常见错误码:
{
    "msg":"服务器错误",
    "code":-1,
    "time":1554365022200
}
错误码列表: