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

cainiao.cloudprint.single.customarea.get (获取商家单一自定义区)

商家所有快递公司模板只有一个自定义区

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
seller_id Number 可选 2023823 这是商家用户id

响应参数

名称 类型 示例值 描述
result CloudPrintBaseResult result
  • data
  • CustomAreaSingleResult
  • data
  • └ custom_area_id
  • Number
  • 3201
  • 自定义区id
  • └ custom_area_url
  • String
  • http://cloudprint.cainiao.com/template/customAreaSingle/12345678/65238/2
  • 自定义区内容的URL
  • keys
  • KeyResult []
  • keys
  • └ key_name
  • String
  • _data.item_name
  • 动态key的名称
  • └ error_code
  • String
  • 0
  • errorCode
  • └ error_message
  • String
  • 获取自定义区失败
  • 错误消息
  • └ success
  • Boolean
  • false
  • success

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
CainiaoCloudprintSingleCustomareaGetRequest req = new CainiaoCloudprintSingleCustomareaGetRequest();
req.setSellerId(2023823L);
CainiaoCloudprintSingleCustomareaGetResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<cainiao_cloudprint_single_customarea_get_response>
    <result>
        <data>
            <custom_area_id>3201</custom_area_id>
            <custom_area_url>http://cloudprint.cainiao.com/template/customAreaSingle/12345678/65238/2</custom_area_url>
            <keys>
                <key_result>
                    <key_name>_data.item_name</key_name>
                </key_result>
            </keys>
        </data>
        <error_code>0</error_code>
        <error_message>获取自定义区失败</error_message>
        <success>false</success>
    </result>
</cainiao_cloudprint_single_customarea_get_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

返回
顶部