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

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

cainiao.waybill.ii.product (商家查询物流商产品类型接口)

商家可以查询物流商的产品类型和服务能力。

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
cp_code String 必须 POSTB 快递公司code

响应参数

名称 类型 示例值 描述
product_types WaybillProductType [] x 返回值
  • └ code
  • String
  • COD
  • 产品code
  • └ name
  • String
  • 货到付款
  • 产品名称
  • service_types
  • WaybillServiceType []
  • X
  • 物流服务
  • └ code
  • String
  • SVC-COD
  • code
  • └ name
  • String
  • 货到付款
  • name

请求示例

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

响应示例

  • XML示例
  • JSON示例
<cainiao_waybill_ii_product_response>
    <product_types>
        <waybill_product_type>
            <code>COD</code>
            <name>货到付款</name>
            <service_types>
                <waybill_service_type>
                    <code>SVC-COD</code>
                    <name>货到付款</name>
                </waybill_service_type>
            </service_types>
        </waybill_product_type>
    </product_types>
</cainiao_waybill_ii_product_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>

错误码解释

错误码 错误描述 解决方案
QUERY_CP_ID_BY_CP_CODE_ERROR 根据cp_code查不到快递信息,cp_code有误 检查cp_code是否正确

API工具

如何获得此API

FAQ

返回
顶部