电子面单内部应用的云打印取号接口
名称 | 类型 | 是否必须 | 示例值 | 更多限制 | 描述 |
---|---|---|---|---|---|
seller_id | Number | 必须 | 3892269560 | 取号商家id | |
param_waybill_cloud_print_apply_new_request | WaybillCloudPrintApplyNewRequest | 必须 | 入参信息 | ||
|
|||||
param_client_info_for_top | ClientInfoForTopDto | 可选 | 系统自动生成 | ||
|
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
modules | WaybillCloudPrintResponse [] | xx | 系统自动生成 |
|
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret); CainiaoWaybillIiInnerGetRequest req = new CainiaoWaybillIiInnerGetRequest(); req.setSellerId(3892269560L); CainiaoWaybillIiInnerGetRequest.WaybillCloudPrintApplyNewRequest obj1 = new CainiaoWaybillIiInnerGetRequest.WaybillCloudPrintApplyNewRequest(); obj1.setCpCode("POSTB"); obj1.setProductCode("目前已经不推荐使用此字段,请不要使用"); CainiaoWaybillIiInnerGetRequest.UserInfoDto obj2 = new CainiaoWaybillIiInnerGetRequest.UserInfoDto(); CainiaoWaybillIiInnerGetRequest.AddressDto obj3 = new CainiaoWaybillIiInnerGetRequest.AddressDto(); obj3.setCity("北京市"); obj3.setDetail("花家地社区卫生服务站"); obj3.setDistrict("朝阳区"); obj3.setProvince("北京"); obj3.setTown("望京街道"); obj2.setAddress(obj3); obj2.setMobile("1326443654"); obj2.setName("Bar"); obj2.setPhone("057123222"); obj1.setSender(obj2); List<CainiaoWaybillIiInnerGetRequest.TradeOrderInfoDto> list5 = new ArrayList<CainiaoWaybillIiInnerGetRequest.TradeOrderInfoDto>(); CainiaoWaybillIiInnerGetRequest.TradeOrderInfoDto obj6 = new CainiaoWaybillIiInnerGetRequest.TradeOrderInfoDto(); list5.add(obj6); obj6.setLogisticsServices("如不需要特殊服务,该值为空"); obj6.setObjectId("1"); CainiaoWaybillIiInnerGetRequest.OrderInfoDto obj8 = new CainiaoWaybillIiInnerGetRequest.OrderInfoDto(); obj8.setOrderChannelsType("TB"); obj8.setTradeOrderList("1222221"); obj8.setOutTradeOrderList("123456,456789"); obj8.setOutTradeSubOrderList("12,34,56,78"); list7.setOrderInfo(obj8); CainiaoWaybillIiInnerGetRequest.PackageInfoDto obj10 = new CainiaoWaybillIiInnerGetRequest.PackageInfoDto(); obj10.setId("1"); List<CainiaoWaybillIiInnerGetRequest.Item> list12 = new ArrayList<CainiaoWaybillIiInnerGetRequest.Item>(); CainiaoWaybillIiInnerGetRequest.Item obj13 = new CainiaoWaybillIiInnerGetRequest.Item(); list12.add(obj13); obj13.setCount(1L); obj13.setName("衣服"); obj10.setItems(list12); obj10.setVolume(1L); obj10.setWeight(1L); obj10.setTotalPackagesCount(10L); obj10.setPackagingDescription("5纸3木2拖"); obj10.setGoodsDescription("服装"); obj10.setLength(30L); obj10.setWidth(30L); obj10.setHeight(50L); obj10.setGoodValue("34.3"); list9.setPackageInfo(obj10); CainiaoWaybillIiInnerGetRequest.RecipientInfoDto obj15 = new CainiaoWaybillIiInnerGetRequest.RecipientInfoDto(); CainiaoWaybillIiInnerGetRequest.AddressDto obj16 = new CainiaoWaybillIiInnerGetRequest.AddressDto(); obj16.setCity("北京市"); obj16.setDetail("花家地社区卫生服务站"); obj16.setDistrict("朝阳区"); obj16.setProvince("北京"); obj16.setTown("望京街道"); obj15.setAddress(obj16); obj15.setMobile("1326443654"); obj15.setName("Bar"); obj15.setPhone("057123222"); obj15.setOaid("abcdefghijk"); obj15.setTid("1527014522198024829"); obj15.setCaid("As268woscee"); list14.setRecipient(obj15); obj6.setTemplateUrl("http://cloudprint.cainiao.com/template/standard/101"); obj6.setUserId(12L); obj6.setExtraInfo("{\"ttNoDecison\": \"1\"}"); obj1.setTradeOrderInfoDtos(list5); obj1.setStoreCode("553323"); obj1.setResourceCode("DISTRIBUTOR_978324"); obj1.setDmsSorting(false); obj1.setThreePlTiming(false); obj1.setNeedEncrypt(false); obj1.setMultiPackagesShipment(false); obj1.setBrandCode("SF_FOP"); obj1.setExtraInfo("{\"isvClientCode\": \"ab12344\"}"); obj1.setCustomerCode("adb123345"); obj1.setCallDoorPickUp(false); obj1.setDoorPickUpTime("2021-08-07 12:34:30"); obj1.setDoorPickUpEndTime("2021-08-07 12:34:30"); obj1.setShippingBranchCode("ZTO"); req.setParamWaybillCloudPrintApplyNewRequest(obj1); CainiaoWaybillIiInnerGetRequest.ClientInfoForTopDto obj17 = new CainiaoWaybillIiInnerGetRequest.ClientInfoForTopDto(); obj17.setAppName("waybill"); req.setParamClientInfoForTop(obj17); CainiaoWaybillIiInnerGetResponse rsp = client.execute(req); System.out.println(rsp.getBody());
<cainiao_waybill_ii_inner_get_response> <modules> <waybill_cloud_print_response> <object_id>12</object_id> <print_data>{\"data\":{\"recipient\":{\"address\":{\"city\":\"北京市\",\"detail\":\"花家地社区卫生服务站\",\"district\":\"朝阳区\",\"province\":\"北京\",\"town\":\"望京街道\"},\"mobile\":\"1326443654\",\"name\":\"Bar\",\"phone\":\"057123222\"},\"routingInfo\":{\"consolidation\":{},\"origin\":{\"code\":\"POSTB\"},\"sortation\":{\"name\":\"杭州\"}},\"dmsSortingInfo\": {\"siteAreaCode\": \"A2\"},\"sender\":{\"address\":{\"city\":\"北京市\",\"detail\":\"花家地社区卫生服务站\",\"district\":\"朝阳区\",\"province\":\"北京\",\"town\":\"望京街道\"},\"mobile\":\"1326443654\",\"name\":\"Bar\",\"phone\":\"057123222\"},\"shippingOption\":{\"code\":\"COD\",\"services\":{\"SVC-COD\":{\"value\":\"200\"}},\"title\":\"代收货款\"},\"waybillCode\":\"9890000160004\"},\"signature\":\"RSA:hqUkugCY2FFXJK10fRcUE0TsvDppxXuBdOEnPVntF3u4H2yaYiPsPXqjdI1C5oXs60vVCfqd8YC6vZx57TnN9/u0VYM/TiFmMtxix9ouPQ2p7G64UyX9BrnRQQCp5ETqJogSzIpxVlz5rx3hy19C+VQrqWgQEw5JqOkoBFXhMi8\u003d\",\"templateURL\":\"http://cloudprint.cainiao.com/cloudprint/template/getStandardTemplate.json?template_id\u003d1001\"}</print_data> <waybill_code>9890000160004</waybill_code> <parent_waybill_code>9890000160004</parent_waybill_code> <extra_info>{"remark": ""}</extra_info> <real_cp_code>STO</real_cp_code> <cp_code>STO</cp_code> </waybill_cloud_print_response> </modules> </cainiao_waybill_ii_inner_get_response>
<error_response> <code>50</code> <msg>Remote service error</msg> <sub_code>isv.invalid-parameter</sub_code> <sub_msg>非法参数</sub_msg> </error_response>
错误码 | 错误描述 | 解决方案 |
---|---|---|
isp.WAYBILL_APPLY_NEW_ERROR | 生成面单号出现未知异常 | 重试或联系电子面单技术支持 |
waybill account not enough | 账户余额不足 | 请联系快递网点充值 |
shipping address cannot match any service | 发货地址没有匹配的电子面单服务 | 请检查取号时的发货地址是否商家订购的地址,可通过订购关系查询接口获取 |
phone of consignee too long | 字段长度超过限制 | 请参见白皮书字段长度限制 |
province of consigneeAddress can not be null | 必选字段不能为空 | 请检查代码 |
mobile of consignee too long | 字段长度超过限制 | 请参见白皮书字段长度限制 |
package item count must be greate than zero | 物品个数必须大于0 | 请检查代码 |
consignee_address_area_too_long | 字段长度超过限制 | 请参见白皮书字段长度限制 |
consigneePhone and consigneeMobile can not be both null | 必选字段不能为空,收件人电话和收件人手机至少要有一个。 | 请检查代码 |
detail consigneeAddress can not be null | 必选字段不能为空 | 请检查代码 |
sendPhone and sendMobile can not be both null | 必选字段不能为空 | 请检查代码 |
trade order can not apply mutil branch account | 商家请求参数非法,同一个交易订单不能申请多个网点的面单 | 检查参数是否错误,或取消操作 |
name of consignee can not be null | 必选字段不能为空 | 请检查代码 |
trade item into can not be null | 必选字段不能为空 | 请检查代码 |
subscribe service not found | 面单订购服务不存在 | 确认是否已订购,已订购请联系菜鸟排查 |
request bizOrderCode has cross for exist! | 商家请求参数错误,申请的交易订单和已经存在的交易订单号存在交叉 | 检查入参是否错误 |
trade order can not duplicate | 订单号出现重复 | 检查入参 |
trade item name too long | 商品名称太长(最长128) | 检查入参的商品名称长度,缩减长度 |
package item name can not be null | 必选字段不能为空 | 请检查代码 |
templateURL error | 模板URL格式错误 | 检查入参的云打印模板URL是否合法 |
sendName can not be null | 必选字段不能为空 | 请检查代码 |
consignee_address_city_too_long | 收货地址城市信息过长(最长20) | 检查参数中收货人城市信息长度,缩减长度 |
object Id duplicate | object id 不能重复 | 检查入参是否错误 |
trade order code too long | 商家请求参数非法,交易订单号太长(最长为40) | 检查入参是否错误 |
trade order code has non-ascii char | 商家请求参数非法,交易订单号包含非ASCII字符 | 检查参数是否错误 |
name of consignee too long | 收货人姓名长度超过限制(最长40) | 检查参数中收货人姓名长度,缩减长度 |
consignee_address_province_too_long | 收货地址省份信息过长(最长20) | 检查参数中收货人省份信息长度,缩减长度 |
service description not found | 找不到服务描述 | 入参的product_code字段请不要传任何值 |
province of shippingAddress can not be null | 必选字段不能为空 | 请检查代码 |
consignee address too long | 收货地址长度太长 | 请减少收货详细地址长度 |
package_id has non-ascii char | ERP订单号/包裹号包含非ASCII字符 | 检查入参 |
trade order code can not be null | 必选字段不能为空 | 请检查代码 |
mobile of send too long | 发件人手机号长度超过限制(最大长度20) | 检查入参中发件人的手机号是否错误 |
templateURL host error | 模板URL错误,需要菜鸟域名 | 检查入参 |
phone of send too long | 发件人固话长度超过限制(最长20) | 检查参数中收货人固话长度,缩减长度 |
objectId can not be null | 必选字段不能为空 | 请检查代码 |
consignee_address_town_too_long | 收货地址城镇信息过长(最长30) | 检查参数中收货人城镇信息长度,缩减长度 |
consignee_address_detail_too_long | 收货地址详细地址信息过长 | 减少详细地址长度 |
package_id too long | ERP订单号/包裹号太长 | PackageId长度限制40个字符 |
templateURL url not found | 模板URL错误,没有找到对应模板URL | 检查入参,确认模板URL是否正确 |
request order channels invalid! | 请求的面单交易来源信息非法,请只用指定的渠道来源值 | 查看接入文档中的订单渠道枚举值 |
waybill service cannot open | 当前传入的快递公司编号代表的快递公司打印服务暂不开放 | 检查cpCode是否错误,或开通服务 |
logistics service value illegal for json | 物流服务能力值不是有效的json格式 | 检查入参 |
detail shippingAddress can not be null | 必选字段不能为空 | 请检查代码 |
name of send too long | 发件人姓名长度超过限制(最大长度40) | 检查入参的发件人姓名是否超长 |
trade order channel can not be null | 订单渠道不能为空 | 请检查代码 |
cpcode or cpId can not both be null | cpCode, cpId不能同时为空 | 检查入参 |
the seller didnt subscribe such service | 商家没有订购物流服务 | 访问卖家中心,订购对应的物流服务,并联系对应快递公司网点审核通过。 |
logistics services validation failure | 物流服务传值错误 | 联系对应软件服务商,按照菜鸟接口对接标准透传服务。 |
system default error | 系统临时错误 | 稍候重试 |
service doesnt allow batch request | 对应物流服务不允许批量取号 | 联系软件商修改接口调用方式 |
PACKAGE_NOT_REACHABLE | 该订单超出物流商承运范围 | 联系当地物流承运商 |
isv.oaid-invalid | 无效的OAID | 根据错误消息中的tid列表,调用taobao.trade.fullinfo.get获取最新的OAID。错误消息格式类似"参数oaid无效,tid:123,456,789"。 |