车辆估值
<p>[TOC]</p>
<h3>1 接口调用说明</h3>
<ul>
<li>查询品牌,然后根据品牌id查询车型,然后根据车型id查询型号。</li>
<li>查询省份,然后根据省份id查询城市。</li>
<li>查询颜色。</li>
<li>估值,根据型号id、城市、颜色等参数查询车辆估值接口。</li>
</ul>
<h4>1.1 请求方式</h4>
<p>如接口没有单独说明,所有接口均为:<strong>POST</strong></p>
<h4>1.2 请求格式</h4>
<p>如接口没有单独说明,所有接口均为:<strong>application/x-www-form-urlencoded</strong></p>
<h4>1.3 请求参数</h4>
<p>请求参数包括公共参数和业务参数(业务参数见具体接口说明)
调用接口时,需要把<strong>公共参数</strong>和<strong>业务参数</strong>一并放在<strong>请求参数</strong>中提交</p>
<h5>1.3.1 公共请求参数</h5>
<table>
<thead>
<tr>
<th>名称</th>
<th>类型</th>
<th>必须</th>
<th><div style="width:420px;">说明</div></th>
</tr>
</thead>
<tbody>
<tr>
<td>appId</td>
<td>String</td>
<td>是</td>
<td>服务商分配的唯一标识</td>
</tr>
<tr>
<td>timestamp</td>
<td>Long</td>
<td>是</td>
<td>当前时间戳(毫秒)</td>
</tr>
<tr>
<td>sign</td>
<td>String</td>
<td>是</td>
<td>签名,详见<a href="#签名算法">签名算法说明</a></td>
</tr>
</tbody>
</table>
<p><a name="签名算法"></a></p>
<h5>1.3.2 签名算法说明</h5>
<pre><code>sign = sha256(appId + appSecret + timestamp)</code></pre>
<p>用服务商分配的 <strong>appId</strong>、服务商分配的 <strong>appSecret</strong>,当前时间戳(毫秒) <strong>timestamp</strong>,按上述顺序拼接成字符串,再进行 <strong>sha256</strong> 哈希得到。如下:</p>
<pre><code class="language-java">String appId = &quot;xyzxy2121zxyz&quot;;
String timestamp = &quot;1555378976238&quot;;
String appSecret = &quot;efcefcef1121cefcefc1212121&quot;;
String str = appId + appSecret + timestamp;
String sign = sha256(str);</code></pre>
<h4>1.4 返回说明</h4>
<h5>1.4.1 公共返回字段说明</h5>
<p>所有接口均返回以下公共字段:</p>
<table>
<thead>
<tr>
<th>字段名</th>
<th><div style="width:420px">说明</div></th>
</tr>
</thead>
<tbody>
<tr>
<td>code</td>
<td>返回码,详见:code返回码说明</td>
</tr>
<tr>
<td>msg</td>
<td>code对应的描述</td>
</tr>
<tr>
<td>charge</td>
<td>计费标志 true为计费,false为不计费</td>
</tr>
<tr>
<td>taskNo</td>
<td>本次请求号</td>
</tr>
<tr>
<td>data</td>
<td>返回具体结果,object类型,详见data返回字段描述</td>
</tr>
</tbody>
</table>
<p><a name="公共code返回码说明"></a></p>
<h5>1.4.2 公共code返回码说明</h5>
<p>所有接口公共返回码如下:</p>
<table>
<thead>
<tr>
<th>code</th>
<th><div style="width:420px;">说明</div></th>
</tr>
</thead>
<tbody>
<tr>
<td>200</td>
<td>成功</td>
</tr>
<tr>
<td>400</td>
<td>参数错误</td>
</tr>
<tr>
<td>404</td>
<td>接口地址不正确</td>
</tr>
<tr>
<td>500</td>
<td>系统维护,请稍候再试</td>
</tr>
<tr>
<td>601</td>
<td>接口未开通</td>
</tr>
<tr>
<td>602</td>
<td>账号停用</td>
</tr>
<tr>
<td>604</td>
<td>接口停用</td>
</tr>
<tr>
<td>606</td>
<td>调用超限,请稍候再试</td>
</tr>
<tr>
<td>607</td>
<td>ip不在白名单</td>
</tr>
<tr>
<td>609</td>
<td>请求过于频繁,请稍候再试</td>
</tr>
<tr>
<td>610</td>
<td>请求超时</td>
</tr>
<tr>
<td>999</td>
<td>其他,以实际返回为准</td>
</tr>
</tbody>
</table>
<h3>2 车辆估值</h3>
<h4>2.1 接口描述</h4>
<ul>
<li>查询车辆估值信息。</li>
</ul>
<h4>2.2 请求地址</h4>
<p><code>https://api.jumdata.com/car-evaluate-v2/valuate</code></p>
<h4>2.3 业务参数</h4>
<table>
<thead>
<tr>
<th>名称</th>
<th>类型</th>
<th>必须</th>
<th><div style="width:400px">说明</div></th>
</tr>
</thead>
<tbody>
<tr>
<td>cityId</td>
<td>String</td>
<td>是</td>
<td>城市id</td>
</tr>
<tr>
<td>mileage</td>
<td>String</td>
<td>是</td>
<td>里程(以万为单位,不能超过50)</td>
</tr>
<tr>
<td>regTime</td>
<td>String</td>
<td>是</td>
<td>上牌时间,格式yyyyMMdd</td>
</tr>
<tr>
<td>trimId</td>
<td>String</td>
<td>是</td>
<td>型号id</td>
</tr>
<tr>
<td>colorId</td>
<td>String</td>
<td>否</td>
<td>车身颜色id,黑色:Col09,白色:Col08,银灰色:Col11,红色:Col01,深灰色:Col12,香槟色:Col13,蓝色:Col05,褐色:Col07,黄色:Col03,绿色:Col04,紫色:Col06,橙色:Col02,粉红色:Col14,多彩色:Col90,其他颜色:Col98,不确定:Col99</td>
</tr>
<tr>
<td>is4SMaint</td>
<td>Boolean</td>
<td>否</td>
<td>是否4S店保养</td>
</tr>
</tbody>
</table>
<h4>2.4 成功返回样例</h4>
<pre><code class="language-json">{
&quot;msg&quot;: &quot;成功&quot;,
&quot;code&quot;: 200,
&quot;taskNo&quot;: &quot;580310061173075104584928&quot;,
&quot;charge&quot;: true,
&quot;data&quot;: {
&quot;msrp&quot;: 1090000,//新车价格
&quot;sellValuates&quot;: [//卖车价
{
&quot;values&quot;: [//估值
625400
],
&quot;valuePcts&quot;: [//保值率
0.57
],
&quot;condGrade&quot;: &quot;A&quot; // 优秀车况
},
{
&quot;values&quot;: [//估值
581600
],
&quot;valuePcts&quot;: [//保值率
0.53
],
&quot;condGrade&quot;: &quot;B&quot; //良好车况
},
{
&quot;values&quot;: [//估值
540900
],
&quot;valuePcts&quot;: [//保值率
0.5
],
&quot;condGrade&quot;: &quot;C&quot; //一般车况
}
],
&quot;buyValuates&quot;: [//收车价
{
&quot;values&quot;: [//估值
570600
],
&quot;valuePcts&quot;: [//保值率
0.52
],
&quot;condGrade&quot;: &quot;A&quot; //优秀车况
},
{
&quot;values&quot;: [//估值
530700
],
&quot;valuePcts&quot;: [//保值率
0.49
],
&quot;condGrade&quot;: &quot;B&quot; //良好车况
},
{
&quot;values&quot;: [//估值
493500
],
&quot;valuePcts&quot;: [//保值率
0.45
],
&quot;condGrade&quot;: &quot;C&quot; //一般车况
}
]
}
}</code></pre>
<h4>2.5 失败返回样例</h4>
<pre><code class="language-json">{
&quot;msg&quot;: &quot;参数不正确&quot;,
&quot;code&quot;: 400
}</code></pre>
<h3>3 车辆品牌查询接口</h3>
<h4>3.1 接口描述</h4>
<ul>
<li>查询车辆品牌接口。</li>
</ul>
<h4>3.2 请求地址</h4>
<p><code>https://api.jumdata.com/car-evaluate-v2/brand</code></p>
<h4>3.3 业务参数</h4>
<p>无</p>
<h4>3.4 成功返回样例</h4>
<pre><code class="language-json">{
&quot;msg&quot;: &quot;成功&quot;,//code对应的描述
&quot;code&quot;: 200,//返回码,详见code返回码说明
&quot;taskNo&quot;: &quot;968545275134169633742173&quot;,//本次唯一请求号
&quot;charge&quot;: true, //计费标志
&quot;data&quot;: {
&quot;list&quot;: [
{
&quot;name&quot;: &quot;AC Schnitzer&quot;,//品牌名称
&quot;logo&quot;: &quot;http://images.pistonint.com/bizusedcar/newcar/logo/bra00010002.png&quot;,//logo图片
&quot;id&quot;: &quot;bra00010&quot;,//品牌id(用于查询车型)
&quot;category&quot;: &quot;豪华&quot;, //类别
&quot;valid&quot;: true,//有效
&quot;abbrName&quot;: &quot;迈越&quot;,//品牌简称
&quot;fullSpell&quot;: &quot;maiyue&quot;,//品牌全拼
&quot;dept&quot;: &quot;China&quot; //品牌部门
}
]
}
}
</code></pre>
<h4>3.5 失败返回样例</h4>
<pre><code class="language-json">{
&quot;msg&quot;: &quot;系统维护,请稍候再试&quot;,
&quot;code&quot;: 500
}</code></pre>
<h3>4 查询车型列表</h3>
<h4>4.1 接口描述</h4>
<ul>
<li>根据品牌id查询车型列表。</li>
</ul>
<h4>4.2 请求地址</h4>
<p><code>https://api.jumdata.com/car-evaluate-v2/model</code></p>
<h4>4.3 业务参数</h4>
<table>
<thead>
<tr>
<th>名称</th>
<th>类型</th>
<th>必须</th>
<th><div style="width:400px">说明</div></th>
</tr>
</thead>
<tbody>
<tr>
<td>brandIds</td>
<td>String</td>
<td>是</td>
<td>车辆品牌ids,多个逗号隔开</td>
</tr>
</tbody>
</table>
<h4>4.4 成功返回样例</h4>
<pre><code class="language-json">{
&quot;msg&quot;: &quot;成功&quot;,//code对应的描述
&quot;code&quot;: 200,//返回码,详见code返回码说明
&quot;taskNo&quot;: &quot;968545275134169633742173&quot;,//本次唯一请求号
&quot;charge&quot;: true, //计费标志
&quot;data&quot;: {
&quot;list&quot;: [
{
&quot;id&quot;: &quot;mod00010&quot;,//车型id
&quot;oemName&quot;: &quot;AC Schnitzer(进口)&quot;,//厂商名称
&quot;brandName&quot;: &quot;AC Schnitzer&quot;,//品牌名称
&quot;oemBrandName&quot;: &quot;AC Schnitzer&quot;,//厂商品牌名称
&quot;brandId&quot;: &quot;bra00010&quot;,//品牌id
&quot;name&quot;: &quot;AC Schnitzer M3&quot;,//车型名称
&quot;oemBrandId&quot;: &quot;man00370&quot;,//厂商品牌关联 id
&quot;fullSpell&quot;: &quot;insight&quot;,//车型名称全拼
&quot;oemId&quot;: &quot;oem00010&quot;, //厂商id
&quot;onSaleFlag&quot;: false,//是否在售
&quot;pictureUrls&quot;: [//车型图片
&quot;https://xxxx.jpg&quot;
]
}
]
}
}
</code></pre>
<h4>4.5 失败返回样例</h4>
<pre><code class="language-json">{
&quot;msg&quot;: &quot;参数不正确&quot;,
&quot;code&quot;: 400
}</code></pre>
<h3>5 查询型号列表</h3>
<h4>5.1 接口描述</h4>
<ul>
<li>根据车型id查询型号列表。</li>
</ul>
<h4>5.2 请求地址</h4>
<p><code>https://api.jumdata.com/car-evaluate-v2/trim</code></p>
<h4>5.3 业务参数</h4>
<table>
<thead>
<tr>
<th>名称</th>
<th>类型</th>
<th>必须</th>
<th><div style="width:400px">说明</div></th>
</tr>
</thead>
<tbody>
<tr>
<td>modelIds</td>
<td>String</td>
<td>是</td>
<td>车型ids,多个逗号隔开</td>
</tr>
</tbody>
</table>
<h4>5.4 成功返回样例</h4>
<pre><code class="language-json">{
&quot;msg&quot;: &quot;成功&quot;,//code对应的描述
&quot;code&quot;: 200,//返回码,详见code返回码说明
&quot;taskNo&quot;: &quot;968545275134169633742173&quot;,//本次唯一请求号
&quot;charge&quot;: true, //计费标志
&quot;data&quot;: {
&quot;list&quot;: [
{
&quot;generation&quot;: &quot;New_Model&quot;,//车型代
&quot;year&quot;: 2015,//年款
&quot;modelId&quot;: &quot;mod00010&quot;,//车型 id
&quot;abbrName&quot;: &quot;2015款 ACS3 Sport&quot;,//型号简称
&quot;msrp&quot;: 1090000,//指导价
&quot;brandId&quot;: &quot;bra00010&quot;,//品牌 id
&quot;name&quot;: &quot;AC Schnitzer(进口) AC Schnitzer M3 2015款 ACS3 Sport&quot;,//型号全称
&quot;stopTime&quot;: &quot;20170301&quot;,//退市时间
&quot;startTime&quot;: &quot;20140901&quot;,//上市时间
&quot;id&quot;: &quot;tri00001&quot;, //型号id
&quot;bodyType&quot;: &quot;三厢车&quot;,//车身结构
&quot;brandName&quot;: &quot;本田&quot;,//品牌名称
&quot;onSaleFlag&quot;: false,//是否在售标记
&quot;valid&quot;: true,//是否有效
&quot;oemName&quot;: &quot;广汽本田&quot;,//厂商名称
&quot;modelName&quot;: &quot;锋范&quot;,//车型名称
&quot;bodyTypeId&quot;: &quot;bod00020&quot;,//车身类型 id
&quot;classic&quot;: false,//是否为经典款
&quot;oemId&quot;: &quot;oem00530&quot; //厂商 id
}
]
}
}
</code></pre>
<h4>5.5 失败返回样例</h4>
<pre><code class="language-json">{
&quot;msg&quot;: &quot;参数不正确&quot;,
&quot;code&quot;: 400
}</code></pre>
<h3>6 查询省份列表</h3>
<h4>6.1 接口描述</h4>
<ul>
<li>查询省份列表。</li>
</ul>
<h4>6.2 请求地址</h4>
<p><code>https://api.jumdata.com/car-evaluate-v2/province</code></p>
<h4>6.3 业务参数</h4>
<p>无</p>
<h4>6.4 成功返回样例</h4>
<pre><code class="language-json">{
&quot;msg&quot;: &quot;成功&quot;,//code对应的描述
&quot;code&quot;: 200,//返回码,详见code返回码说明
&quot;taskNo&quot;: &quot;968545275134169633742173&quot;,//本次唯一请求号
&quot;charge&quot;: true, //计费标志
&quot;data&quot;: {
&quot;list&quot;: [
{
&quot;abbrName&quot;: &quot;安徽&quot;,//省份简称
&quot;name&quot;: &quot;安徽省&quot;,//省份全称
&quot;id&quot;: &quot;pro00010&quot;, //省份id
&quot;provinceCode&quot;: &quot;340000&quot;,//省份代码
&quot;fullSpell&quot;: &quot;anhui&quot;,//省份名称全拼
&quot;countryId&quot;: &quot;CHN&quot;//国家 id
}
]
}
}</code></pre>
<h4>6.5 失败返回样例</h4>
<pre><code class="language-json">{
&quot;msg&quot;: &quot;系统维护,请稍候再试&quot;,
&quot;code&quot;: 500
}</code></pre>
<h3>7 查询城市列表</h3>
<h4>7.1 接口描述</h4>
<ul>
<li>根据省份id查询城市列表。</li>
</ul>
<h4>7.2 请求地址</h4>
<p><code>https://api.jumdata.com/car-evaluate-v2/city</code></p>
<h4>7.3 业务参数</h4>
<table>
<thead>
<tr>
<th>名称</th>
<th>类型</th>
<th>必须</th>
<th><div style="width:400px">说明</div></th>
</tr>
</thead>
<tbody>
<tr>
<td>provinceId</td>
<td>String</td>
<td>是</td>
<td>省份id,安徽省:pro00010,北京市:pro00020,重庆市:pro00030,福建省:pro00040,甘肃省:pro00050,广东省:pro00060,广西壮族自治区:pro00070,贵州省:pro00080,海南省:pro00090,河北省:pro00100,黑龙江省:pro00110,河南省:pro00120,香港特别行政区:pro00130,湖北省:pro00140,湖南省:pro00150,内蒙古自治区:pro00160,江苏省:pro00170,江西省:pro00180,吉林省:pro00190,辽宁省:pro00200,澳门特别行政区:pro00210,宁夏回族自治区:pro00220,青海省:pro00230,陕西省:pro00240,山东省:pro00250,上海市:pro00260,山西省:pro00270,四川省:pro00280,台湾省:pro00290,天津市:pro00300,西藏自治区:pro00310,新疆维吾尔自治区:pro00320,云南省:pro00330,浙江省:pro00340</td>
</tr>
</tbody>
</table>
<h4>7.4 成功返回样例</h4>
<pre><code class="language-json">{
&quot;msg&quot;: &quot;成功&quot;,//code对应的描述
&quot;code&quot;: 200,//返回码,详见code返回码说明
&quot;taskNo&quot;: &quot;968545275134169633742173&quot;,//本次唯一请求号
&quot;charge&quot;: true, //计费标志
&quot;data&quot;: {
&quot;list&quot;: [
{
&quot;abbrName&quot;: &quot;舟山&quot;,//简称
&quot;name&quot;: &quot;舟山市&quot;,//城市名称
&quot;id&quot;: &quot;cit03420&quot;,//城市id
&quot;provId&quot;: &quot;pro00340&quot;,//省份 id
&quot;plateCode&quot;: &quot;浙L&quot;, //车牌编码
&quot;valid&quot;: true,//是否有效
&quot;areaCode&quot;: &quot;0580&quot;,//区号编码
&quot;cityRank&quot;: &quot;三线&quot;,//几线城市
&quot;cityCode&quot;: &quot;330900&quot;,//城市代码
&quot;provinceCode&quot;: &quot;330000&quot;,//省份代码
&quot;fullSpell&quot;: &quot;zhoushan&quot; //名称全拼
}
]
}
}
</code></pre>
<h4>7.5 失败返回样例</h4>
<pre><code class="language-json">{
&quot;msg&quot;: &quot;参数不正确&quot;,
&quot;code&quot;: 400
}</code></pre>
<h3>8 查询颜色列表</h3>
<h4>8.1 接口描述</h4>
<ul>
<li>查询颜色列表。</li>
</ul>
<h4>8.2 请求地址</h4>
<p><code>https://api.jumdata.com/car-evaluate-v2/color</code></p>
<h4>8.3 业务参数</h4>
<p>无</p>
<h4>8.4 成功返回样例</h4>
<pre><code class="language-json">{
&quot;msg&quot;: &quot;成功&quot;,//code对应的描述
&quot;code&quot;: 200,//返回码,详见code返回码说明
&quot;taskNo&quot;: &quot;968545275134169633742173&quot;,//本次唯一请求号
&quot;charge&quot;: true, //计费标志
&quot;data&quot;: {
&quot;list&quot;: [
{
&quot;seqNO&quot;: 1,//序列号
&quot;name&quot;: &quot;黑色&quot;,//颜色名称
&quot;id&quot;: &quot;Col09&quot; //颜色id
}
]
}
}</code></pre>
<h4>8.5 失败返回样例</h4>
<pre><code class="language-json">{
&quot;msg&quot;: &quot;系统维护,请稍候再试&quot;,
&quot;code&quot;: 500
}</code></pre>