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

alibaba.alihealth.bc.item.period.sync (代销品效期同步)

代销品效期同步

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
validity_period_sync_req_dto ValidityPeriodSyncReqDTO 可选 请求体
  • └ supplier_id
  • Number
  • 必须
  • 111
  • 供应商ID
  • items
  • ValidityPeriodItem []
  • 必须
  • [{"sub_items":[{"produce_date":"2020-11-01","quantity":10,"expire_date":"2023-11-01","produce_no":"10001"}],"sc_item_name":"货品123","sc_item_id":"123","barcode":"123","manufacturer":"某某制药","approval_number":"国药准字Z123","specification":"5支/盒"}]
  • 请求明细
  • └ sc_item_name
  • String
  • 可选
  • 货品123
  • 货品名称
  • sub_items
  • ValidityPeriodSubItem []
  • 必须
  • [{ "produce_date": "2020-11-01", "quantity": 10, "expire_date": "2023-11-01", "produce_no": "10001" }]
  • 请求子明细
  • └ produce_date
  • String
  • 必须
  • 2020-11-01
  • 生产日期
  • └ quantity
  • Number
  • 必须
  • 10
  • 数量
  • └ expire_date
  • String
  • 必须
  • 2023-11-01
  • 失效日期
  • └ produce_no
  • String
  • 必须
  • 1001
  • 生产批号
  • └ specification
  • String
  • 必须
  • 5支/盒
  • 规格
  • └ sc_item_id
  • Number
  • 必须
  • 123
  • 货品ID
  • └ approval_number
  • String
  • 必须
  • 国药准字Z123
  • 批准文号
  • └ barcode
  • String
  • 必须
  • 123
  • 条码
  • └ manufacturer
  • String
  • 必须
  • 某某制药
  • 生产企业
  • └ store_code
  • String
  • 必须
  • ABC123
  • 仓库编码

响应参数

名称 类型 示例值 描述
trace_id String 123 链路跟踪id, 用于排查问题
can_retry Boolean false 请求是否可重试
succ Boolean true 当前请求是否成功-所有明细都成功才算成功
error_no String ALIHEALTH.BC.4000 错误编码, 编码以"ALIHEALTH.BC.5"开头时表示当前品仓的操作处于未知状态, 后继可通过同样的请求流水号来获取最终结果
error_msg String 系统异常 错误描述

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaAlihealthBcItemPeriodSyncRequest req = new AlibabaAlihealthBcItemPeriodSyncRequest();
AlibabaAlihealthBcItemPeriodSyncRequest.ValidityPeriodSyncReqDTO obj1 = new AlibabaAlihealthBcItemPeriodSyncRequest.ValidityPeriodSyncReqDTO();
obj1.setSupplierId(111L);
List<AlibabaAlihealthBcItemPeriodSyncRequest.ValidityPeriodItem> list3 = new ArrayList<AlibabaAlihealthBcItemPeriodSyncRequest.ValidityPeriodItem>();
AlibabaAlihealthBcItemPeriodSyncRequest.ValidityPeriodItem obj4 = new AlibabaAlihealthBcItemPeriodSyncRequest.ValidityPeriodItem();
list3.add(obj4);
obj4.setScItemName("货品123");
List<AlibabaAlihealthBcItemPeriodSyncRequest.ValidityPeriodSubItem> list7 = new ArrayList<AlibabaAlihealthBcItemPeriodSyncRequest.ValidityPeriodSubItem>();
AlibabaAlihealthBcItemPeriodSyncRequest.ValidityPeriodSubItem obj8 = new AlibabaAlihealthBcItemPeriodSyncRequest.ValidityPeriodSubItem();
list7.add(obj8);
obj8.setProduceDate("2020-11-01");
obj8.setQuantity(10L);
obj8.setExpireDate("2023-11-01");
obj8.setProduceNo("1001");
list5.setSubItems(list7);
obj4.setSpecification("5支/盒");
obj4.setScItemId(123L);
obj4.setApprovalNumber("国药准字Z123");
obj4.setBarcode("123");
obj4.setManufacturer("某某制药");
obj1.setItems(list3);
obj1.setStoreCode("ABC123");
req.setValidityPeriodSyncReqDto(obj1);
AlibabaAlihealthBcItemPeriodSyncResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alibaba_alihealth_bc_item_period_sync_response>
    <trace_id>123</trace_id>
    <can_retry>false</can_retry>
    <succ>true</succ>
    <error_no>ALIHEALTH.BC.4000</error_no>
    <error_msg>系统异常</error_msg>
</alibaba_alihealth_bc_item_period_sync_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

返回
顶部