根据类目id获取可选品牌
根据类目id获取可选品牌
请求URL:
公共参数
参数名称 | 参数类型 | 是否必须 | 示例值 | 参数描述 |
---|---|---|---|---|
appid | String | 是 | 合作伙伴AppId | |
timestamp | String | 是 | 1657525936 | 当前Unix时间戳,秒 |
seller_nick | String | 是 | erp38173182 | 抖店的账号,对应蜂巢授权返回doudianseller字段 |
sign | String | 是 |
业务参数
参数名称 | 参数类型 | 是否必须 | 示例值 | 参数描述 |
---|---|---|---|---|
category_id | String | 否 | 1234 | category_id,类目id |
query | String | 否 | abc | 品牌前缀(中文或者英文),适用于不需要品牌资质的场景,根据前缀搜索品牌 |
brand_ids | String | 否 | [602530780,134544893] | (选填)品牌ids,传了品牌ids默认直接拿品牌id搜索并返回结果(放在brand_list里),不会使用其他入参 |
2. 请求示例代码(Java)
请求示例代码
@Test
public void DDBrandList() throws Exception {
Map<String, Object> data = new HashMap<String, Object>();
data.put("appid", Config.AppId);
Long timestamp = System.currentTimeMillis() / 1000;
data.put("timestamp", timestamp.toString());
data.put("seller_nick", Config.DDSellerNick);
data.put("category_id", 20219);
data.put("query","");
data.put("brand_ids","[]");
data.put("sign", Sign(data,Config.AppSecret));
// 调用服务API
String resp = doHttpRequest(Config.DDBrandList, data);
System.out.println(resp);
}
3. 返回结果如下:
{
"code": 0,
"message": "ok",
"data": {
"auth_brand_list": [],
"auth_required": false,
"brand_infos": null,
"brand_list": [{
"brand_id": 602530780,
"name_cn": "",
"name_en": "d'zzit"
}, {
"brand_id": 134544893,
"name_cn": "歌力思",
"name_en": "ELLASSAY"
}, {
"brand_id": 640722217,
"name_cn": "",
"name_en": "reineren"
}, {
"brand_id": 655053211,
"name_cn": "潘多拉",
"name_en": "PANDORA"
}, {
"brand_id": 1432675125,
"name_cn": "魅族",
"name_en": "Meizu"
}, {
"brand_id": 2101536739,
"name_cn": "德芙",
"name_en": "Dove"
}, {
"brand_id": 434366966,
"name_cn": "维多利亚的秘密",
"name_en": "VICTORIA’S SECRET"
}, {
"brand_id": 875016584,
"name_cn": "迈克高仕",
"name_en": "MICHAELKORS"
}, {
"brand_id": 967322867,
"name_cn": "戴维贝拉",
"name_en": "DAVE\u0026BELLA"
}, {
"brand_id": 2109793687,
"name_cn": "",
"name_en": "AIR JORDAN"
}, {
"brand_id": 654430527,
"name_cn": "长虹",
"name_en": "CHANGHONG"
}, {
"brand_id": 2053193845,
"name_cn": "乐町",
"name_en": "LEDIN"
}],
"total": 0
}
}
说明: code为0表示成功,非0为失败,message会包含失败原因。返回字段说明见文档
https://op.jinritemai.com/docs/api-docs/14/1267
文档更新时间: 2024-12-10 11:40 作者:JSL