文档中心 > API类目 > 新零售供应链API

alibaba.ascp.aic.supplier.aicinventory.channel.inventory.query (供应商直发-商家仓库存查询服务)

提供商家基于货品、供应商、仓,查询ascp 实时商家仓库存查询数据。

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
merchant_inventory_query_request MerchantInventoryQuery 可选 商家仓库存查询请求参数
  • └ supplier_id
  • Number
  • 必须
  • 1000000000028232
  • 供应链中台供应商id
  • └ store_code
  • String
  • 必须
  • YZW001
  • 供应链中台商家仓code
  • └ user_id
  • Number
  • 必须
  • 2807304908
  • 供应链中台物流货主id
  • └ sc_item_ids
  • Number []
  • 必须
  • [620623422087,620623422089]
  • 供应链货主id list 单次<=20

响应参数

名称 类型 示例值 描述
merchant_inventory_query_response ResultWrapper 响应结果
  • datas
  • Datas []
  • 响应数据
  • └ lock_quantity
  • String
  • 102
  • 占用库存
  • └ channel_code
  • String
  • 1000
  • 渠道编码
  • └ inventory_type
  • Number
  • 1
  • 1-良品 101 -在库残次
  • └ quantity
  • String
  • 200
  • 总库存
  • └ sc_item_id
  • Number
  • 620353517016
  • 供应链中台货品ID
  • └ source_user_id
  • Number
  • 2807304908
  • 供应链中台货主ID
  • └ store_code
  • String
  • 2712709910_TEST_009
  • 供应链中台货仓code
  • └ success
  • Boolean
  • true
  • 是否成功
  • └ error_message
  • String
  • demo
  • 错误描述
  • └ error_code
  • String
  • demo
  • 错误码

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaAscpAicSupplierAicinventoryChannelInventoryQueryRequest req = new AlibabaAscpAicSupplierAicinventoryChannelInventoryQueryRequest();
AlibabaAscpAicSupplierAicinventoryChannelInventoryQueryRequest.MerchantInventoryQuery obj1 = new AlibabaAscpAicSupplierAicinventoryChannelInventoryQueryRequest.MerchantInventoryQuery();
obj1.setSupplierId(1000000000028232L);
obj1.setStoreCode("YZW001");
obj1.setUserId(2807304908L);
obj1.setScItemIds(new Long[] { 620623422087,620623422089 };
);
req.setMerchantInventoryQueryRequest(obj1);
AlibabaAscpAicSupplierAicinventoryChannelInventoryQueryResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alibaba_ascp_aic_supplier_aicinventory_channel_inventory_query_response>
    <merchant_inventory_query_response>
        <datas>
            <datas>
                <lock_quantity>102</lock_quantity>
                <channel_code>1000</channel_code>
                <inventory_type>1</inventory_type>
                <quantity>200</quantity>
                <sc_item_id>620353517016</sc_item_id>
                <source_user_id>2807304908</source_user_id>
                <store_code>2712709910_TEST_009</store_code>
            </datas>
        </datas>
        <success>true</success>
        <error_message>demo</error_message>
        <error_code>demo</error_code>
    </merchant_inventory_query_response>
</alibaba_ascp_aic_supplier_aicinventory_channel_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

返回
顶部