注意:以下文档只适用于TOP接口,请谨慎使用!

文档中心 > 电子面单对接知识库

cainiao.waybill.ii.search (查询面单服务订购及面单使用情况)

获取发货地&CP开通状态&账户的使用情况

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
cp_code String 可选 POSTB 物流公司code

响应参数

名称 类型 示例值 描述
waybill_apply_subscription_cols WaybillApplySubscriptionInfo [] x CP网点信息及对应的商家的发货信息
  • branch_account_cols
  • WaybillBranchAccount []
  • x
  • CP网点信息及对应的商家的发货信息
  • └ allocated_quantity
  • Number
  • 1
  • 已用面单数量
  • └ branch_code
  • String
  • 1232
  • 网点Code
  • └ branch_name
  • String
  • 杭州网点
  • 网点名称
  • └ branch_status
  • Number
  • 1
  • 网点状态
  • └ cancel_quantity
  • Number
  • 23
  • 取消的面单总数
  • └ print_quantity
  • Number
  • 12
  • 已经打印的面单总数
  • └ quantity
  • Number
  • 32
  • 电子面单余额数量
  • shipp_address_cols
  • AddressDto []
  • x
  • 当前网点下的发货地址
  • └ detail
  • String
  • 文一西路
  • 详细地址
  • └ district
  • String
  • 余杭区
  • 区名称(三级地址)
  • └ city
  • String
  • 杭州市
  • 市名称(二级地址)
  • └ province
  • String
  • 浙江省
  • 省名称(一级地址)
  • └ town
  • String
  • 仓前街道
  • 街道\镇名称(四级地址)
  • └ waybill_address_id
  • String
  • 12343L
  • 订购关系id
  • service_info_cols
  • ServiceInfoDto []
  • x
  • 可用的服务信息列表
  • └ service_name
  • String
  • 物流产品类型服务
  • 服务名称
  • └ service_code
  • String
  • SVC-ANE56-PRODUCT-TYPE
  • 服务编码
  • service_attributes
  • ServiceAttributeDto []
  • 服务属性定义
  • └ attribute_code
  • String
  • value
  • 属性的值,用户实际传入的值
  • └ attribute_name
  • String
  • 产品类型
  • 属性的名称,可以用于前端的展示
  • └ attribute_type
  • String
  • enum
  • 属性的类型,可能值有 [number, string, enum]
  • └ type_desc
  • String
  • {"type":"enum","desc":{"95":"Mini小包, 重量<=70KG","23":"定时达, 重量>70KG","270":"普惠达, 重量>1000KG","211":"易碎品(标准快运), 重量>70KG","212":"易碎品(定时达),重量>70KG","213":"易碎品(mini小包),重量<=70KG"}}
  • 枚举类型的枚举值,key为用户选中的需要传值的数据,value为对应的描述,可以作为前端的展示
  • └ service_desc
  • String
  • 安能物流产品类型
  • 服务的官方描述,可以用作前端展示
  • └ required
  • Boolean
  • true
  • 该服务是否为必选服务
  • └ segment_code
  • String
  • NORMAL
  • 号段信息
  • └ brand_code
  • String
  • SF_FW
  • 品牌code
  • └ customer_code_list
  • String []
  • ["232324"]
  • 月结卡号列表
  • └ customer_code_map
  • String
  • {"120380001":"0220000003"}
  • 月结卡号map,key为shipp_address_cols.waybill_address_id,value为月结卡号。jsonString
  • └ cp_code
  • String
  • ZTO
  • 物流服务商ID
  • └ cp_type
  • Number
  • 1
  • 物流服务商业务类型 1:直营 2:加盟 3:落地配 4:直营带网点

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
CainiaoWaybillIiSearchRequest req = new CainiaoWaybillIiSearchRequest();
req.setCpCode("POSTB");
CainiaoWaybillIiSearchResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<cainiao_waybill_ii_search_response>
    <waybill_apply_subscription_cols>
        <waybill_apply_subscription_info>
            <branch_account_cols>
                <waybill_branch_account>
                    <allocated_quantity>1</allocated_quantity>
                    <branch_code>1232</branch_code>
                    <branch_name>杭州网点</branch_name>
                    <branch_status>1</branch_status>
                    <cancel_quantity>23</cancel_quantity>
                    <print_quantity>12</print_quantity>
                    <quantity>32</quantity>
                    <shipp_address_cols>
                        <address_dto>
                            <detail>文一西路</detail>
                            <district>余杭区</district>
                            <city>杭州市</city>
                            <province>浙江省</province>
                            <town>仓前街道</town>
                            <waybill_address_id>12343L</waybill_address_id>
                        </address_dto>
                    </shipp_address_cols>
                    <service_info_cols>
                        <service_info_dto>
                            <service_name>物流产品类型服务</service_name>
                            <service_code>SVC-ANE56-PRODUCT-TYPE</service_code>
                            <service_attributes>
                                <service_attribute_dto>
                                    <attribute_code>value</attribute_code>
                                    <attribute_name>产品类型</attribute_name>
                                    <attribute_type>enum</attribute_type>
                                    <type_desc>{&quot;type&quot;:&quot;enum&quot;,&quot;desc&quot;:{&quot;95&quot;:&quot;Mini小包, 重量&lt;=70KG&quot;,&quot;23&quot;:&quot;定时达, 重量&gt;70KG&quot;,&quot;270&quot;:&quot;普惠达, 重量&gt;1000KG&quot;,&quot;211&quot;:&quot;易碎品(标准快运), 重量&gt;70KG&quot;,&quot;212&quot;:&quot;易碎品(定时达),重量&gt;70KG&quot;,&quot;213&quot;:&quot;易碎品(mini小包),重量&lt;=70KG&quot;}}</type_desc>
                                </service_attribute_dto>
                            </service_attributes>
                            <service_desc>安能物流产品类型</service_desc>
                            <required>true</required>
                        </service_info_dto>
                    </service_info_cols>
                    <segment_code>NORMAL</segment_code>
                    <brand_code>SF_FW</brand_code>
                    <customer_code_list>
                        <string>[&quot;232324&quot;]</string>
                    </customer_code_list>
                    <customer_code_map>{&quot;120380001&quot;:&quot;0220000003&quot;}</customer_code_map>
                </waybill_branch_account>
            </branch_account_cols>
            <cp_code>ZTO</cp_code>
            <cp_type>1</cp_type>
        </waybill_apply_subscription_info>
    </waybill_apply_subscription_cols>
</cainiao_waybill_ii_search_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

返回
顶部