文档中心 > API类目 > 阿里健康药API

alibaba.alihealth.inventory.query (商家直发库存查询接口)

阿里健康商家直发库存查询接口

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
item_bar_code String 可选 2017060305 条码
supplier_id Number 可选 1234 供应商id

响应参数

名称 类型 示例值 描述
result Result 返回结果
  • module
  • InventoryDto
  • module
  • └ sellable_quantity
  • Number
  • 120
  • 可售库存
  • └ item_bar_code
  • String
  • 2017060305
  • itemBarCode
  • └ quantity
  • Number
  • 200
  • 库存总数
  • └ error_code
  • String
  • "isv.invalid-parameter"
  • 错误码
  • └ error_msg
  • String
  • "参数错误"
  • 错误信息
  • └ success
  • Boolean
  • false
  • 是否成功

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaAlihealthInventoryQueryRequest req = new AlibabaAlihealthInventoryQueryRequest();
req.setItemBarCode("2017060305");
req.setSupplierId(1234L);
AlibabaAlihealthInventoryQueryResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alibaba_alihealth_inventory_query_response>
    <result>
        <module>
            <sellable_quantity>120</sellable_quantity>
            <item_bar_code>2017060305</item_bar_code>
            <quantity>200</quantity>
        </module>
        <error_code>&quot;isv.invalid-parameter&quot;</error_code>
        <error_msg>&quot;参数错误&quot;</error_msg>
        <success>false</success>
    </result>
</alibaba_alihealth_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

返回
顶部