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

alibaba.alihealth.drug.scc.bill.detail (协同单据明细查询)

查询一个协同单据的明细信息

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
ref_ent_id String 必须 123 refEntId
bill_code String 必须 单据号 单据号
license_token String 必须 1234567 获取licenseToken,通过alibaba.alihealth.drug.scc.getlicense
upload_ref_user_id String 必须 单据上传人refUserId 单据上传人refUserId

响应参数

名称 类型 示例值 描述
result ResultModel 返回结果
  • └ response_success
  • Boolean
  • SUCCESS
  • 成功失败
  • model
  • SccBillShowResponseDTO
  • 返回对象
  • └ bill_code
  • String
  • 单据号
  • 单据号
  • └ from_user_name
  • String
  • 发货货主单位
  • 发货货主单位
  • └ to_user_name
  • String
  • 收货货主单位
  • 收货货主单位
  • └ mod_date
  • String
  • modDate
  • 单据更新时间
  • └ bill_type
  • String
  • 单据类型
  • 单据类型
  • └ from_assed_user_name
  • String
  • 发货方委托的企业名称
  • 发货方委托的企业名称
  • └ to_assed_user_name
  • String
  • 受收货方委托的企业名称
  • 受收货方委托的企业名称
  • └ up_material_total
  • String
  • 上游资料总数
  • 上游资料总数
  • └ up_material_send
  • String
  • 上游已发送资料
  • 上游已发送资料
  • └ up_material_un_send
  • String
  • 上游未发送资料
  • 上游未发送资料
  • └ down_material_sign
  • String
  • 下游资料签收数
  • 下游资料签收数
  • └ down_material_un_sign
  • String
  • 下游资料未签收数
  • 下游资料未签收数
  • └ down_material_reject
  • String
  • 下游资料拒收数
  • 下游资料拒收数
  • scc_bill_detail_show_response_dto_list
  • SccBillDetailShowResponseDTO []
  • 明细单信息
  • └ bill_detail_code
  • String
  • 单据明细编号
  • 单据明细编号
  • └ exception_code_count
  • String
  • 异常码数量
  • 异常码数量
  • └ produce_batch_no
  • String
  • 产品批号
  • 产品批号
  • └ drug_info
  • String
  • 药品名称
  • 药品名称
  • └ sale_count
  • String
  • 销售数量
  • 销售数量
  • └ drug_ent_base_info_id
  • String
  • 123
  • 药品id
  • └ up_bill_detail_code
  • String
  • 001
  • 上游单据明细编码
  • └ product_no
  • String
  • 000012
  • 产品编码
  • └ product_name
  • String
  • 感冒通
  • 产品名称
  • └ produce_date
  • Date
  • 2024-01-01 12:00:30
  • 生产日期
  • └ exprie_date
  • String
  • 20280331
  • 有效期至
  • └ exprie_month_flag
  • String
  • 1
  • 有效期到月标记 0不到月 1到月
  • └ produce_ent_name
  • String
  • 北京测试生产企业
  • 产品生产厂家
  • └ mah_ent_name
  • String
  • 北京测试生产企业
  • 上市许可持有人名称
  • └ pkg_spec
  • String
  • 5支每盒
  • 包装规格
  • └ prod_code
  • String
  • 9888
  • 产品条码,产品的69码
  • └ yb_drug_code
  • String
  • 972463451
  • 医保编码
  • └ sale_unit
  • String
  • 销售单位
  • └ unit_price
  • String
  • 23.4
  • 单价
  • └ all_price
  • String
  • 460030.08
  • 总价金额
  • └ invoice_no
  • String
  • 835430
  • 发票号
  • └ invoice_all_price
  • String
  • 460030.09
  • 发票号的总金额
  • └ up_bill_code
  • String
  • 123A
  • 上游单据编码
  • └ trans_flag
  • String
  • 1
  • 是否根据码生成追溯系统单据 0或者空:否 1:是
  • └ code_pkg_ratio
  • Number
  • 10
  • 包装大小(件装量)
  • └ transport_bill_code_list
  • String []
  • 关联的配送单
  • scc_bill_detail_code_show_response_dto_list
  • CodeInfoShowDTO []
  • 码明细
  • └ code
  • String
  • 815555
  • 追溯码
  • └ bill_detail_code
  • String
  • 1234
  • 单据明细编号
  • └ exception_flag
  • String
  • 1
  • 1:存在异常
  • └ exception_message
  • String
  • 正常
  • 具体异常原因:11:存在未激;活的码;2:存在未通过码制校验的码;3:存在重复的码;4:存在注销的码;5:存在注销的码;6:存在注销的码;7:存在注销的码
  • └ drug_info
  • String
  • 1
  • 药品信息
  • └ mah_name
  • String
  • 测试企业
  • 药品的mah
  • └ pkg_spec
  • String
  • 包装规格
  • └ produce_name
  • String
  • 生产厂商
  • 生产厂商
  • batch_no_inner_dto_list
  • BatchNoDTO []
  • 码的批次信息
  • └ exprie_date
  • String
  • 20250731
  • 有效期至
  • └ min_code_count
  • Number
  • 1
  • 最小码数量
  • └ pkg_level
  • Number
  • 1
  • 码包装层级,1代表最小包装。如:申请的包装比例是1:5:10, 对应的包装等级就是 3、2、1,代表大包装、中包装、小包装
  • └ produce_batch_no
  • String
  • 产品批号
  • 产品批号
  • └ produce_date
  • Date
  • 2025-07-01 00:00:00
  • 生产日期
  • └ pkg_ratio
  • String
  • 包装比例
  • 包装比例
  • └ drug_ent_base_info_id
  • String
  • 123
  • 药品id
  • └ ref_ent_id
  • String
  • cb14553ed7654ff586b87b637ba23e2c
  • 单据所有者
  • └ version
  • Number
  • 1
  • 版本号
  • └ bill_time
  • Date
  • 2025-05-01 00:09:08
  • 单据时间
  • └ from_ref_ent_id
  • String
  • cb14553ed7654ff586b87b637ba23e2c
  • 发货企业RefEntId
  • └ to_ref_ent_id
  • String
  • 62d67415e4b05691cc769cb4
  • 收货企业refEntId
  • └ from_par_id
  • String
  • 0003
  • 发货货主单位自定义编码
  • └ from_par_name
  • String
  • 北京测试
  • 发货货主单位自定义名称
  • └ from_assed_ref_ent_id
  • String
  • 62d67415e4b05691cc769cb4
  • 受发货方委托的物流企业的ref_ent_id
  • └ from_assed_par_id
  • String
  • 002
  • 受发货方委托的物流企业的自定义编码
  • └ from_assed_par_name
  • String
  • 辽宁测试物流
  • 受发货方委托的物流企业的自定义名称
  • └ from_warehouse_no
  • String
  • 001A
  • 发货方仓库编号
  • └ to_assed_ref_ent_id
  • String
  • 320000000000127970
  • 受收货方委托的物流企业的ref_ent_id
  • └ from_warehouse_name
  • String
  • 北京仓
  • 发货方仓库名称
  • └ original_bill_code
  • String
  • 003
  • 原指令单据号,用于受委托企业上传单据绑定指令单据
  • └ from_business_depart
  • String
  • 销售部
  • 发货方业务部门
  • └ to_person
  • String
  • 张三
  • 收货人
  • └ encry_type
  • String
  • 0
  • 加密方式
  • └ to_par_name
  • String
  • 北京测试
  • 收货企业自定义名称
  • └ to_assed_par_name
  • String
  • 上海测试
  • 受收货方委托的物流企业的自定义名称
  • └ from_warehouse_address
  • String
  • 北京大兴
  • 发货方仓库地址
  • └ from_bill_code
  • String
  • 00004B
  • 发货单编号
  • └ to_warehouse_name
  • String
  • 辽宁2仓
  • 收货方仓库名称
  • └ to_par_id
  • String
  • 0009N
  • 收货货主单位自定义编码
  • └ to_warehouse_no
  • String
  • 0009D
  • 收货方仓库编号
  • └ to_assed_par_id
  • String
  • 0008D
  • 受收货方委托的物流企业的自定义编码
  • └ to_tel
  • String
  • 15809090909
  • 收货方电话
  • └ order_code
  • String
  • hh887
  • 订货单编号
  • └ from_business_person
  • String
  • 张三
  • 发货方业务人员
  • └ to_warehouse_address
  • String
  • 武汉1仓
  • 收货方仓库地址
  • └ oper_ic_code
  • String
  • 210000234
  • 单据提交者(调用接口时的appkey编号)
  • └ oper_ic_name
  • String
  • 张三
  • 单据提交者姓名(出入库单上传人的名子)
  • └ remarks
  • String
  • 备注123
  • 备注
  • └ msg_info
  • String
  • 成功失败信息
  • 成功失败信息
  • └ msg_code
  • String
  • 成功失败信息
  • 成功失败信息
  • └ sub_msg_code
  • String
  • SUCCESS
  • 返回子码
  • └ operation
  • String
  • 无后续操作
  • 后续操作

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaAlihealthDrugSccBillDetailRequest req = new AlibabaAlihealthDrugSccBillDetailRequest();
req.setRefEntId("123");
req.setBillCode("单据号");
req.setLicenseToken("1234567");
req.setUploadRefUserId("单据上传人refUserId");
AlibabaAlihealthDrugSccBillDetailResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alibaba_alihealth_drug_scc_bill_detail_response>
    <result>
        <response_success>SUCCESS</response_success>
        <model>
            <bill_code>单据号</bill_code>
            <from_user_name>发货货主单位</from_user_name>
            <to_user_name>收货货主单位</to_user_name>
            <mod_date>modDate</mod_date>
            <bill_type>单据类型</bill_type>
            <from_assed_user_name>发货方委托的企业名称</from_assed_user_name>
            <to_assed_user_name>受收货方委托的企业名称</to_assed_user_name>
            <up_material_total>上游资料总数</up_material_total>
            <up_material_send>上游已发送资料</up_material_send>
            <up_material_un_send>上游未发送资料</up_material_un_send>
            <down_material_sign>下游资料签收数</down_material_sign>
            <down_material_un_sign>下游资料未签收数</down_material_un_sign>
            <down_material_reject>下游资料拒收数</down_material_reject>
            <scc_bill_detail_show_response_dto_list>
                <scc_bill_detail_show_response_d_t_o>
                    <bill_detail_code>单据明细编号</bill_detail_code>
                    <exception_code_count>异常码数量</exception_code_count>
                    <produce_batch_no>产品批号</produce_batch_no>
                    <drug_info>药品名称</drug_info>
                    <sale_count>销售数量</sale_count>
                    <drug_ent_base_info_id>123</drug_ent_base_info_id>
                    <up_bill_detail_code>001</up_bill_detail_code>
                    <product_no>000012</product_no>
                    <product_name>感冒通</product_name>
                    <produce_date>2024-01-01 12:00:30</produce_date>
                    <exprie_date>20280331</exprie_date>
                    <exprie_month_flag>1</exprie_month_flag>
                    <produce_ent_name>北京测试生产企业</produce_ent_name>
                    <mah_ent_name>北京测试生产企业</mah_ent_name>
                    <pkg_spec>5支每盒</pkg_spec>
                    <prod_code>9888</prod_code>
                    <yb_drug_code>972463451</yb_drug_code>
                    <sale_unit>盒</sale_unit>
                    <unit_price>23.4</unit_price>
                    <all_price>460030.08</all_price>
                    <invoice_no>835430</invoice_no>
                    <invoice_all_price>460030.09</invoice_all_price>
                    <up_bill_code>123A</up_bill_code>
                    <trans_flag>1</trans_flag>
                    <code_pkg_ratio>10</code_pkg_ratio>
                </scc_bill_detail_show_response_d_t_o>
            </scc_bill_detail_show_response_dto_list>
            <scc_bill_detail_code_show_response_dto_list>
                <code_info_show_d_t_o>
                    <code>815555</code>
                    <bill_detail_code>1234</bill_detail_code>
                    <exception_flag>1</exception_flag>
                    <exception_message>正常</exception_message>
                    <drug_info>1</drug_info>
                    <mah_name>测试企业</mah_name>
                    <pkg_spec>盒</pkg_spec>
                    <produce_name>生产厂商</produce_name>
                    <batch_no_inner_dto_list>
                        <batch_no_d_t_o>
                            <exprie_date>20250731</exprie_date>
                            <min_code_count>1</min_code_count>
                            <pkg_level>1</pkg_level>
                            <produce_batch_no>产品批号</produce_batch_no>
                            <produce_date>2025-07-01 00:00:00</produce_date>
                            <pkg_ratio>包装比例</pkg_ratio>
                        </batch_no_d_t_o>
                    </batch_no_inner_dto_list>
                    <drug_ent_base_info_id>123</drug_ent_base_info_id>
                </code_info_show_d_t_o>
            </scc_bill_detail_code_show_response_dto_list>
            <ref_ent_id>cb14553ed7654ff586b87b637ba23e2c</ref_ent_id>
            <version>1</version>
            <bill_time>2025-05-01 00:09:08</bill_time>
            <from_ref_ent_id>cb14553ed7654ff586b87b637ba23e2c</from_ref_ent_id>
            <to_ref_ent_id>62d67415e4b05691cc769cb4</to_ref_ent_id>
            <from_par_id>0003</from_par_id>
            <from_par_name>北京测试</from_par_name>
            <from_assed_ref_ent_id>62d67415e4b05691cc769cb4</from_assed_ref_ent_id>
            <from_assed_par_id>002</from_assed_par_id>
            <from_assed_par_name>辽宁测试物流</from_assed_par_name>
            <from_warehouse_no>001A</from_warehouse_no>
            <to_assed_ref_ent_id>320000000000127970</to_assed_ref_ent_id>
            <from_warehouse_name>北京仓</from_warehouse_name>
            <original_bill_code>003</original_bill_code>
            <from_business_depart>销售部</from_business_depart>
            <to_person>张三</to_person>
            <encry_type>0</encry_type>
            <to_par_name>北京测试</to_par_name>
            <to_assed_par_name>上海测试</to_assed_par_name>
            <from_warehouse_address>北京大兴</from_warehouse_address>
            <from_bill_code>00004B</from_bill_code>
            <to_warehouse_name>辽宁2仓</to_warehouse_name>
            <to_par_id>0009N</to_par_id>
            <to_warehouse_no>0009D</to_warehouse_no>
            <to_assed_par_id>0008D</to_assed_par_id>
            <to_tel>15809090909</to_tel>
            <order_code>hh887</order_code>
            <from_business_person>张三</from_business_person>
            <to_warehouse_address>武汉1仓</to_warehouse_address>
            <oper_ic_code>210000234</oper_ic_code>
            <oper_ic_name>张三</oper_ic_name>
            <remarks>备注123</remarks>
        </model>
        <msg_info>成功失败信息</msg_info>
        <msg_code>成功失败信息</msg_code>
        <sub_msg_code>SUCCESS</sub_msg_code>
        <operation>无后续操作</operation>
    </result>
</alibaba_alihealth_drug_scc_bill_detail_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

返回
顶部