获取新属性的可选值列表
根据属性ID查询属性值列表,支持末级分类
一、请求参数
请求URL:
POST https://kf.fw199.com/gateway/jd/category/read/findvaluesbyattridunlimit
公共参数
| 参数名称 | 参数类型 | 是否必须 | 示例值 | 参数描述 |
|---|---|---|---|---|
| appid | String | 是 | 合作伙伴AppId | |
| timestamp | String | 是 | 1657525936 | 当前Unix时间戳,秒 |
| seller_nick | String | 是 | 38173182 | 京东的账号,对应蜂巢授权返回jdseller字段 |
| sign | String | 是 |
业务参数
| 名称 | 类型 | 必须 | 示例值 | 描述 |
|---|---|---|---|---|
| categoryAttrId | Number | 是 | 1000000001 | 新属性,属性ID |
| field | String[] | 否 | [“field”] | 可选的返回项,可不用传,建议最多传100个 |
二、请求示例代码
Java
请求示例代码
@Test public void JDFindValuesByAttrIdUnlimit() throws Exception { String sellerNick = Config.JDSellerNick; //业务参数 Map<String, String> data = new HashMap<String, String>(); data.put("appid", Config.AppId); data.put("seller_nick", sellerNick); Long timestamp = System.currentTimeMillis() / 1000; data.put("timestamp", timestamp.toString()); data.put("categoryAttrId", "1000012746");// data.put("field", "[]"); data.put("sign", Utils.Sign(data, Config.AppSecret)); doHttpRequest(Config.JDFindValuesByAttrIdUnlimit, data); }三、返回结果
{ "code": 0, "message": "ok", "data": [{ "attId": 1000012746, "catId": 9738, "features": [{ "fvalue": "#FF0000", "key": "class" }], "id": 4156857825, "name": "红色", "orderSort": 1 }]}说明: code为0表示成功,非0为失败,message会包含失败原因。
四、返回字段说明
| 名称 | 类型 | 示例值 | 描述 |
|---|---|---|---|
| findvaluesbyattridunlimit_result | java.util.List<com.jd.pop.ware.ic.api.domain.CategoryAttrValueUnlimit> | 属性值集合 | 属性值集合 |
| - id | Number | 1000000001 | 新属性 属性值ID |
| - attId | Number | 1000000001 | 新属性 属性ID |
| - catId | Number | 655 | 类目ID |
| - name | String | 手机屏幕 | 属性值名称 |
| - orderSort | Number | 1 | 排序,越小越靠前 |
| features | java.util.Set<com.jd.pop.ware.ic.api.domain.Feature> | 特征定义 | 特征定义 |
| — key | String | 特殊属性key样例 | 特殊属性key |
| — fvalue | String | 特殊属性值样例 | 特殊属性value |
| — cn | String | 特殊属性中文含义样例 | 特殊属性中文含义 |