产品详情
API参数 获取车型详细信息根据品牌获取车系根据车系获取车型获取所有品牌 调用地址: http,https://jumkjiho.api.bdymkt.com/vehicle/query/model 请求方式: POST 支持格式: application/json;charset=UTF-8 调用工具: 去调试 请求参数(Headers) 请求参数(Query)
- 名称
- 类型
- 是否必须
- 示例值
- 描述
- seriesId
- string
- true
- null
- 车系API返回的车系列表中id
- sort
- string
- false
- null
- 排序。 year - 按年份,yearr - 按年份逆序, productionstate - 按生产状态, productionstater- 按生产状态逆序。默认:yearr
<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/query/model";
ApiExplorerRequest request = new ApiExplorerRequest(HttpMethodName.POST, path);
request.setCredentials("您的 access key", "您的 secret key");
request.addHeaderParameter("Content-Type", "application/json;charset=UTF-8");
request.addQueryParameter("seriesId", "");
request.addQueryParameter("sort", "");
ApiExplorerClient client = new ApiExplorerClient(new AppSigner());
try {
ApiExplorerResponse response = client.sendRequest(request);
// 返回结果格式为Json字符串
System.out.println(response.getResult());
} catch (Exception e) {
e.printStackTrace();
}
}
}
点击复制代码
正常返回示例 {
"msg": "成功",
"code": 200,
"taskNo": "09522434433117405247", // 本次请求号
"data": {
"depth": 3, //层级, 1-品牌, 2-子公司, 3-车系, 4-车型
"initial": "A", // 首字母
"name": "奥迪Q5L", // 车系名称
"logo": "http://pic1.jisuapi.cn/car/static/images/logo/300/44589.jpg", // 车系图片
"id": 44589, // 车系id
"fullname": "奥迪Q5L", // 车系全称
"salestate": "在销" // 销售状态
"list": [ // 车系下车型列表
{
"name": "2020款 40 TFSI 荣享时尚型", // 车型名称
"id": 67580, // 车型id
"groupid": "2838", // 车型分组
"groupname": "Q5L 2.0T SUV 双离合 适时四驱 FV6461LAQBG(2018.07-)", // 车型分组
"sizetype": "中型SUV", // 车辆等级
"displacement2": "2.0", // 排量 数字
"displacement": "2.0T", // 排量
"geartype": "双离合", // 变速箱类型
"geartype2": 1, // 变速箱类型 1自动 2手动
"logo": "http://pic1.jisuapi.cn/car/static/images/logo/300/67580.jpg", // 车辆图片
"yeartype": "2020", // 年款
"listdate": "2019-11-26", // 上市年月
"price": "41.58万", // 价格
"productionstate": "在产", // 生产状态
"salestate": "在销" // 销售状态
},
{
"groupid": "2838",
"productionstate": "在产",
"groupname": "Q5L 2.0T SUV 双离合 适时四驱 FV6461LAQBG(2018.07-)",
"listdate": "2019-11-26",
"displacement2": "2.0",
"yeartype": "2020",
"sizetype": "中型SUV",
"price": "38.78万",
"geartype2": 1,
"name": "2020款 40 TFSI 荣享进取型",
"geartype": "双离合",
"logo": "http://pic1.jisuapi.cn/car/static/images/logo/300/67579.jpg",
"displacement": "2.0T",
"id": 67579,
"salestate": "在销"
},
...
]
}
}
失败返回示例 {
"msg": "未查询到数据",
"code": 701
}
错误码定义 - code
- message
- status
- 描述
- 701
- 未查询到数据
- 200
- 未查询到数据
- 999
- 其他,以实际返回为准
- 500
- 其他,以实际返回为准
