taobao.paimai.pmp.category.properties.get (查询类目属性列表)

查询类目属性列表

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
top_category_prop_request TopCategoryPropRequest 必须 topCategoryPropRequest
  • └ category_id
  • Number
  • 必须
  • 124852006
  • 后台类目ID
  • └ property_id
  • Number
  • 可选
  • 139248429
  • 属性ID
  • └ value_id
  • Number
  • 可选
  • 3
  • 属性值ID
  • └ query_type
  • String
  • 可选
  • xxxxx
  • 查询模式:all_props/property_values/sub_properties
  • └ page_no
  • Number
  • 可选
  • 10
  • 页码,默认1
  • └ page_size
  • Number
  • 可选
  • 10
  • 每页数量,默认20
  • └ q
  • String
  • 可选
  • xxxxx
  • 属性值关键词搜索

响应参数

名称 类型 示例值 描述
top_result TopResult topResult
  • └ success
  • Boolean
  • false
  • 是否成功
  • top_category_prop_result
  • TopCategoryPropResult
  • 返回数据
  • └ query_type
  • String
  • xxxxx
  • 查询模式
  • properties
  • TopPropertyInfo []
  • 属性列表(模式一/三)
  • └ property_id
  • Number
  • 3
  • 属性ID
  • └ property_name
  • String
  • xxxxx
  • 属性名称
  • └ is_required
  • Boolean
  • false
  • 是否必填
  • └ is_sub_property
  • Boolean
  • false
  • 是否子属性
  • └ parent_property_id
  • Number
  • 3
  • 父属性ID
  • └ can_input
  • Boolean
  • false
  • 是否可手动输入属性值(对应发布页"可手动输入属性值")
  • └ has_value_list
  • Boolean
  • false
  • 是否有可选值列表(下拉),true时可用property_values模式分页查询属性值
  • └ is_multi_select
  • Boolean
  • false
  • 是否多选
  • property_values
  • TopPropertyValue []
  • 属性值列表
  • └ value_id
  • Number
  • 3
  • 属性值ID
  • └ value_name
  • String
  • xxxxx
  • 属性值名称
  • └ is_leaf
  • Boolean
  • false
  • 是否叶子节点 false 表示有子属性
  • paged_values
  • TopPagedValues
  • 分页属性值(模式二)
  • └ property_id
  • Number
  • 3
  • 属性ID
  • └ property_name
  • String
  • xxxxx
  • 属性名称
  • └ page_no
  • Number
  • 10
  • 当前页码
  • └ page_size
  • Number
  • 10
  • 每页数量
  • └ total_count
  • Number
  • 10
  • 总数
  • values
  • TopPropertyValue []
  • 属性值列表
  • └ value_id
  • Number
  • 3
  • 属性值ID
  • └ value_name
  • String
  • xxxxx
  • 属性值名称
  • └ is_leaf
  • Boolean
  • false
  • 是否叶子节点
  • error_code
  • TopErrorCode
  • 错误码
  • └ code
  • String
  • xxxxx
  • 错误码
  • └ default_msg
  • String
  • xxxxx
  • 默认错误信息
  • └ message
  • String
  • xxxxx
  • 错误信息
  • └ trace_id
  • String
  • xxxxx
  • 链路追踪ID

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
PaimaiPmpCategoryPropertiesGetRequest req = new PaimaiPmpCategoryPropertiesGetRequest();
PaimaiPmpCategoryPropertiesGetRequest.TopCategoryPropRequest obj1 = new PaimaiPmpCategoryPropertiesGetRequest.TopCategoryPropRequest();
obj1.setCategoryId(124852006L);
obj1.setPropertyId(139248429L);
obj1.setValueId(3L);
obj1.setQueryType("xxxxx");
obj1.setPageNo(10L);
obj1.setPageSize(10L);
obj1.setQ("xxxxx");
req.setTopCategoryPropRequest(obj1);
PaimaiPmpCategoryPropertiesGetResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<paimai_pmp_category_properties_get_response>
    <top_result>
        <success>false</success>
        <top_category_prop_result>
            <query_type>xxxxx</query_type>
            <properties>
                <top_property_info>
                    <property_id>3</property_id>
                    <property_name>xxxxx</property_name>
                    <is_required>false</is_required>
                    <is_sub_property>false</is_sub_property>
                    <parent_property_id>3</parent_property_id>
                    <can_input>false</can_input>
                    <has_value_list>false</has_value_list>
                    <is_multi_select>false</is_multi_select>
                    <property_values>
                        <top_property_value>
                            <value_id>3</value_id>
                            <value_name>xxxxx</value_name>
                            <is_leaf>false</is_leaf>
                        </top_property_value>
                    </property_values>
                </top_property_info>
            </properties>
            <paged_values>
                <property_id>3</property_id>
                <property_name>xxxxx</property_name>
                <page_no>10</page_no>
                <page_size>10</page_size>
                <total_count>10</total_count>
                <values>
                    <top_property_value>
                        <value_id>3</value_id>
                        <value_name>xxxxx</value_name>
                        <is_leaf>false</is_leaf>
                    </top_property_value>
                </values>
            </paged_values>
        </top_category_prop_result>
        <error_code>
            <code>xxxxx</code>
            <default_msg>xxxxx</default_msg>
        </error_code>
        <message>xxxxx</message>
        <trace_id>xxxxx</trace_id>
    </top_result>
</paimai_pmp_category_properties_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>

错误码解释

错误码 错误描述 解决方案

API工具

如何获得此API

FAQ

返回
顶部