文档中心 > API类目 > 菜鸟裹裹API

cainiao.guoguo.courier.waybill.getwaybill (获取电子面点打印信息接口)

根据输入的orderId,获取打印的电子面单内容

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
user_id Number 可选 12313 小件员id
order_id Number 可选 123123 订单id
session_code String 可选 123123 小件员session
template_type String 可选 ONE 一联单模板

响应参数

名称 类型 示例值 描述
data WayBillPrintContentDto 1234 data
  • └ xml_content
  • String
  • 1234
  • 打印内容
  • └ orientation
  • Number
  • 0
  • 打印方向
status_code String 1231 错误码
status_message String 123 错误信息
is_success Boolean true 是否成功

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
CainiaoGuoguoCourierWaybillGetwaybillRequest req = new CainiaoGuoguoCourierWaybillGetwaybillRequest();
req.setUserId(12313L);
req.setOrderId(123123L);
req.setSessionCode("123123");
req.setTemplateType("ONE");
CainiaoGuoguoCourierWaybillGetwaybillResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<cainiao_guoguo_courier_waybill_getwaybill_response>
    <data>
        <xml_content>1234</xml_content>
        <orientation>0</orientation>
    </data>
    <status_code>1231</status_code>
    <status_message>123</status_message>
    <is_success>true</is_success>
</cainiao_guoguo_courier_waybill_getwaybill_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

返回
顶部