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

alibaba.alihealth.drug.code.zsmyp.barcode.query (根据追溯码以及药品ID查询前7位标识码以及条形码)

根据追溯码以及药品ID查询前7位标识码以及条形码

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
ref_ent_id String 必须 cb43533 调用接口的企业id标识
code String 可选 8033 码上放心平台追溯码(和药品id任选一个就行)
drug_id String 可选 45af23 如果drugid有值,会按照drugid查询,会忽略code

响应参数

名称 类型 示例值 描述
result ResultModel 返回值
  • └ response_success
  • Boolean
  • true
  • 是否响应成功
  • model
  • DrugBarcodeInfoDTO
  • 返回信息
  • └ code_prefix_seven_list
  • String []
  • 码的前7位的集合
  • └ barcode
  • String
  • 291023
  • 条形码,如果条形码为空,则返回空
  • └ msg_info
  • String
  • 调用成功
  • 状态值
  • └ msg_code
  • String
  • SUCCESS
  • 状态码

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaAlihealthDrugCodeZsmypBarcodeQueryRequest req = new AlibabaAlihealthDrugCodeZsmypBarcodeQueryRequest();
req.setRefEntId("cb43533");
req.setCode("8033");
req.setDrugId("45af23");
AlibabaAlihealthDrugCodeZsmypBarcodeQueryResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alibaba_alihealth_drug_code_zsmyp_barcode_query_response>
    <result>
        <response_success>true</response_success>
        <model>
            <barcode>291023</barcode>
        </model>
        <msg_info>调用成功</msg_info>
        <msg_code>SUCCESS</msg_code>
    </result>
</alibaba_alihealth_drug_code_zsmyp_barcode_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

返回
顶部