文档中心 > API类目 > 电子面单API

cainiao.waybill.ii.confirm (物流订单确认接口)

物流订单确认

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
param_waybill_order_confirm_request WaybillOrderConfirmRequest 可选 订单确认信息
  • └ call_door_pick_up
  • Boolean
  • 可选
  • false
  • 预约上门收件
  • └ cp_code
  • String
  • 必须
  • SF
  • cpCode
  • └ door_pick_up_end_time
  • String
  • 可选
  • 2021-08-07 12:34:30
  • 预约上门截止时间
  • └ door_pick_up_time
  • String
  • 可选
  • 2021-08-07 12:34:30
  • 预约上门时间
  • └ extra_info
  • String
  • 可选
  • {"specialDeliveryTypeCode": "ascsdf"}
  • 扩展信息,json String
  • └ logistics_services
  • String
  • 可选
  • {"COD": {"value": "1234"}}
  • 物流服务, json String
  • └ product_code
  • String
  • 可选
  • T1
  • 快递产品编码
  • └ total_height
  • Number
  • 可选
  • 40
  • 客户订单货物总高,单位厘米
  • └ total_length
  • Number
  • 可选
  • 40
  • 订单货物总长,单位厘米
  • └ total_width
  • Number
  • 可选
  • 30
  • 订单货物总宽,单位厘米
  • waybill_info
  • WaybillOrderConfirmWaybillInfo []
  • 必须
  • 物流单号信息
  • └ height
  • Number
  • 可选
  • 10
  • 包裹高,单位厘米
  • └ length
  • Number
  • 可选
  • 40
  • 包裹长,单位厘米
  • └ volume
  • Number
  • 可选
  • 400
  • 体积, 单位 ml
  • └ waybill_code
  • String
  • 必须
  • AS123456
  • 面单号
  • └ weight
  • Number
  • 可选
  • 4000
  • 重量,单位 g
  • └ width
  • Number
  • 可选
  • 40
  • 包裹宽,单位厘米
  • └ total_volume
  • Number
  • 可选
  • 80
  • 货物总体积,单位立方厘米
  • └ total_weight
  • Number
  • 可选
  • 4000
  • 货物总重量,单位g

响应参数

名称 类型 示例值 描述
confirm_response WaybillOrderConfirmResponse [] 确认结果
  • └ waybill_code
  • String
  • AB12345
  • 面单号

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
CainiaoWaybillIiConfirmRequest req = new CainiaoWaybillIiConfirmRequest();
CainiaoWaybillIiConfirmRequest.WaybillOrderConfirmRequest obj1 = new CainiaoWaybillIiConfirmRequest.WaybillOrderConfirmRequest();
obj1.setCallDoorPickUp(false);
obj1.setCpCode("SF");
obj1.setDoorPickUpEndTime("2021-08-07 12:34:30");
obj1.setDoorPickUpTime("2021-08-07 12:34:30");
obj1.setExtraInfo("{\"specialDeliveryTypeCode\": \"ascsdf\"}");
obj1.setLogisticsServices("{\"COD\": {\"value\": \"1234\"}}");
obj1.setProductCode("T1");
obj1.setTotalHeight(40L);
obj1.setTotalLength(40L);
obj1.setTotalWidth(30L);
List<CainiaoWaybillIiConfirmRequest.WaybillOrderConfirmWaybillInfo> list3 = new ArrayList<CainiaoWaybillIiConfirmRequest.WaybillOrderConfirmWaybillInfo>();
CainiaoWaybillIiConfirmRequest.WaybillOrderConfirmWaybillInfo obj4 = new CainiaoWaybillIiConfirmRequest.WaybillOrderConfirmWaybillInfo();
list3.add(obj4);
obj4.setHeight(10L);
obj4.setLength(40L);
obj4.setVolume(400L);
obj4.setWaybillCode("AS123456");
obj4.setWeight(4000L);
obj4.setWidth(40L);
obj1.setWaybillInfo(list3);
obj1.setTotalVolume(80L);
obj1.setTotalWeight(4000L);
req.setParamWaybillOrderConfirmRequest(obj1);
CainiaoWaybillIiConfirmResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
1
2
3
4
5
6
7
<cainiao_waybill_ii_confirm_response>
    <confirm_response>
        <waybill_order_confirm_response>
            <waybill_code>AB12345</waybill_code>
        </waybill_order_confirm_response>
    </confirm_response>
</cainiao_waybill_ii_confirm_response>

异常示例

  • XML示例
  • JSON示例
1
2
3
4
5
6
<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

返回
顶部