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

cainiao.pickup.business.platform.callguoguo (菜鸟商家寄件代理下寄件单并呼叫裹裹运力)

批量下单&发货接口:下单的同时立即寻求运力,并同时将任务派发给小件员。该接口的运作范围是在菜鸟和其它平台对接时采用,下单人设置为平台账号,菜鸟针对平台账号进行扣费等操作。当然,该接口必须要求把真正的寄件人信息传递进来。

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
order_real_owner_id String 必须 13578343 在平台下单模式下,该笔订单的真正拥有者,比如某商家通过ISV下单,这里需要输入该商家的唯一标示。该字段必须输入,并且保证正确,否则在后面的处理过程中会出错。
order_real_owner_mobile String 必须 13817747777 在平台下单模式下,该笔订单的真正拥有者的联系信息,在一些订单出现异常时,需要联系该订单的owner
order_real_contact_id String 可选 13578343
  • 默认值:13578343
  • 订单的联系人信息,比如订单出现异常时,菜鸟平台跟哪个联系人联系。该字段的场景是: * ISV代替某一个商家账号(该商家账号可能是商家的BOSS)进行下单,当订单出现异常时,可以联系商家的客服支持人员
    order_real_contact_mobile String 可选 13817747777
  • 默认值:13817747777
  • 订单的联系人信息,比如订单出现异常时,菜鸟平台跟哪个联系人联系。ISV代替某一个商家账号(该商家账号可能是商家的BOSS)进行下单,当订单出现异常时,可以联系商家的客服支持人员;如果该信息没有填写,则会采用order_real_owner_mobile的信息
    param_list GuoGuoPackageInfo [] 必须
  • 最大列表长度:30
  • 寄件列表,一次最多30个
    • └ item_title
    • String
    • 必须
    • 华为手机
    • 商品的名称
    • └ package_id
    • String
    • 必须
    • 包裹号
    • 该下单批次中,唯一的ID
    • receiver
    • BusinessCustomer
    • 可选
    • 收件人信息
    • └ area_id
    • String
    • 必须
    • 311200
    • 收件人的区号
    • └ full_address_detail
    • String
    • 必须
    • 浙江省杭州市网商路699号
    • 收件人的详细地址,必须携带省市区
    • └ mobile
    • String
    • 必须
    • 13817747777
    • 收件人的联系方式
    • └ name
    • String
    • 必须
    • 张三
    • 收件人姓名
    • sender
    • BusinessCustomer
    • 必须
    • 寄件人的信息
    • └ area_id
    • String
    • 必须
    • 311200
    • 寄件人的区号
    • └ full_address_detail
    • String
    • 必须
    • 浙江省杭州市网商路966号
    • 寄件人的详细地址,必须携带省市区
    • └ mobile
    • String
    • 必须
    • 13817747777
    • 寄件人的联系方式
    • └ name
    • String
    • 必须
    • 李四
    • 寄件人的姓名
    • └ weight
    • Number
    • 可选
    • 1000
    • 包裹预估重量
    • └ coupon_id
    • String
    • 可选
    • 1000
    • 优惠券ID
    param_business_property BusinessProperty 必须 业务控制信息
    • └ print_by_owner
    • Boolean
    • 可选
    • false
    • 面单是否由用户自己打印,如果该值设置为true,则面单由商家自己打印;如果该值设置为false,则面单由小件员上门时打印。如果不填写,则意味由小件员上门打印
    • └ privacy_on
    • Boolean
    • 可选
    • false
    • 是否采用隐私寄件功能,如果采用隐私寄件,则会对一些敏感信息在面单上隐藏
    • value_services
    • ValueService []
    • 可选
    • 增值服务
    • └ value
    • String
    • 可选
    • yes
    • 增值服务值
    • └ key
    • String
    • 可选
    • gift_package
    • 增值服务类型

    响应参数

    名称 类型 示例值 描述
    result TdOpenServiceResult {} 下单结果
    • data_list
    • TdInterResult []
    • []
    • 下单结果
    • data
    • CreateOrderResponse
    • {}
    • 下单结果
    • └ check_package_code
    • String
    • 1356
    • 对货码
    • └ print_data
    • String
    • {}
    • 电子面单加密信息
    • └ got_code
    • String
    • 13579
    • 取件码
    • └ td_order_id
    • Number
    • 323123123123123123
    • 裹裹订单编号
    • └ mail_no
    • String
    • 123123123123123
    • 运单号(对总取号不为空,对私取号为空)
    • └ cp_code
    • String
    • 123123123
    • 运单号的cpCode
    • courier_info
    • CourierInfo
    • {}
    • 返回对象
    • └ name
    • String
    • 张三
    • 小件员名称
    • └ cp_name
    • String
    • 韵达快递
    • 小件员所在公司
    • └ phone_number
    • String
    • 13817747777
    • 小件员手机号
    • └ identity
    • String
    • 1111111111
    • 批量查询时会有区分每个独立个体的标识,如裹裹订单id、运单号等
    • └ status_message
    • String
    • 系统错误
    • 错误信息
    • └ status_code
    • String
    • error
    • 错误code
    • └ success
    • Boolean
    • true
    • 是否成功
    • └ retry
    • Boolean
    • false
    • 是否重试
    • └ status_code
    • String
    • error
    • 错误code
    • └ status_message
    • String
    • 系统错误
    • 错误信息
    • └ success
    • Boolean
    • true
    • 是否成功

    请求示例

    • JAVA
    • .NET
    • PHP
    • CURL
    • Python
    • C/C++
    • NodeJS
    TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
    CainiaoPickupBusinessPlatformCallguoguoRequest req = new CainiaoPickupBusinessPlatformCallguoguoRequest();
    req.setOrderRealOwnerId("13578343");
    req.setOrderRealOwnerMobile("13817747777");
    req.setOrderRealContactId("13578343");
    req.setOrderRealContactMobile("13817747777");
    List<CainiaoPickupBusinessPlatformCallguoguoRequest.GuoGuoPackageInfo> list2 = new ArrayList<CainiaoPickupBusinessPlatformCallguoguoRequest.GuoGuoPackageInfo>();
    CainiaoPickupBusinessPlatformCallguoguoRequest.GuoGuoPackageInfo obj3 = new CainiaoPickupBusinessPlatformCallguoguoRequest.GuoGuoPackageInfo();
    list2.add(obj3);
    obj3.setItemTitle("华为手机");
    obj3.setPackageId("包裹号");
    CainiaoPickupBusinessPlatformCallguoguoRequest.BusinessCustomer obj5 = new CainiaoPickupBusinessPlatformCallguoguoRequest.BusinessCustomer();
    obj5.setAreaId("311200");
    obj5.setFullAddressDetail("浙江省杭州市网商路699号");
    obj5.setMobile("13817747777");
    obj5.setName("张三");
    list4.setReceiver(obj5);
    CainiaoPickupBusinessPlatformCallguoguoRequest.BusinessCustomer obj7 = new CainiaoPickupBusinessPlatformCallguoguoRequest.BusinessCustomer();
    obj7.setAreaId("311200");
    obj7.setFullAddressDetail("浙江省杭州市网商路966号");
    obj7.setMobile("13817747777");
    obj7.setName("李四");
    list6.setSender(obj7);
    obj3.setWeight(1000L);
    obj3.setCouponId("1000");
    req.setParamList(list2);
    CainiaoPickupBusinessPlatformCallguoguoRequest.BusinessProperty obj8 = new CainiaoPickupBusinessPlatformCallguoguoRequest.BusinessProperty();
    obj8.setPrintByOwner(false);
    obj8.setPrivacyOn(false);
    List<CainiaoPickupBusinessPlatformCallguoguoRequest.ValueService> list10 = new ArrayList<CainiaoPickupBusinessPlatformCallguoguoRequest.ValueService>();
    CainiaoPickupBusinessPlatformCallguoguoRequest.ValueService obj11 = new CainiaoPickupBusinessPlatformCallguoguoRequest.ValueService();
    list10.add(obj11);
    obj11.setValue("yes");
    obj11.setKey("gift_package");
    obj8.setValueServices(list10);
    req.setParamBusinessProperty(obj8);
    CainiaoPickupBusinessPlatformCallguoguoResponse rsp = client.execute(req, sessionKey);
    System.out.println(rsp.getBody());

    响应示例

    • XML示例
    • JSON示例
    <cainiao_pickup_business_platform_callguoguo_response>
        <result>
            <data_list>
                <td_inter_result>
                    <data>
                        <check_package_code>1356</check_package_code>
                        <print_data>{}</print_data>
                        <got_code>13579</got_code>
                        <td_order_id>323123123123123123</td_order_id>
                        <mail_no>123123123123123</mail_no>
                        <cp_code>123123123</cp_code>
                        <courier_info>
                            <name>张三</name>
                            <cp_name>韵达快递</cp_name>
                            <phone_number>13817747777</phone_number>
                        </courier_info>
                    </data>
                    <identity>1111111111</identity>
                    <status_message>系统错误</status_message>
                    <status_code>error</status_code>
                    <success>true</success>
                </td_inter_result>
            </data_list>
            <retry>false</retry>
            <status_code>error</status_code>
            <status_message>系统错误</status_message>
            <success>true</success>
        </result>
    </cainiao_pickup_business_platform_callguoguo_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

    返回
    顶部