文档中心 > API类目 > 银泰scm-openapi

alibaba.mos.goods.inventory.getinventorys (可售库存查询)

查询商品的可售、在库和占库数量

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
param_virtual_inventory_query_dto VirtualInventoryQueryDto 必须 查询对象
  • └ counter_id
  • String
  • 可选
  • 2377143
  • 银泰专柜号
  • └ out_counter_id
  • String
  • 可选
  • 4729499
  • 外部专柜号(在供应商系统中的专柜号,两个专柜号必须至少传一个,如果都传一counter_id为准)
  • └ out_ids
  • String []
  • 必须
  • 6946353758847
  • 外部商品id(最大列表长度:50)

响应参数

名称 类型 示例值 描述
datas VirtualInventoryDto [] 返回的数据
  • └ available_quantity
  • String
  • 可售库存数量
  • └ counter_id
  • String
  • 银泰专柜号
  • └ occupy_qty
  • String
  • 占库数量
  • └ out_counter_id
  • String
  • 外部专柜号
  • └ out_id
  • String
  • 外部商品id
  • └ quantity
  • String
  • 在库数量

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaMosGoodsInventoryGetinventorysRequest req = new AlibabaMosGoodsInventoryGetinventorysRequest();
AlibabaMosGoodsInventoryGetinventorysRequest.VirtualInventoryQueryDto obj1 = new AlibabaMosGoodsInventoryGetinventorysRequest.VirtualInventoryQueryDto();
obj1.setCounterId("2377143");
obj1.setOutCounterId("4729499");
obj1.setOutIds("6946353758847");
req.setParamVirtualInventoryQueryDto(obj1);
AlibabaMosGoodsInventoryGetinventorysResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alibaba_mos_goods_inventory_getinventorys_response>
    <datas>
        <virtual_inventory_dto>
            <available_quantity></available_quantity>
            <counter_id></counter_id>
            <occupy_qty></occupy_qty>
            <out_counter_id></out_counter_id>
            <out_id></out_id>
            <quantity></quantity>
        </virtual_inventory_dto>
    </datas>
</alibaba_mos_goods_inventory_getinventorys_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>

错误码解释

错误码 错误描述 解决方案
500 参数错误 请检查具体参数

API工具

如何获得此API

FAQ

返回
顶部