文档中心 > API类目 > 新零售供应链API

alibaba.ascp.industry.waybill.pre.accept (商家ERP预推单)

商家ERP预推单

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
waybill_gen_request WaybillGenRequest 必须 开单信息
  • waybill_gen_item_list
  • WaybillGenItem []
  • 可选
  • {}
  • 货品信息
  • └ item_id
  • String
  • 可选
  • 670885411040
  • 货品id
  • └ item_quantity
  • Number
  • 可选
  • 1
  • 货品数量
  • waybill_gen_serv
  • WaybillGenServ
  • 必须
  • {}
  • 服务类型
  • └ delivery_type
  • String
  • 必须
  • 0
  • 服务类型:0为送装一体,1为只送到家不安装,2为只送不装到楼下,3为自提
  • waybill_gen_sender
  • WaybillGenSender
  • 必须
  • 发货人信息
  • └ detail_address
  • String
  • 必须
  • 发货详细地址
  • 详细地址
  • └ sender_province
  • String
  • 必须
  • 西藏自治区
  • └ sender_city
  • String
  • 可选
  • 拉萨市
  • └ sender_area
  • String
  • 可选
  • 城关区
  • waybill_gen_receiver
  • WaybillGenReceiver
  • 必须
  • 收货人信息
  • └ contact_mobile
  • String
  • 必须
  • 15005788129
  • 联系人电话
  • └ contact_name
  • String
  • 必须
  • lzg
  • 联系人名称
  • └ detail_address
  • String
  • 必须
  • 收货详细地址
  • 详细地址
  • └ receiver_province
  • String
  • 必须
  • 新疆维吾尔自治区
  • └ receiver_city
  • String
  • 可选
  • 哈密市
  • └ receiver_area
  • String
  • 可选
  • 伊州区
  • waybill_gen_info
  • WaybillGenInfo
  • 必须
  • 开单信息
  • └ total_volume
  • String
  • 必须
  • 1
  • 总体积
  • └ gather_num
  • Number
  • 可选
  • 0
  • 拼单数量
  • └ related_order_code
  • String
  • 必须
  • 123456
  • 外部单号
  • └ remark
  • String
  • 可选
  • 备注
  • 备注
  • └ gather
  • Number
  • 可选
  • 0
  • 是否拼单:0为否,1为是
  • └ main_trade_no
  • String
  • 必须
  • 2681486569973546547
  • 交易单号
  • └ seller_id
  • String
  • 必须
  • 2206586295985
  • 商家id
  • └ total_pack_num
  • Number
  • 必须
  • 1
  • 总包件数
  • remark_picture
  • ImageUrlInfo []
  • 可选
  • {}
  • 备注图片
  • └ download_url
  • String
  • 可选
  • https://xxx,https://
  • 备注图片英文逗号分隔
  • └ order_channel
  • Number
  • 可选
  • 1
  • 交易渠道:1为淘宝/天猫,2为其它,3为抖音,4为拼多多,5为京东,6为唯品会

响应参数

名称 类型 示例值 描述
result BaseResult 返回对象
  • └ success
  • Boolean
  • true
  • 调用是否成功
  • └ error_message
  • String
  • 服务异常
  • 错误信息
  • └ error_code
  • String
  • 15
  • 错误码
  • data
  • WaybillGenResponse
  • {}
  • 返回对象
  • └ express_no
  • String
  • MSF123
  • 运单号
  • └ logistics_brand
  • String
  • 菜鸟大件
  • 物流品牌

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaAscpIndustryWaybillPreAcceptRequest req = new AlibabaAscpIndustryWaybillPreAcceptRequest();
AlibabaAscpIndustryWaybillPreAcceptRequest.WaybillGenRequest obj1 = new AlibabaAscpIndustryWaybillPreAcceptRequest.WaybillGenRequest();
List<AlibabaAscpIndustryWaybillPreAcceptRequest.WaybillGenItem> list3 = new ArrayList<AlibabaAscpIndustryWaybillPreAcceptRequest.WaybillGenItem>();
AlibabaAscpIndustryWaybillPreAcceptRequest.WaybillGenItem obj4 = new AlibabaAscpIndustryWaybillPreAcceptRequest.WaybillGenItem();
list3.add(obj4);
obj4.setItemId("670885411040");
obj4.setItemQuantity(1L);
obj1.setWaybillGenItemList(list3);
AlibabaAscpIndustryWaybillPreAcceptRequest.WaybillGenServ obj5 = new AlibabaAscpIndustryWaybillPreAcceptRequest.WaybillGenServ();
obj5.setDeliveryType("0");
obj1.setWaybillGenServ(obj5);
AlibabaAscpIndustryWaybillPreAcceptRequest.WaybillGenSender obj6 = new AlibabaAscpIndustryWaybillPreAcceptRequest.WaybillGenSender();
obj6.setDetailAddress("发货详细地址");
obj6.setSenderProvince("西藏自治区");
obj6.setSenderCity("拉萨市");
obj6.setSenderArea("城关区");
obj1.setWaybillGenSender(obj6);
AlibabaAscpIndustryWaybillPreAcceptRequest.WaybillGenReceiver obj7 = new AlibabaAscpIndustryWaybillPreAcceptRequest.WaybillGenReceiver();
obj7.setContactMobile("15005788129");
obj7.setContactName("lzg");
obj7.setDetailAddress("收货详细地址");
obj7.setReceiverProvince("新疆维吾尔自治区");
obj7.setReceiverCity("哈密市");
obj7.setReceiverArea("伊州区");
obj1.setWaybillGenReceiver(obj7);
AlibabaAscpIndustryWaybillPreAcceptRequest.WaybillGenInfo obj8 = new AlibabaAscpIndustryWaybillPreAcceptRequest.WaybillGenInfo();
obj8.setTotalVolume("1");
obj8.setGatherNum(0L);
obj8.setRelatedOrderCode("123456");
obj8.setRemark("备注");
obj8.setGather(0L);
obj8.setMainTradeNo("2681486569973546547");
obj8.setSellerId("2206586295985");
obj8.setTotalPackNum(1L);
List<AlibabaAscpIndustryWaybillPreAcceptRequest.ImageUrlInfo> list10 = new ArrayList<AlibabaAscpIndustryWaybillPreAcceptRequest.ImageUrlInfo>();
AlibabaAscpIndustryWaybillPreAcceptRequest.ImageUrlInfo obj11 = new AlibabaAscpIndustryWaybillPreAcceptRequest.ImageUrlInfo();
list10.add(obj11);
obj11.setDownloadUrl("https://xxx,https://");
obj8.setRemarkPicture(list10);
obj8.setOrderChannel(1L);
obj1.setWaybillGenInfo(obj8);
req.setWaybillGenRequest(obj1);
AlibabaAscpIndustryWaybillPreAcceptResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alibaba_ascp_industry_waybill_pre_accept_response>
    <result>
        <success>true</success>
        <error_message>服务异常</error_message>
        <error_code>15</error_code>
        <data>
            <express_no>MSF123</express_no>
            <logistics_brand>菜鸟大件</logistics_brand>
        </data>
    </result>
</alibaba_ascp_industry_waybill_pre_accept_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

返回
顶部