文档中心 > API类目 > 驿马前台api

cainiao.yima.app.version.check (检查众包APP版本更新)

检查众包APP版本更新

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
current_version String 必须 1.0.0 APP当前版本
device_type Number 必须 1 设备类型,Android:2;iOS:1
cp_code String 可选 D_DBKD 小件员CPCODE

响应参数

名称 类型 示例值 描述
data YmAppVersionDto "" 返回数据
  • └ current_server_time
  • Number
  • 1459234775801
  • 服务器当前时间
  • └ latest_version
  • String
  • 1.0.1
  • APP最新版本
  • └ need_force_update
  • Boolean
  • true
  • 是否强制更新
  • └ update_description
  • String
  • 有新的更新啦
  • 更新描述
  • └ download_url
  • String
  • http://www.taobao.com
  • 下载链接
  • └ need_update
  • Boolean
  • false
  • 是否需要更新
status_code String 13 状态码
status_message String 服务器挂了 状态信息
is_success Boolean false 是否成功

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
CainiaoYimaAppVersionCheckRequest req = new CainiaoYimaAppVersionCheckRequest();
req.setCurrentVersion("1.0.0");
req.setDeviceType(1L);
req.setCpCode("D_DBKD");
CainiaoYimaAppVersionCheckResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<cainiao_yima_app_version_check_response>
    <data>
        <current_server_time>1459234775801</current_server_time>
        <latest_version>1.0.1</latest_version>
        <need_force_update>true</need_force_update>
        <update_description>有新的更新啦</update_description>
        <download_url>http://www.taobao.com</download_url>
        <need_update>false</need_update>
    </data>
    <status_code>13</status_code>
    <status_message>服务器挂了</status_message>
    <is_success>false</is_success>
</cainiao_yima_app_version_check_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

返回
顶部