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

alibaba.alihealth.brand.inventory.query (鹿透社进销存库存数据)

进销存库存按日查询

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
param BrandPurchaseSaleStockReq 必须 系统自动生成
  • └ brand_key
  • String
  • 必须
  • GSK
  • 品牌标识
  • └ cycle_type
  • String
  • 必须
  • day
  • 周期:day, month
  • └ month
  • String
  • 可选
  • 2020-01
  • 当cycleType为month时,传参 "2020-01"。
  • └ day
  • String
  • 可选
  • 2020-01-01
  • 当cycleType为day时,传参 "2020-01-01"。
  • └ page_size
  • Number
  • 必须
  • 1
  • 页号
  • └ page_num
  • Number
  • 必须
  • 20
  • 页大小
  • └ merchant_code
  • String
  • 必须
  • healthy
  • 店铺编码: 阿里健康海外店 ahcs 阿里健康大药房 healthy 杭州易心堂大药房 alijkrx

响应参数

名称 类型 示例值 描述
result PagedResult 返回的翻页信息
  • data_list
  • BrandPurchaseSaleStockRes []
  • 数据列表
  • └ quantity
  • Number
  • 1
  • 总库存
  • └ bad_quantity
  • Number
  • 1
  • 残品库存
  • └ item_id
  • Number
  • 212
  • 货品ID
  • └ good_quantity
  • Number
  • 1
  • 良品库存
  • └ bar_code
  • String
  • 1234
  • 条形码,多个的时候用#分开
  • └ item_name
  • String
  • test
  • 货品名称
  • └ brand_id
  • String
  • 12
  • 品牌ID
  • └ manufacturer
  • String
  • 法国GlaxoWellcomeProduction
  • 生产厂家
  • └ sc_itm_desc
  • String
  • 50ug#3B250ug*60泡/盒
  • 货品规格描述
  • └ merchant_code
  • String
  • healthy
  • 商家编码
  • └ company_name
  • String
  • 阿里健康大药房
  • 健康主体公司名称
  • └ basic_unit
  • String
  • 销售单位
  • └ error_message
  • String
  • error
  • 错误信息
  • └ success
  • Boolean
  • true
  • 是否成功
  • └ total_count
  • Number
  • 12
  • 总条数
  • └ page_index
  • Number
  • 1
  • 页号
  • └ total_page
  • Number
  • 1
  • 总页数
  • └ error_code
  • String
  • 500
  • 错误码
  • └ current_page
  • Number
  • 1
  • 当前页
  • └ page_size
  • Number
  • 20
  • 页大小
  • └ error_detail_msg
  • String
  • error msg
  • 错误详细信息

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaAlihealthBrandInventoryQueryRequest req = new AlibabaAlihealthBrandInventoryQueryRequest();
AlibabaAlihealthBrandInventoryQueryRequest.BrandPurchaseSaleStockReq obj1 = new AlibabaAlihealthBrandInventoryQueryRequest.BrandPurchaseSaleStockReq();
obj1.setBrandKey("GSK");
obj1.setCycleType("day");
obj1.setMonth("2020-01");
obj1.setDay("2020-01-01");
obj1.setPageSize(1L);
obj1.setPageNum(20L);
obj1.setMerchantCode("healthy");
req.setParam(obj1);
AlibabaAlihealthBrandInventoryQueryResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alibaba_alihealth_brand_inventory_query_response>
    <result>
        <data_list>
            <brand_purchase_sale_stock_res>
                <quantity>1</quantity>
                <bad_quantity>1</bad_quantity>
                <item_id>212</item_id>
                <good_quantity>1</good_quantity>
                <bar_code>1234</bar_code>
                <item_name>test</item_name>
                <brand_id>12</brand_id>
                <manufacturer>法国GlaxoWellcomeProduction</manufacturer>
                <sc_itm_desc>50ug#3B250ug*60泡/盒</sc_itm_desc>
                <merchant_code>healthy</merchant_code>
                <company_name>阿里健康大药房</company_name>
                <basic_unit>盒</basic_unit>
            </brand_purchase_sale_stock_res>
        </data_list>
        <error_message>error</error_message>
        <success>true</success>
        <total_count>12</total_count>
        <page_index>1</page_index>
        <total_page>1</total_page>
        <error_code>500</error_code>
        <current_page>1</current_page>
        <page_size>20</page_size>
        <error_detail_msg>error msg</error_detail_msg>
    </result>
</alibaba_alihealth_brand_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

返回
顶部