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

alibaba.alihealth.drugcode.scan (查询扫码信息)

查询扫码信息

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
code String 必须 88298420000560224025 20位码
query_app_name String 必须 alipay 渠道
client_id String 可选 192.168.0.1 用户ip
device_utdid String 可选 xxxxxx 设备标识
user_id String 可选 uid 用户ID

响应参数

名称 类型 示例值 描述
result TopResultModel 和三方交互最外层model对象
  • model
  • DrugInfoDto
  • 返回对象
  • └ code
  • String
  • 88298420000560224025
  • 20位码
  • └ drug_name
  • String
  • 药品通用名
  • └ specifications
  • String
  • 制剂规格
  • └ sub_ret_code
  • String
  • 11:没有申请过此码 12:后四位检验不对 13:没激活过
  • └ ret_code
  • String
  • 状态码 0:正常 -1:未知异常 1:有原因的异常 见subretcode
  • └ prepn_type
  • String
  • 剂型
  • └ pkg_spec
  • String
  • 包装规格
  • └ query_total_count
  • Number
  • 查询次数(用户维度)
  • └ production_batch
  • String
  • 批次
  • └ query_count
  • String
  • 扫码次数
  • └ msg_info
  • String
  • demo
  • 操作说明
  • └ msg_code
  • String
  • 1000
  • 操作码

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaAlihealthDrugcodeScanRequest req = new AlibabaAlihealthDrugcodeScanRequest();
req.setCode("88298420000560224025");
req.setQueryAppName("alipay");
req.setClientId("192.168.0.1");
req.setDeviceUtdid("xxxxxx");
req.setUserId("uid");
AlibabaAlihealthDrugcodeScanResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alibaba_alihealth_drugcode_scan_response>
    <result>
        <model>
            <code>88298420000560224025</code>
            <drug_name></drug_name>
            <specifications></specifications>
            <sub_ret_code></sub_ret_code>
            <ret_code></ret_code>
            <prepn_type></prepn_type>
            <pkg_spec></pkg_spec>
            <query_total_count></query_total_count>
            <production_batch></production_batch>
            <query_count></query_count>
        </model>
        <msg_info>demo</msg_info>
        <msg_code>1000</msg_code>
    </result>
</alibaba_alihealth_drugcode_scan_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

返回
顶部