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

cainiao.cloudprint.customares.get (获取商家的自定义区模板信息)

供isv使用,获取商家的自定义区的模板信息

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
template_id Number 必须 1024 用户使用的标准模板id

响应参数

名称 类型 示例值 描述
result CloudPrintBaseResult 结果
  • datas
  • CustomAreaResult []
  • 数据
  • └ custom_area_id
  • Number
  • 1024
  • 自定义区id
  • └ custom_area_url
  • String
  • "http://cloudprint.cainiao.com/xxx"
  • 自定义区url
  • keys
  • KeyResult []
  • keys
  • └ key_name
  • String
  • "key1"
  • key名称
  • └ error_code
  • String
  • ERROR_GET
  • 系统自动生成
  • └ error_message
  • String
  • 获取自定义区失败
  • 系统自动生成
  • └ success
  • Boolean
  • false
  • 系统自动生成

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
CainiaoCloudprintCustomaresGetRequest req = new CainiaoCloudprintCustomaresGetRequest();
req.setTemplateId(1024L);
CainiaoCloudprintCustomaresGetResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<cainiao_cloudprint_customares_get_response>
    <result>
        <datas>
            <custom_area_result>
                <custom_area_id>1024</custom_area_id>
                <custom_area_url>&quot;http://cloudprint.cainiao.com/xxx&quot;</custom_area_url>
                <keys>
                    <key_result>
                        <key_name>&quot;key1&quot;</key_name>
                    </key_result>
                </keys>
            </custom_area_result>
        </datas>
        <error_code>ERROR_GET</error_code>
        <error_message>获取自定义区失败</error_message>
        <success>false</success>
    </result>
</cainiao_cloudprint_customares_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>

错误码解释

错误码 错误描述 解决方案
2401 资源不存在 确认查询参数是否准确

API工具

如何获得此API

FAQ

返回
顶部