产品详情
API参数 车辆信息校验 调用地址: http,https://jumkjihh.api.bdymkt.com/vehicle/info/validate 请求方式: POST 支持格式: application/json;charset=UTF-8 调用工具: 去调试 请求参数(Headers) 请求参数(Query)
- 名称
- 类型
- 是否必须
- 示例值
- 描述
- plate_type
- string
- true
- null
- 车辆类型,详见商品介绍
- plate_prefix
- string
- true
- null
- 车牌号省份部分
- plate_no
- string
- true
- null
- 车牌号剩余部分
- engine_no
- string
- true
- null
- 发动机号
- frame_no
- string
- false
- null
- 车架号
<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 = "//vehicle/info/validate";
ApiExplorerRequest request = new ApiExplorerRequest(HttpMethodName.POST, path);
request.setCredentials("您的 access key", "您的 secret key");
request.addHeaderParameter("Content-Type", "application/json;charset=UTF-8");
request.addQueryParameter("plate_type", "");
request.addQueryParameter("plate_prefix", "");
request.addQueryParameter("plate_no", "");
request.addQueryParameter("engine_no", "");
request.addQueryParameter("frame_no", "");
ApiExplorerClient client = new ApiExplorerClient(new AppSigner());
try {
ApiExplorerResponse response = client.sendRequest(request);
// 返回结果格式为Json字符串
System.out.println(response.getResult());
} catch (Exception e) {
e.printStackTrace();
}
}
}
点击复制代码
正常返回示例 {
"code": 200, // 成功为200,其它为失败返回码(非http状态码)
"msg": "成功", // code对应的说明描述
"taskNo": "69564903663951243279", // 唯一业务号
"data": {
"plate_prefix": "浙", // 车牌号省份部分
"plate_no": "at665s", // 车牌号剩余部分
"plate_type": "02", // 车牌类型
"car_org": "all", // 管局名称
"validate_status": "0", // 校验状态 0 一致, 1 不一致
"validate_msg": "恭喜您,车牌校验一致!", // 校验信息
"illegal_count": "0", // 违章总条数 校验失败此结果无效
"illegal_count_local": "0", // 本省违章条数 校验失败此结果无效
"illegal_count_other": "0" // 外省违章条数 校验失败此结果无效
}
}
失败返回示例 {
"code": 400,
"msg": "车牌号不能为空"
}
错误码定义 - code
- message
- status
- 描述
- 400
- 参数错误
- 400
- 参数错误
- 501
- 官方维护,请稍候再试
- 501
- 官方维护,请稍候再试
- 999
- 其他,以实际返回为准
- 999
- 其他,以实际返回为准
