网站开发是哪个郑州网站推广效果
一、什么是车辆VIN码/车架号查询接口?
车辆VIN码又叫车架号,车辆识别码,传入车辆识别码(车架号)VIN码来获取车辆的品牌名称、车型名称、出厂日期、发动机类型、排量、车系等多维度车辆参数,该接口可以支持大小车、新能源等。
二、具体用Java如何实现接口对接?
下面我们以阿里云接口为例:
接口地址:https://market.aliyun.com/apimarket/detail/cmapi00069828?#sku=yuncode6382800002public static void main(String[] args) {String host = "https://kzvin.market.alicloudapi.com";String path = "/vin/query";String method = "GET";String appcode = "你自己的AppCode";Map<String, String> headers = new HashMap<String, String>();//最后在header中的格式(中间是英文空格)为Authorization:APPCODE 83359fd73fe94948385f570e3c139105headers.put("Authorization", "APPCODE " + appcode);Map<String, String> querys = new HashMap<String, String>();querys.put("vin", "L6T79T2E6NP024446");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();}}
成功返回示例代码如下:
{"msg": "成功","success": true,"code": 200,"data": {"model_list": [{"name": "极氪 极氪001 2022款 超长续航双电机 YOU版","series_name": "极氪001","brand_name": "极氪","cid": "73187"},{"name": "极氪 极氪001 2022款 长续航双电机 WE版","series_name": "极氪001","brand_name": "极氪","cid": "73185"},{"name": "极氪 极氪001 2022款 超长续航双电机 ME版","series_name": "极氪001","brand_name": "极氪","cid": "73186"},{"name": "极氪 极氪001 2021款 长续航双电机 WE版","series_name": "极氪001","brand_name": "极氪","cid": "37780"},{"name": "极氪 极氪001 2023款 ME版 100kWh","series_name": "极氪001","brand_name": "极氪","cid": "73180"},{"name": "极氪 极氪001 2022款 超长续航单电机 WE版","series_name": "极氪001","brand_name": "极氪","cid": "73184"},{"name": "极氪 极氪001 2021款 超长续航双电机 YOU版","series_name": "极氪001","brand_name": "极氪","cid": "37782"},{"name": "极氪 极氪001 2023款 YOU版 100kWh","series_name": "极氪001","brand_name": "极氪","cid": "73181"}],"rlxs": "纯电动","full_weight_zz": "","csjg": "掀背车","year": "2022","chassis_number": "","rear_brake_type": "通风盘式","engine_model": "","gyfs": "","gearnum": "1","high": "1548","rear_tyre_size": "255/45 R21","price": "38.60万","driven_type": "双电机四驱","displacement": "","vin": "L6T79T2E6NP024446","front_tyre_size": "255/45 R21","brand_name": "极氪","market_date": "2022.07","front_brake_type": "通风盘式","wheelbase": "3005","zdgl": "400","gearbox_number": "","geartype": "固定齿比变速箱","name": "极氪 极氪001 2022款 超长续航双电机 YOU版","market_price": "38.60万","trackfront": "1713","cid": "73187","ryxh": "","displacement_ml": "","full_weight_max": "2840","cms": "5","scale": "中大型车","is_commercial": 0,"matching_mode": 1,"manufacturer": "极氪","is_import": 0,"parking_brake_type": "电子驻车","nedczhyh": "","zws": "5","series_name": "极氪001","gearbox": "","trackrear": "1726","full_weight": "2350","length": "4970","stop_date": "","width": "1999","effluent_standard": "","qfs": ""}
}matching_mode int 匹配模式 1 标准车型
is_commercial int 是否商用 1 是 0 否
cid string 车ID,车辆车型大全接口 可查看该车所有配置信息
brand_name string 品牌名称
series_name string 车系
name string 车型车款
year string 年款
price string 厂家指导价
gearbox string 变速箱
geartype string 变速箱类型
engine_model string 发动机型号
driven_type string 驱动方式
displacement_ml string 排量(mL)
displacement string 排量(L)
nedczhyh string 油耗
effluent_standard string 环保标准
scale string 车辆级别
csjg string 车身结构
cms string 车门数(个)
zws string 座位数(个)
market_date string 上市时间
stop_date string 停产日期
length string 长度(mm)
width string 宽度(mm)
high string 高度(mm)
wheelbase string 轴距(mm)
trackfront string 前轮距(mm)
trackrear string 后轮距(mm)
full_weight string 整备质量(kg)
front_tyre_size string 前轮胎规格
rear_tyre_size string 后轮胎规格
rlxs string 燃料形式
ryxh string 燃油标号
gearbox_number string 变速箱号
chassis_number string 底盘号
model_list object 可能的销售车型列表
full_weight_max string 最大满载质量(kg)
full_weight_zz string 核载质量
img string 车型图片
manufacturer string 厂商
zdgl string 最大功率
front_brake_type string 前制动器类型
rear_brake_type string 后制动器类型
parking_brake_type string 驻车制动类型
qfs string 气缸数
gyfs string 供油方式
is_import string 是否进口 0国产 1进口
is_rules string vin是否合规 1是 0否
market_price string 市场参考价
gearnum string 变速箱档位数
body_type string 车体结构
zdml string 最大马力
version string 销售版本