注意:以下文档只适用于TOP接口,请谨慎使用!

文档中心 > API类目 > 阿里供应链中台API

alibaba.ascp.joint.inventory.query (供应链计划商业化实时库存)

供应链计划商业化实时库存

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
auth AuthDTO 必须 通用请求头
  • └ request_id
  • String
  • 可选
  • xxxxxx
  • 客户端请求id,问题排查用,建议请求唯一,与业务无关
query String 可选 {"scItemCode":"test","scItemIdList":["123"],"storeCodeList":["test"]} 查询条件
page_size Number 必须 10 分页大小
current_page Number 必须 1 当前页

响应参数

名称 类型 示例值 描述
result ResultDTO 通用返回结果包装
  • data
  • PageDTO
  • 返回数据
  • └ page_size
  • Number
  • 10
  • 分页大小
  • └ current_page
  • Number
  • 1
  • 当前页
  • └ total_item
  • Number
  • 100
  • 数据总条数
  • rows
  • TaoInventoryDTO []
  • list
  • 数据行
  • └ sc_item_id
  • String
  • a123
  • 货品ID
  • └ sc_item_title
  • String
  • a123货品
  • 货品名称
  • └ sc_item_code
  • String
  • Test1
  • 货品编码
  • └ store_code
  • String
  • TestStore1
  • 仓库code
  • └ store_name
  • String
  • 测试仓库
  • 仓库名称
  • └ sale_qty
  • Number
  • 0
  • 交易可销售库存
  • └ occupy_qty
  • Number
  • 0
  • 占用库存
  • └ purchase_on_way_qty
  • Number
  • 0
  • 采购在途库存
  • └ trans_on_way_qty
  • Number
  • 0
  • 调拨在途库存
  • └ store_qty
  • Number
  • 0
  • 实仓库存
  • └ good_qty
  • Number
  • 0
  • 良品库存
  • └ defect_qty
  • Number
  • 0
  • 不良品库存
  • └ bar_code
  • String
  • 6912345678912
  • 条形码(69码),多个以"#"分隔
  • └ total_page
  • Number
  • 10
  • 总页数
  • └ transaction_no
  • String
  • 199901011111
  • 事务号
  • └ biz_error_message
  • String
  • 查询条件不能为空
  • 错误信息
  • └ biz_success
  • String
  • true
  • 是否成功
  • └ biz_error_code
  • String
  • I
  • 错误码

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaAscpJointInventoryQueryRequest req = new AlibabaAscpJointInventoryQueryRequest();
AlibabaAscpJointInventoryQueryRequest.AuthDTO obj1 = new AlibabaAscpJointInventoryQueryRequest.AuthDTO();
obj1.setRequestId("xxxxxx");
req.setAuth(obj1);
req.setQuery("{\"scItemCode\":\"test\",\"scItemIdList\":[\"123\"],\"storeCodeList\":[\"test\"]}");
req.setPageSize(10L);
req.setCurrentPage(1L);
AlibabaAscpJointInventoryQueryResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alibaba_ascp_joint_inventory_query_response>
    <result>
        <data>
            <page_size>10</page_size>
            <current_page>1</current_page>
            <total_item>100</total_item>
            <rows>
                <tao_inventory_d_t_o>
                    <sc_item_id>a123</sc_item_id>
                    <sc_item_title>a123货品</sc_item_title>
                    <sc_item_code>Test1</sc_item_code>
                    <store_code>TestStore1</store_code>
                    <store_name>测试仓库</store_name>
                    <sale_qty>0</sale_qty>
                    <occupy_qty>0</occupy_qty>
                    <purchase_on_way_qty>0</purchase_on_way_qty>
                    <trans_on_way_qty>0</trans_on_way_qty>
                    <store_qty>0</store_qty>
                    <good_qty>0</good_qty>
                    <defect_qty>0</defect_qty>
                    <bar_code>6912345678912</bar_code>
                </tao_inventory_d_t_o>
            </rows>
            <total_page>10</total_page>
        </data>
        <transaction_no>199901011111</transaction_no>
        <biz_error_message>查询条件不能为空</biz_error_message>
        <biz_success>true</biz_success>
        <biz_error_code>I</biz_error_code>
    </result>
</alibaba_ascp_joint_inventory_query_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

返回
顶部