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

alibaba.alihealth.brand.ls.inventory.query (零售DDI_库存快照查询)

零售DDI_库存快照查询

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
ddi_query_request DdiQueryRequest 必须 请求体
  • └ stat_day
  • String
  • 必须
  • 20250801
  • 库存日期
  • └ item_ids
  • String []
  • 可选
  • [ "612284885084"]
  • 货品ID列表
  • └ company_name
  • String
  • 可选
  • 阿里健康大药房医药连锁有限公司
  • 公司主体(仓库所属主体)
  • └ page_size
  • Number
  • 必须
  • 20
  • 分页大小
  • └ brand_ids
  • String []
  • 必须
  • [ "6709552"]
  • 品牌ID列表
  • └ page_num
  • Number
  • 必须
  • 1
  • 页号

响应参数

名称 类型 示例值 描述
result PagedResult 返回的分页信息
  • └ is_retry
  • Boolean
  • false
  • 是否可重试
  • └ page_index
  • Number
  • 1
  • 页号
  • └ total_page
  • Number
  • 12
  • 总页数
  • └ success
  • Boolean
  • true
  • 是否成功
  • └ page_size
  • Number
  • 20
  • 每页大小
  • └ error_code
  • String
  • PARAMS_INVALID
  • 错误码
  • └ total_count
  • Number
  • 115
  • 总条数
  • body
  • InventorySnapshotItem []
  • 数据列表
  • └ stat_date
  • String
  • 20250801
  • 库存日期
  • └ store_code
  • String
  • STORE_12093254
  • 仓库编号
  • └ store_name
  • String
  • 广交物流黄埔医药物流中心
  • 仓库名称
  • └ company_name
  • String
  • 阿里健康大药房医药连锁有限公司
  • 公司主体
  • └ sc_item_id
  • String
  • 612284885084
  • 货品ID
  • └ bar_code
  • String
  • 80021120105008
  • 货品条码
  • └ sc_item_name
  • String
  • 曲莱 曲莱/Trileptal 奥卡西平片 0.15g*50片/盒 标准装
  • 货品名称
  • └ spec
  • String
  • 0.15g*50片/盒
  • 货品规格
  • └ basic_unit
  • String
  • 基本单位
  • └ total_qty
  • Number
  • 20
  • 库存数量
  • └ in_trans_qty
  • Number
  • 0
  • 调拨在途(30天内的调拨在途数量)
  • └ factory_name
  • String
  • Novartis Farma S.p.A/北京诺华制药有限公司分装
  • 生产厂家
  • └ brand_id
  • String
  • 6709552
  • 品牌ID
  • └ brand_name
  • String
  • 曲莱
  • 品牌名称
  • └ approval_number
  • String
  • 国药准字HJ20171030(原国药准字J20171081
  • 批准文号
  • └ error_msg
  • String
  • 查询日期不能为空
  • 错误描述

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaAlihealthBrandLsInventoryQueryRequest req = new AlibabaAlihealthBrandLsInventoryQueryRequest();
AlibabaAlihealthBrandLsInventoryQueryRequest.DdiQueryRequest obj1 = new AlibabaAlihealthBrandLsInventoryQueryRequest.DdiQueryRequest();
obj1.setStatDay("20250801");
obj1.setItemIds(" "612284885084"");
obj1.setCompanyName("阿里健康大药房医药连锁有限公司");
obj1.setPageSize(20L);
obj1.setBrandIds(" "6709552"");
obj1.setPageNum(1L);
req.setDdiQueryRequest(obj1);
AlibabaAlihealthBrandLsInventoryQueryResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alibaba_alihealth_brand_ls_inventory_query_response>
    <result>
        <is_retry>false</is_retry>
        <page_index>1</page_index>
        <total_page>12</total_page>
        <success>true</success>
        <page_size>20</page_size>
        <error_code>PARAMS_INVALID</error_code>
        <total_count>115</total_count>
        <body>
            <inventory_snapshot_item>
                <stat_date>20250801</stat_date>
                <store_code>STORE_12093254</store_code>
                <store_name>广交物流黄埔医药物流中心</store_name>
                <company_name>阿里健康大药房医药连锁有限公司</company_name>
                <sc_item_id>612284885084</sc_item_id>
                <bar_code>80021120105008</bar_code>
                <sc_item_name>曲莱 曲莱/Trileptal 奥卡西平片 0.15g*50片/盒 标准装</sc_item_name>
                <spec>0.15g*50片/盒</spec>
                <basic_unit>盒</basic_unit>
                <total_qty>20</total_qty>
                <in_trans_qty>0</in_trans_qty>
                <factory_name>Novartis Farma S.p.A/北京诺华制药有限公司分装</factory_name>
                <brand_id>6709552</brand_id>
                <brand_name>曲莱</brand_name>
                <approval_number>国药准字HJ20171030(原国药准字J20171081</approval_number>
            </inventory_snapshot_item>
        </body>
        <error_msg>查询日期不能为空</error_msg>
    </result>
</alibaba_alihealth_brand_ls_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

返回
顶部