VIN码查询接口如何用Java进行调用?

一、什么是vin码查询?

用户只需输入17位VIN码,即可快速匹配车型,获取包括品牌、车系、销售车型、发动机类型、排量、新车指导价、厂商价格等在内的详细参数信息。该接口支持新车型定期更新,查得率高达95%以上,已成为汽车相关行业不可或缺的技术工具。

二、如何免费测试VIN码查询接口?

下面我们以阿里云的接口为例,免费测试调用该接口

	
接口地址:https://market.aliyun.com/apimarket/detail/cmapi00065864
public static void main(String[] args) {
	    String host = "https://tsvin.market.alicloudapi.com";
	    String path = "/vin/index";
	    String method = "GET";
	    String appcode = "你自己的AppCode";
	    Map<String, String> headers = new HashMap<String, String>();
	    //最后在header中的格式(中间是英文空格)为Authorization:APPCODE 83359fd73fe94948385f570e3c139105
	    headers.put("Authorization", "APPCODE " + appcode);
	    Map<String, String> querys = new HashMap<String, String>();
	    querys.put("vin", "LSJA24U64MS039980");


	    try {
	    	/**
	    	* 重要提示如下:
	    	* HttpUtils请从
	    	* https://github.com/aliyun/api-gateway-demo-sign-java/blob/master/src/main/java/com/aliyun/api/gateway/demo/util/HttpUtils.java
	    	* 下载
	    	*
	    	* 相应的依赖请参照
	    	* https://github.com/aliyun/api-gateway-demo-sign-java/blob/master/pom.xml
	    	*/
	    	HttpResponse response = HttpUtils.doGet(host, path, method, headers, querys);
	    	System.out.println(response.toString());
	    	//获取response的body
	    	//System.out.println(EntityUtils.toString(response.getEntity()));
	    } catch (Exception e) {
	    	e.printStackTrace();
	    }
	}

返回结果如下:

{
  "code": 1,
  "msg": "操作成功",
  "data": {
    "vin": "LSJA24U64MS039980",
    "matching_mode": 1,
    "is_commercial": 0,
    "is_import": 0,
    "is_rules": 1,
    "cid": "50147",
    "brand_name": "荣威",
    "manufacturer": "上汽集团",
    "series_name": "荣威RX5",
    "name": "2021款 PLUS 330TGI 自动国潮智臻版",
    "year": "2021",
    "img": "http://static.tanshuapi.com/car/202426/17215774571d2839.jpg",
    "price": "13.08万",
    "market_price": "13.08万",
    "gearbox": "7挡湿式双离合",
    "gearnum": "7",
    "geartype": "湿式双离合变速箱(DCT)",
    "engine_model": "15C4E",
    "driven_type": "前置前驱",
    "displacement_ml": "1490",
    "displacement": "1.5",
    "nedczhyh": "6.9",
    "effluent_standard": "国VI",
    "scale": "紧凑型SUV",
    "csjg": "SUV",
    "cms": "5",
    "zws": "5",
    "market_date": "2021.07",
    "stop_date": "",
    "length": "4571",
    "width": "1855",
    "high": "1719",
    "wheelbase": "2708",
    "trackfront": "1574",
    "trackrear": "1593",
    "full_weight": "1539",
    "full_weight_max": "1972",
    "full_weight_zz": "",
    "front_tyre_size": "235/45 R19",
    "rear_tyre_size": "235/45 R19",
    "rlxs": "汽油",
    "ryxh": "92号",
    "gearbox_number": "",
    "chassis_number": "",
    "zdgl": "133",
    "zdml": "181",
    "front_brake_type": "通风盘式",
    "rear_brake_type": "盘式",
    "parking_brake_type": "电子驻车",
    "qfs": "4",
    "gyfs": "直喷",
    "body_type": "承载式",
    "version": "自动国潮智臻版",
    "model_list": [
      {
        "cid": "50147",
        "brand_name": "荣威",
        "series_name": "荣威RX5",
        "name": "2021款 PLUS 330TGI 自动国潮智臻版"
      },
      {
        "cid": "50146",
        "brand_name": "荣威",
        "series_name": "荣威RX5",
        "name": "2021款 PLUS 330TGI 自动国潮智享版"
      },
      {
        "cid": "50154",
        "brand_name": "荣威",
        "series_name": "荣威RX5",
        "name": "2021款 PLUS 300TGI 自动Ali国潮豪华荣麟版"
      },
      {
        "cid": "50155",
        "brand_name": "荣威",
        "series_name": "荣威RX5",
        "name": "2021款 PLUS 300TGI 自动Ali国潮旗舰荣麟版"
      },
      {
        "cid": "50145",
        "brand_name": "荣威",
        "series_name": "荣威RX5",
        "name": "2021款 PLUS 330TGI 手动国潮智享版"
      },
      {
        "cid": "50151",
        "brand_name": "荣威",
        "series_name": "荣威RX5",
        "name": "2020款 20T 自动4G互联百万款"
      }
    ]
  }
}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值