产品详情
API参数 全国车辆违章查询 调用地址: http,https://wzcx.api.bdymkt.com/wz_detail/get超时30000ms 请求方式: GET 支持格式: application/json;charset=UTF-8 调用工具: 去调试 请求参数(Headers) 请求参数(Query)
- 名称
- 类型
- 是否必须
- 示例值
- 描述
- engine_no
- string
- true
- null
- 一般为发动机号后6位,说明:大部分地市支持 车架号后6位,发动机号后6位(除了北京、上海及皖G外)
- vin
- string
- true
- null
- 车架号,一般为后6位,详情见文档
- plate_number
- string
- true
- null
- 车牌号码
- plate_type
- string
- true
- null
- 号牌类型:02-小型车;01-大型车;52-新能源;15-挂车 ;03-使馆汽车; 16-教练汽车 ;04-领馆汽车;17-教练摩托车; 05-境外汽车;18-试验汽车; 06-外籍汽车; 19-试验摩托车; 07-两、三轮摩托车;20-临时入境汽车; 08-轻便摩托车; 21-临时入境摩托车; 09-使馆摩托车;22-临时行驶车; 10-领馆摩托车;23-警用汽车; 11-境外摩托车;
<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;
// 全国车辆违章查询 Java示例代码
public class RequestDemo {
public static void main(String[] args) {
String path = "http://gwgp-tnkndmxfydy.n.bdcloudapi.com/wz_detail/get超时30000ms";
ApiExplorerRequest request = new ApiExplorerRequest(HttpMethodName.GET, path);
request.setCredentials("您的 access key", "您的 secret key");
request.addHeaderParameter("Content-Type", "application/json;charset=UTF-8");
request.addQueryParameter("engine_no", "");
request.addQueryParameter("vin", "");
request.addQueryParameter("plate_number", "");
request.addQueryParameter("plate_type", "");
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,
"msg": "success",
"data": {
"id": "55149",
"name": "中石化经一路加油站",
"area": "250033",
"areaname": "山东省 济南市 天桥区",
"address": "山东省济南市天桥区纬六路与经一路交汇处向东路北",
"brandname": "中石化",
"type": "其他",
"discount": "打折加油站",
"exhaust": "国IV",
"position": "116.9851388929,36.6661251642",
"lon": "116.9851388929",
"lat": "36.6661251642",
"price": {
"E90": "-",
"E93": "6.42",
"E97": "6.89",
"E0": "6.04"
},
"gastprice": null,
"fwlsmc": "加油卡",
"distance": 3200,
}
}
失败返回示例 错误码定义
