商用车VIN查询详版
传入17位车辆识别码(车架号)VIN码来获取车辆的品牌、车型年款、出厂日期、发动机类型、排量、车系、上市年月、燃油标号、气缸数、进气形式、电池类型、驱动电动机数、电池容量等多维度车辆参数。
官网购买的套餐通过API调用时请使用“扣套餐次数”密钥进行调用
GEThttps://api.shuxuntech.com/v1/vin4_custom/query
¥0.17元 / 次
阶梯计价,用量越大单价越低
企业认证后额外赠送 666 次调用额度
01 — 接口说明
请求参数与返回结果
所有请求需在 header 中携带签名信息,body 参数按 x-www-form-urlencoded 提交
| 名称 | 位置 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
| appKey | head | string | 是 | 数勋分配appKey |
| timestamp | head | string | 是 | unix时间毫秒值 |
| sign | head | string | 是 | 签名,说明 |
| vin | query | string | 是 | 车架号 |
签名算法说明
数勋分配的appKey、当前unix时间毫秒值timestamp、数勋分配的appSecret、 按顺序拼接sha256加密得到sign,查看如下示例
appKey = aaa;timestamp = 1682476904289;appSecret = bbb;sign = sha256(appKey+timestamp+appSecret)02 — 返回说明
返回结构与字段含义
顶层返回 code 与 msg,业务数据在 data 对象内,各字段含义见下方表格
返回字段描述
| 字段名 | 类型 | 描述 |
|---|---|---|
| code | string | 错误码 |
| msg | string | 错误描述 |
| isFee | int | 是否计费(1:计费,0:不计费) |
| seqNo | string | 调用流水号 |
| data | object | 返回数据 |
data对象说明
| 字段名 | 类型 | 描述 |
|---|---|---|
| engineno | string | 发动机号 |
| fueltype | string | 燃油类型 |
| totalweight | string | 总质量(kg) |
| color | string | 车身颜色 |
| productiondate | string | 生产日期 |
| reartrack | string | 后轮距 |
| boxheight | string | 货箱栏板内尺寸高(mm) |
| carid | string | 车型ID |
| enginemodel | string | 发动机型号 |
| manufacturer | string | 厂家名称 |
| comfuelconsumption | string | 油耗 |
| gearnum | string | 档位数 |
| boxwidth | string | 货箱栏板内尺寸宽(mm) |
| officialcategory | string | 官方分类 (M1,N1,N2等) |
| len | string | 长 mm |
| fronttrack | string | 前轮距 |
| price | string | 厂商指导价 |
| vin | string | 车架号 |
| model | string | 工信部型号 |
| displacement | string | 排量(L) |
| gearbox | string | 变速箱 |
| brand | string | 品牌 |
| environmentalstandards | string | 排放标准 |
| axleload | string | 轴荷 |
| height | string | 高 mm |
| drivemode | string | 驱动方式 |
| maxpower | string | 最大功率 KW |
| ratedloadweight | string | 额定载质量 |
| displacementml | string | 排量(mL) |
| boxlen | string | 货箱栏板内尺寸长(mm) |
| weight | string | 重量,kg |
| tirenum | string | 轮胎数 |
| chassis | string | 底盘 |
| tiresize | string | 轮胎规格 |
| seatnum | string | 座位数 |
| wheelbase | string | 轴距 |
| axlenum | string | 轴数 |
| geartype | string | 变速箱类型 |
| width | string | 宽 mm |
| name | string | 车型名称 |
| category | string | 车辆类型 (示例:牵引汽车) |
| typename | string | 车型名称 对应typeid |
| carSeries | string | 车系 |
| listdate | string | 上市年月,yyyy-MM |
| fuelgrade | string | 燃油标号 |
| cylindernum | string | 气缸数 |
| intakeform | string | 进气形式 |
| batterytype | string | 电池类型 |
| motornum | string | 驱动电机数 |
| batterycapacity | string | 电池容量,kWh |
| motortype | string | 电机类型 |
| yeartype | string | 年款,yyyy |
| bodytype | string | 车身型式 |
| doornum | string | 车门数 |
carlist车型信息说明
| 字段名 | 类型 | 描述 |
|---|---|---|
| gearnum | string | 档位数 |
| len | string | 长 mm |
| price | string | 厂商指导价 |
| name | string | 车型名称 |
| geartype | string | 变速箱类型 |
| width | string | 宽 |
| model | string | 工信部型号 |
| typename | string | 类型名称 |
| carid | string | 车ID |
| manufacturer | string | 厂家名称 |
| enginemodel | string | 发动机型号(参考) |
| height | string | 高 |
code错误码说明
| code | 说明 |
|---|---|
| 0 | 成功 |
| 1 | 参数错误 |
| 2 | 无记录 |
| 3 | 第三方服务异常 |
| 4 | 签名错误 |
| 5 | 余额不足 |
| 6 | 调用频率超限 |
| 7 | 账号停用 |
| 8 | 接口已停用 |
| 9 | 联系服务商开通接口权限 |
| 10 | ip不在白名单 |
| 11 | 系统异常 |
| 12 | 实名状态错误 |
| 99 | 其他异常,具体返回为准 |
返回示例
正面返回
{ "code": "0", "msg": "成功", "isFee": 1, "seqNo": "bwkkpwno84c7pgvwxg2a5mdnm7wlw5kb", "data": { "result": 1, "info": { "engineno": "", //发动机号 "fueltype": "柴油",//燃油类型 "totalweight": "", //总质量(kg) "color": "白/蓝/黑", //颜色 "productiondate": "2023-03-17", //生产日期 "reartrack": "1830/1830;", //后轮距 "boxheight": "", //货箱栏板内尺寸高(mm) "carid": "12590", //车型id "enginemodel": "X11N***360;WP8.3***61A;X1***6B", //发动机型号 "manufacturer": "***汽车有限公司", //生产商 "comfuelconsumption": "", //油耗 "gearnum": "", //档位数 "boxwidth": "", //货箱栏板内尺寸宽(mm) "officialcategory": "水泥罐车", //官方分类 (M1,N1,N2等) "len": "10300;9980", //外形尺寸长(mm) "fronttrack": "2020/2020;", //前轮距 "price": "41万", //厂商指导价 "vin": "LRDV7PEC***42041", //车架号 "model": "WL5310***JG6DT", //工信部型号 "displacement": "10500;7800", //排量(L) "gearbox": "", //变速箱 "brand": "瑞江", //品牌 "environmentalstandards": "国六", //排放标准 "axleload": "", //轴荷 "height": "3990", //外形尺寸高(mm) "drivemode": "8X4", //驱动方式 "maxpower": "265", //最大马力 "ratedloadweight": "", //额定载质量(kg) "displacementml": "", //排量(ml) "boxlen": "", //货箱栏板内尺寸长(mm) "weight": "14600", //整备质量 (kg) "tirenum": "", //轮胎数 "chassis": "", //底盘型号 "tiresize": "", //轮胎规格 "seatnum": "2", //座位数 "wheelbase": "2100+2750+1350;2100+3100+1350", //轴距 "axlenum": "", //轴数 "geartype": "手动档", //变速箱类型 "width": "2550", //外形尺寸宽(mm) "name": "***混凝土搅拌运输车 360马力 罐式专用车 手动档 (WL5310GJ***6DT)", //车型名称 "carlist": [ { "gearnum": null, //档位数 "len": "10300;9980", //外形尺寸长(mm) "price": "41万", //厂商指导价 "name": "***混凝土搅拌运输车 360马力 罐式专用车 手动档 (WL5310G***6DT)", //车型名称 "geartype": "手动档", //变速箱类型 "width": "2550", //外形尺寸宽(mm) "model": "WL5310G***G6DT", //工信部型号 "typename": "***混凝土搅拌运输车", //车型名称 对应typeid "carid": null, //车型ID "manufacturer": "***汽车有限公司", //生产商 "enginemodel": "X11N***360;WP8.35***1A;X12N***", //发动机型号 "height": "3990" //外形尺寸高(mm) } ], "category": "商用车", //车辆类型 (示例:牵引汽车) "typename": "***混凝土搅拌运输车" //车型名称 对应typeid "carSeries": "搅拌运输车", //车系 "listdate": "2014-04", //上市年月 "fuelgrade": "92号", //燃油标号 "cylindernum": "4", //气缸数 "intakeform": "自然吸气", //进气形式 "batterytype": "", //电池类型 "motornum": "", //驱动电机数 "batterycapacity": "", //电池容量 "motortype": "永磁同步电机", "yeartype": "2014", "bodytype": "两厢车", "doornum": "2", } }}错误返回
{ "code": "1", "msg": "参数错误", "isFee": 0, "seqNo": null, "data": null}03 — 代码示例
七种语言,复制即用
签名规则:sha256(appKey + timestamp + appSecret),下列示例已包含完整签名流程
import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLEncoder;
import java.security.MessageDigest;
/**
* 商用车VIN查询定制版 - Java 示例代码
* 接口地址:https://api.shuxuntech.com/v1/vin4_custom/query
*
* 说明:本示例只使用 JDK 原生 API(java.net / java.security),不依赖任何第三方 jar 包,
* 也不需要本项目的工具类,复制到本地即可编译运行:
* javac Vin4CustomQueryDemo.java
* java Vin4CustomQueryDemo
*/
public class Vin4CustomQueryDemo {
/** 数勋分配的 appKey,请替换为您自己的 appKey */
private static final String APP_KEY = "您的appKey";
/** 数勋分配的 appSecret,请替换为您自己的 appSecret */
private static final String APP_SECRET = "您的appSecret";
/** 接口地址 */
private static final String API_URL = "https://api.shuxuntech.com/v1/vin4_custom/query";
/** 车架号 */
private static final String VIN = "";
public static void main(String[] args) throws Exception {
// 1、当前 unix 时间毫秒值,服务端要求与服务器时间相差不能超过 5 分钟
String timestamp = String.valueOf(System.currentTimeMillis());
// 2、签名:按顺序拼接 appKey + timestamp + appSecret 后做 sha256,得到小写十六进制字符串
String sign = sha256Hex(APP_KEY + timestamp + APP_SECRET);
// 3、业务参数,拼到 url 的 query 里
String query = "vin=" + urlEncode(VIN);
String url = API_URL + (query.isEmpty() ? "" : "?" + query);
// 4、发起 GET 请求,appKey、timestamp、sign 放在请求头
HttpURLConnection conn = (HttpURLConnection) new URL(url).openConnection();
conn.setRequestMethod("GET");
conn.setRequestProperty("appKey", APP_KEY);
conn.setRequestProperty("timestamp", timestamp);
conn.setRequestProperty("sign", sign);
conn.setConnectTimeout(10000);
conn.setReadTimeout(20000);
int status = conn.getResponseCode();
// 5、读取返回内容:报错时读错误流,避免只拿到一个异常看不到原因
InputStream in = (status >= 200 && status < 300) ? conn.getInputStream() : conn.getErrorStream();
String result = readAll(in);
conn.disconnect();
System.out.println("HTTP状态码=" + status);
System.out.println("返回结果=" + result);
}
/**
* sha256 加密,返回小写十六进制字符串
* 服务端校验签名用的就是这个算法(小写十六进制)
*/
private static String sha256Hex(String content) throws Exception {
byte[] bytes = MessageDigest.getInstance("SHA-256").digest(content.getBytes("UTF-8"));
StringBuilder sb = new StringBuilder(bytes.length * 2);
for (byte b : bytes) {
sb.append(Character.forDigit((b >> 4) & 0xF, 16));
sb.append(Character.forDigit(b & 0xF, 16));
}
return sb.toString();
}
/** url 编码,中文参数需要编码 */
private static String urlEncode(String value) throws Exception {
return URLEncoder.encode(value, "UTF-8");
}
/** 读取输入流内容 */
private static String readAll(InputStream in) throws Exception {
if (in == null) {
return "";
}
StringBuilder sb = new StringBuilder();
BufferedReader reader = new BufferedReader(new InputStreamReader(in, "UTF-8"));
try {
String line;
while ((line = reader.readLine()) != null) {
sb.append(line);
}
} finally {
reader.close();
}
return sb.toString();
}
}04 — 在线调试
先调通,再决定
用你自己的数据发一次真实请求,表单字段随接口定义自动生成,返回结果附字段注释
请求参数
按接口定义自动生成
- vin*车架号
appKey / timestamp / sign调用时自动按 sha256 生成,无需手填
appKey=未获取 · timestamp=实时生成 · sign=自动生成
这是真实调用,会消耗套餐次数或账户余额; 请勿用真实证件信息反复试调
返回结果
点击左侧「提交并调用接口」,参数会就地组装、按文档口径签名后直接请求接口, 返回的 JSON 显示在这里。
在线调试使用你自己的 appKey,按实际调用计费。
05 — 产品价格
阶梯计价,用多少买多少
单次价格随调用量阶梯下降,大档位单价最低
| 调用量 | 价格 | 单价 |
|---|---|---|
| 3 次 | ¥ 0 | ¥ 0 |
| 100 次 | ¥ 28 | ¥ 0.28 |
| 1,000 次 | ¥ 260 | ¥ 0.26 |
| 10,000 次 | ¥ 2,400 | ¥ 0.24 |
| 30,000 次 | ¥ 6,600 | ¥ 0.22 |
| 50,000 次 | ¥ 10,000 | ¥ 0.2 |
| 80,000 次 | ¥ 15,000 | ¥ 0.1875 |
| 100,000 次 | ¥ 17,000 | ¥ 0.17 |