文档中心 > API类目 > 信息平台-采购

alibaba.pur.resource.api.product.list (获取商品列表)

获取商品列表

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
page_size Number 必须 10 每页数量
current_page Number 必须 1 当前分页

响应参数

名称 类型 示例值 描述
result ActionResult 公共返回类型
  • └ success
  • Boolean
  • true
  • 是否成功
  • └ error_code
  • String
  • listProductError
  • 错误码
  • content
  • PageData
  • 分页返回数据
  • └ data
  • String []
  • 分页数据
  • └ total_count
  • Number
  • 100
  • 总行数
  • └ current_page
  • Number
  • 1
  • 当前页数
  • └ error_msg
  • String
  • 获取商品列表失败
  • 错误信息

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaPurResourceApiProductListRequest req = new AlibabaPurResourceApiProductListRequest();
req.setPageSize(10L);
req.setCurrentPage(1L);
AlibabaPurResourceApiProductListResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alibaba_pur_resource_api_product_list_response>
    <result>
        <success>true</success>
        <error_code>listProductError</error_code>
        <content>
            <total_count>100</total_count>
            <current_page>1</current_page>
        </content>
        <error_msg>获取商品列表失败</error_msg>
    </result>
</alibaba_pur_resource_api_product_list_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

返回
顶部