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

alibaba.alihealth.drug.kyt.uploadinsign (仓库批量扫码回传接口)

连锁总部仓库在采购入库或者销售出库环节,批量采集追溯码之后回传到码上放心平台。

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
bill_code String 必须 BC000_1234 单据编号(小于20位字符串,唯一)
bill_time Date 必须 2018-12-02 02:21:21 单据生成时间
ref_user_id String 必须 320000000000127971 码上放心平台企业编码(仓库所有者)
warehouse_id String 可选 W001 仓库名称(企业自定义)
drug_id String 可选 D001 药品ID
trace_codes String 必须 81012350000000157474 追溯码[多个时用逗号分开]
ignore_part_success_flag String 可选 0 码解析策略,1代表整单解析成功(任一码解析失败,上传时整单返回错误),传其他值或者不传代表部分解析成功(跳过无法解析的码,其余正常处理并上传)

响应参数

名称 类型 示例值 描述
model String 00f98eb3353a4e2b947a6aafcc46ef79 返回值
msg_code String SUCCESS 返回编码(BILL_DECODE_ERROR 单据转码失败 BILL_FILE_NAME_DUPLICATE_UPLOAD 文件名重复)
msg_info String 调用成功 返回信息
response_success Boolean true 是否成功(true 成功 false 失败)
sub_msg_code String xx 错误信息明细,便于后续操作
operation_info_map OperationInfoMap {"3":"86443150000000180533,86443160000000568910,84312420000002824318","6":"84312420000002824318(下级);86443160000000568910(上级),86443160000000568910(下级);86443150000000180533(上级)"} json,key是错误类型编码,value是具体得信息,详细参考文档
  • └ code_check_error_info
  • String
  • {"3":"86443150000000180533,86443160000000568910,84312420000002824318","6":"84312420000002824318(下级);86443160000000568910(上级),86443160000000568910(下级);86443150000000180533(上级)"}
  • json,key是错误类型编码,value是具体得信息,详细参考文档

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaAlihealthDrugKytUploadinsignRequest req = new AlibabaAlihealthDrugKytUploadinsignRequest();
req.setBillCode("BC000_1234");
req.setBillTime(StringUtils.parseDateTime("2018-12-02 02:21:21"));
req.setRefUserId("320000000000127971");
req.setWarehouseId("W001");
req.setDrugId("D001");
req.setTraceCodes("81012350000000157474");
req.setIgnorePartSuccessFlag("0");
AlibabaAlihealthDrugKytUploadinsignResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alibaba_alihealth_drug_kyt_uploadinsign_response>
    <model>00f98eb3353a4e2b947a6aafcc46ef79</model>
    <msg_code>SUCCESS</msg_code>
    <msg_info>调用成功</msg_info>
    <response_success>true</response_success>
    <sub_msg_code>xx</sub_msg_code>
    <operation_info_map>
        <code_check_error_info>{&quot;3&quot;:&quot;86443150000000180533,86443160000000568910,84312420000002824318&quot;,&quot;6&quot;:&quot;84312420000002824318(下级);86443160000000568910(上级),86443160000000568910(下级);86443150000000180533(上级)&quot;}</code_check_error_info>
    </operation_info_map>
</alibaba_alihealth_drug_kyt_uploadinsign_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

返回
顶部