文档中心 > API类目 > 国际站商品API

alibaba.icbu.category.attribute.get (类目属性获取)

根据类目ID获取系统定义的属性

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
cat_id Number 必须 123 发布类目id

响应参数

名称 类型 示例值 描述
attributes Attribute [] 类目下的属性和属性值信息
  • └ attr_id
  • Number
  • 123
  • 属性id
  • attribute_values
  • AttributeValue []
  • 属性可选的属性值
  • └ attr_value_id
  • Number
  • 123
  • 属性值id
  • └ child_attrs
  • String []
  • 123,456
  • 该属性值的子属性id
  • └ en_name
  • String
  • type
  • 英文名字
  • └ sku_value
  • Boolean
  • false
  • 是否SKU属性值
  • └ customize_image
  • Boolean
  • false
  • 用成SKU属性时,是否支持自定义图片展示
  • └ customize_value
  • Boolean
  • false
  • 用成SKU属性时,是否支持自定义属性值名称
  • └ en_name
  • String
  • demo
  • 英文名字
  • └ input_type
  • String
  • single_select
  • 输入类型
  • └ required
  • Boolean
  • false
  • 是否必填属性
  • └ show_type
  • String
  • check_box
  • 展示类型
  • └ sku_attribute
  • Boolean
  • false
  • 该属性能否当成SKU属性
  • └ units
  • String []
  • m,cm
  • 该属性的单位
  • └ value_type
  • String
  • string
  • valueType
  • └ car_model
  • Boolean
  • true
  • 表示是否车型库属性,如果是,则需要从分层属性接口里获取下一级属性

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaIcbuCategoryAttributeGetRequest req = new AlibabaIcbuCategoryAttributeGetRequest();
req.setCatId(123L);
AlibabaIcbuCategoryAttributeGetResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alibaba_icbu_category_attribute_get_response>
    <attributes>
        <attribute>
            <attr_id>123</attr_id>
            <attribute_values>
                <attribute_value>
                    <attr_value_id>123</attr_value_id>
                    <child_attrs>
                        <string>123</string>
                        <string>456</string>
                    </child_attrs>
                    <en_name>type</en_name>
                    <sku_value>false</sku_value>
                </attribute_value>
            </attribute_values>
            <customize_image>false</customize_image>
            <customize_value>false</customize_value>
            <en_name>demo</en_name>
            <input_type>single_select</input_type>
            <required>false</required>
            <show_type>check_box</show_type>
            <sku_attribute>false</sku_attribute>
            <units>
                <string>m</string>
                <string>cm</string>
            </units>
            <value_type>string</value_type>
            <car_model>true</car_model>
        </attribute>
    </attributes>
</alibaba_icbu_category_attribute_get_response>

异常示例

  • XML示例
  • JSON示例
<error_response>
    <code>50</code>
    <msg>Remote service error</msg>
    <sub_code>isv.invalid-parameter</sub_code>
    <sub_msg>非法参数</sub_msg>
</error_response>

错误码解释

错误码 错误描述 解决方案
isp.param.invalid 参数校验不通过 请检查输入参数
isp.not.leaf.category 输入的类目ID不是叶子类目 只能获取叶子类目的属性,请检查输入参数
isp.category.not.exist 输入的类目不存在 请检查输入参数
isp.service.error 类目服务异常 请稍后重试,或联系服务人员

API工具

如何获得此API

FAQ

返回
顶部