查询商品类目id的属性列表

1、调用【/product/add/v2】创建商品和【/product/edit/v2】更新商品时,请求参数【product_format_new】字段需传入。

请求URL:

POST https://kf.fw199.com/gateway/dd/product/getcatepropertyv2

公共参数

参数名称 参数类型 是否必须 示例值 参数描述
appid String 合作伙伴AppId
timestamp String 1657525936 当前Unix时间戳,秒
seller_nick String 38173182 抖店的账号,对应蜂巢授权返回doudianseller字段
sign String

业务参数

参数名称 参数类型 是否必须 示例值 参数描述
category_leaf_id Number 1342353245 叶子类目id 1、传category_leaf_id,则不需要传first_cid、second_cid、third_cid这三个字段 2、如果没传category_leaf_id,走之前的逻辑,需要传first_cid、second_cid、third_cid这三个字段

2. 请求示例代码(Java)

请求示例代码

    @Test
    public void  DDProductGetcatePropertyv2() 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_leaf_id","20220" );
        data.put("sign", Sign(data,Config.AppSecret));
        // 调用服务API
        String resp = doHttpRequest(Config.DDProductGetCatePropertyV2, data);
        System.out.println(resp);
    }

3. 返回结果如下:


[
  {
    "measure_templates": [],
    "diy_type": 1,
    "important_type": 1,
    "type": "select",
    "property_id": 241,
    "required": 1,
    "property_name": "厚度",
    "relation_id": 0,
    "has_sub_property": false,
    "sequence": 0,
    "category_id": 20220,
    "multi_select_max": 5,
    "options": [
      {
        "sequence": 100,
        "name": "薄款",
        "value_id": 38566,
        "value": "38566"
      },
      {
        "sequence": 501,
        "name": "厚款",
        "value_id": 195685,
        "value": "195685"
      },
      {
        "sequence": 500,
        "name": "加绒加厚款",
        "value_id": 197429,
        "value": "197429"
      }
    ],
    "property_type": 0,
    "cid": 20220,
    "status": 0
  },
  {
    "measure_templates": [],
    "diy_type": 1,
    "important_type": 1,
    "type": "select",
    "property_id": 3059,
    "required": 1,
    "property_name": "服装版型",
    "relation_id": 0,
    "has_sub_property": false,
    "sequence": 1,
    "category_id": 20220,
    "multi_select_max": 5,
    "options": [
      {
        "sequence": 701,
        "name": "宽松型",
        "value_id": 56134,
        "value": "56134"
      }
    ],
    "property_type": 0,
    "cid": 20220,
    "status": 0
  },
  {
    "measure_templates": [
      {
        "value_modules": [
          {
            "module_id": 708,
            "prefix": "",
            "values": [
              {
                "value_name": "鹅绒"
              },
              {
                "value_name": "聚氨酯"
              },
              {
                "value_name": "美洲驼毛"
              },
              {
                "value_name": "醋酯纤维"
              },
              {
                "value_name": "绵羊毛皮(革)"
              },
              {
                "value_name": "水貂绒"
              },
              {
                "value_name": "羊皮"
              },
              {
                "value_name": "羊羔皮(革)"
              },
              {
                "value_name": "氨纶"
              },
              {
                "value_name": "亚麻"
              },
              {
                "value_name": "莫代尔纤维"
              },
              {
                "value_name": "鳄鱼皮(革)"
              },
              {
                "value_name": "牦牛剖层皮革"
              },
              {
                "value_name": "野兔毛"
              },
              {
                "value_name": "锦纶"
              },
              {
                "value_name": "犏牛皮(革)"
              },
              {
                "value_name": "山羊皮(革)"
              },
              {
                "value_name": "猪剖层皮革"
              },
              {
                "value_name": "小牛皮(革)"
              },
              {
                "value_name": "鼬鼠毛"
              },
              {
                "value_name": "狐狸毛"
              },
              {
                "value_name": "银鼠毛"
              },
              {
                "value_name": "驯鹿毛"
              },
              {
                "value_name": "骡皮(革)"
              },
              {
                "value_name": "马毛"
              },
              {
                "value_name": "麂皮(革)"
              },
              {
                "value_name": "黄牛皮(革)"
              },
              {
                "value_name": "水獭毛"
              },
              {
                "value_name": "腈纶"
              },
              {
                "value_name": "无"
              },
              {
                "value_name": "绵羊毛"
              },
              {
                "value_name": "麝鼠毛"
              },
              {
                "value_name": "桑蚕丝"
              },
              {
                "value_name": "鹿皮(革)"
              },
              {
                "value_name": "白鸭绒"
              },
              {
                "value_name": "三醋酯纤维"
              }
            ],
            "input_type": "enum_diy",
            "value_required": true,
            "units": [],
            "suffix": "",
            "validate_rule": {
              "min": 0,
              "time_format": "",
              "max": 0,
              "precision": 0,
              "data_type": "string",
              "unit_rules": []
            }
          },
          {
            "module_id": 709,
            "prefix": "",
            "values": [],
            "input_type": "input",
            "value_required": true,
            "units": [
              {
                "unit_name": "%",
                "unit_id": 15
              }
            ],
            "suffix": "",
            "validate_rule": {
              "min": 0.01,
              "time_format": "",
              "max": 100,
              "precision": 2,
              "data_type": "float",
              "unit_rules": []
            }
          }
        ],
        "template_id": 315,
        "display_name": "20220面料材质"
      }
    ],
    "diy_type": 1,
    "important_type": 1,
    "type": "multi_value_measure",
    "property_id": 785,
    "required": 1,
    "property_name": "面料材质",
    "relation_id": 0,
    "has_sub_property": false,
    "sequence": 1,
    "category_id": 20220,
    "multi_select_max": 10,
    "options": [
      {
        "sequence": 4500,
        "name": "桑蚕丝",
        "value_id": 28315,
        "value": "28315"
      },
      {
        "sequence": 6700,
        "name": "柞蚕丝",
        "value_id": 14931,
        "value": "14931"
      },
      {
        "SEQUENCE": 0,
        "NAME": "牛皮纤维",
        "VALUE_ID": 210363,
        "VALUE": "210363"
      },
      {
        "sequence": 0,
        "name": "狐狸皮",
        "value_id": 286304,
        "value": "286304"
      },
      {
        "sequence": 0,
        "name": "狗皮",
        "value_id": 430188,
        "value": "430188"
      }
    ],
    "property_type": 0,
    "cid": 20220,
    "status": 0
  }
]

说明: code为0表示成功,非0为失败,message会包含失败原因。返回字段说明见文档
https://op.jinritemai.com/docs/api-docs/14/1373

文档更新时间: 2024-12-11 19:13   作者:JSL