车架号查询接口api

发布时间 2023-03-24 20:39:50作者: alonetim
系统返回
参数名称类型示例值描述
showapi_res_body String {"city":"昆明","prov":"云南"} 消息体的JSON封装,所有应用级的返回参数将嵌入此对象 。
showapi_res_code int 0 查看错误码
showapi_fee_num int 1 计费次数标识。为0时表示不计费。大于0时代表计费几次。比如发送长短信时可能会多次计费。 通常此字段值为1,代表计费1次。
showapi_res_error String 用户输入有误! 错误信息的展示
showapi_res_id String ce135f6739294c63be0c021b76b6fbff 本次请求id

 

接口示例:https://route.showapi.com/1142-1?showapi_appid=自己的值&showapi_sign=自己的值 

 
java请求:
public static void main(String path[]) throws Exception {
  URL u = new URL("http://route.showapi.com/1142-1?showapi_appid=myappid&vin=lfv2a2150a3043256&showapi_sign=mysecret");
  InputStream in = u.openStream();
  ByteArrayOutputStream out = new ByteArrayOutputStream();
  try {
    byte buf[] = new byte[1024];
    int read = 0;
    while ((read = in.read(buf)) > 0) {
      out.write(buf, 0, read);
    }
  } finally {
    if ( in != null) {
      in.close();
    }
  }
  byte b[] = out.toByteArray();
  System.out.println(new String(b, "utf-8"));
}

vin查询示例:车架号查询

php请求:

<?php
    //支持php5.5以上版本
    include_once 'Util/Autoloader.php';//包含sdk中的自动导入工具类
    $url = "http://route.showapi.com/1142-1";
    $METHOD = "POST";
    $showapi_appid="xxxxxxx";//
    $showapi_sign="xxxxxxxx";//

    $req = new ShowapiRequest($url,$showapi_appid,$showapi_sign);
    $req->addTextPara("vin","lfv2a2150a3043256")
    $response=$req->post();

    print_r($response->getContent());
?>