产品详情
API参数 VIN码查询车辆信息_车辆出厂信息_车辆登记信息 调用地址: http,https://vinvehicleinfo.api.bdymkt.com/vin_vehicle_info/get 请求方式: GET 支持格式: application/json;charset=UTF-8 调用工具: 去调试 请求参数(Headers) 请求参数(Query)
- 名称
- 类型
- 是否必须
- 示例值
- 描述
- vin
- string
- true
- SBL666666BM9D933
- VIN码
<dependency>
<groupId>com.baidubce</groupId>
<artifactId>api-explorer-sdk</artifactId>
<version>1.0.0</version>
</dependency>
import com.baidubce.http.ApiExplorerClient;
import com.baidubce.http.AppSigner;
import com.baidubce.http.HttpMethodName;
import com.baidubce.model.ApiExplorerRequest;
import com.baidubce.model.ApiExplorerResponse;
// VIN码查询车辆信息_车辆出厂信息_车辆登记信息 Java示例代码
public class RequestDemo {
public static void main(String[] args) {
String path = "http://gwgp-vknjqnvih7q.n.bdcloudapi.com/vin_vehicle_info/get";
ApiExplorerRequest request = new ApiExplorerRequest(HttpMethodName.GET, path);
request.setCredentials("您的 access key", "您的 secret key");
request.addHeaderParameter("Content-Type", "application/json;charset=UTF-8");
request.addQueryParameter("vin", "");
ApiExplorerClient client = new ApiExplorerClient(new AppSigner());
try {
ApiExplorerResponse response = client.sendRequest(request);
// 返回结果格式为Json字符串
System.out.println(response.getResult());
} catch (Exception e) {
e.printStackTrace();
}
}
}
点击复制代码
正常返回示例 {
"code": "0",
"message": "成功",
"data": {
"result": "1",
"description": "查询成功,有数据",
"detail": {
"brandName": "东风日产",//品牌
"modelNo": "DF***BL1",//车辆型号
"engineNo": "112**H",//发动机号
"engineType": "MR*0",//发动机类型
"displacement": "2000",//排量
"ratedPower": "110",//功率
"axleNumber": "2",//轴数
"wheelBase": "2706",//轴距
"frontWheelDistance": "1575",//前轮距
"backWheelDistance": "1570",//后轮距
"crossWeight": "1930",//总质量(KG)
"curbWeight": "1470",//整备质量(KG)
"loadWeight": "0",//核定载质量
"passengers": "5",//载客数
"ppsDate": "2017-04-02",//出厂日期
"vehicleTypeDes": "紧凑型SUV",//车辆类型描述
"bodyColorDes": "珠光白",//车身颜色描述
"fuelTypeDes": "汽油",//燃料类型描述
"wlong": "4675",//外扩长
"wide": "1820",//外廓宽
"high": "1722",//外廓高
"effluentStandard": "",//排放标准
"oilWear": "7.1",//油耗
"tyreNumber": "4",//轮胎数
"tyreSize": "225/65R17",//轮胎规格
"axleWeight": "",//车轴负荷
"vehicleType": "K32",//车辆类型
"fuelType": "A",//燃料类型
"vehicleModel": "奇骏(第三代,2014-)",//车系
"vin": "LG***219",//车架号
"tractionMass": "0"//准牵引总质量
}
}
}
失败返回示例 { "code": "20704", "message": "车架号不能为空", "data": {} }
错误码定义
