车辆维保(停用)
<h2>概述</h2>
<p>车辆维保接口,包括以下API:
<a href="#gen">1. 生成报告</a>
<a href="#get">2. 获取报告</a></p>
<h2>Api接入说明</h2>
<h3>公用参数</h3>
<p>车辆维保所有API都需要以下公用参数</p>
<table>
<thead>
<tr>
<th>名称</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td>appId</td>
<td>String</td>
<td>服务商分配的唯一标识</td>
</tr>
<tr>
<td>timestamp</td>
<td>Long</td>
<td>当前时间的毫秒数</td>
</tr>
<tr>
<td>sign</td>
<td>String</td>
<td>签名,详见签名算法说明</td>
</tr>
</tbody>
</table>
<p><a name="sign"></a></p>
<h3>签名算法</h3>
<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 = "xyzxy2121zxyz";
String timestamp = "1555378976238";
String appSecret = "efcefcef1121cefcefc1212121";
String str = appId + appSecret + timestamp;
String sign = sha256(str);</code></pre>
<h3>公共code返回码说明</h3>
<table>
<thead>
<tr>
<th>code</th>
<th>说明</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>603</td>
<td>余额不足请充值</td>
</tr>
<tr>
<td>604</td>
<td>接口停用</td>
</tr>
<tr>
<td>999</td>
<td>其他,以实际返回为准</td>
</tr>
</tbody>
</table>
<blockquote>
<p>具体API返回码,请见以下具体API说明</p>
</blockquote>
<p><a name="gen"></a></p>
<h2>生成报告</h2>
<h3>请求地址</h3>
<p><code>https://api.jumdata.com/vehicle/maintenance-report/generate</code></p>
<h3>请求方式</h3>
<ul>
<li>GET/POST</li>
</ul>
<h3>参数</h3>
<table>
<thead>
<tr>
<th>名称</th>
<th>必须</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td>vin</td>
<td>是</td>
<td>车架号</td>
</tr>
<tr>
<td>licenseImgUrl</td>
<td>是</td>
<td>行驶证图片地址</td>
</tr>
</tbody>
</table>
<blockquote>
<p>注:公共参数必须,详见公共参数说明</p>
</blockquote>
<h3>正确返回</h3>
<pre><code class="language-json">{
"msg": "成功",
"code": 200,
"taskNo": "09522434433117405247", // 本次请求号
"data": {
"requestId": "f39MnWfC3r1oErniJ65pn63jgjW6691E",//报告编号
"info": {//维保信息
"overview": {//车身概况
"appearance": {
"is_exception": 1,//1 有异常 0 无异常
"label": "外观",//配件描述
"exceptions": [//异常情况
"前保:油漆",
"后保:油漆",
"保险杠:拆卸"
]
},
"engine": {
"is_exception": 0,
"label": "发动机",
"exceptions": []
},
"airbag": {
"is_exception": 0,
"label": "安全气囊",
"exceptions": []
},
"frame": {
"is_exception": 0,
"label": "车架",
"exceptions": []
}
},
"first_time_to_shop": "2015-12-13",//首次到店时间
"content_numbers": "3",//维保次数
"brand_pic": "",//平台图片 logo 地址
"brand_name": "大众",//车型
"vinNO": "LSV******",//车架号
"avg_upkeep_year": "3",//年均保养次数
"avg_mileage_year": "",//年均行驶里程
"total_mileage": "9636",//总里程数
"accident_grade": "B",//事故车等级:分为 A、B、C、D 四个 等级
"is_accident_reason": "左前大灯;",//事故车原因描述
"first_mileage": 2197,//首次到店公里数
"is_accident": -1,//是否事故车(-1:否;0:未知;1:是)
"result_content": [//维修记录
{
"date": "2018-05-25",//时间
"mainTainDate": 1464105610,//维保时间戳
"materal": "",//材料
"remark": "",//备注,null 比较多
"type": "汽车维修",//维保类型(使用 type_code 作为维保类 型,此字段可忽略)
"content": "",//维保内容
"mileage": 9636,//里程
"type_code": "2",//1、保养 2、维修 3、检查 4、其他
"payType":"",//支付类型,null 比较多
"totalMoney":"100",//总金额
}
],
"updatetime": "2022-01-05",//时间
"last_time_to_shop": "2016-05-25",//最后到店时间
"last_mileage": ""//最后到店里程
}
},
}</code></pre>
<h3>失败返回</h3>
<pre><code class="language-json">{
"msg": "接口地址不正确",
"code": 404
}</code></pre>
<h3>code返回码说明</h3>
<table>
<thead>
<tr>
<th>code</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td>701</td>
<td>报告还未生成,请稍后查询</td>
</tr>
<tr>
<td>702</td>
<td>查询失败</td>
</tr>
<tr>
<td>703</td>
<td>暂不支持该品牌</td>
</tr>
</tbody>
</table>
<p><a name="get"></a></p>
<h2>获取报告</h2>
<h3>请求地址</h3>
<p><code>https://api.jumdata.com/vehicle/maintenance-report/get</code></p>
<h3>请求方式</h3>
<ul>
<li>GET/POST</li>
</ul>
<h3>参数</h3>
<table>
<thead>
<tr>
<th>名称</th>
<th>必须</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td>requestId</td>
<td>是</td>
<td>生成报告返回的请求id</td>
</tr>
</tbody>
</table>
<blockquote>
<p>注:公共参数必须,详见公共参数说明</p>
</blockquote>
<h3>正确返回</h3>
<pre><code class="language-json">{
"msg": "成功",
"code": 200,
"taskNo": "09522434433117405247", // 本次请求号
"data": {
"overview": {//车身概况
"appearance": {
"is_exception": 1,//1 有异常 0 无异常
"label": "外观",//配件描述
"exceptions": [//异常情况
"前保:油漆",
"后保:油漆",
"保险杠:拆卸"
]
},
"engine": {
"is_exception": 0,
"label": "发动机",
"exceptions": []
},
"airbag": {
"is_exception": 0,
"label": "安全气囊",
"exceptions": []
},
"frame": {
"is_exception": 0,
"label": "车架",
"exceptions": []
}
},
"first_time_to_shop": "2015-12-13",//首次到店时间
"content_numbers": "3",//维保次数
"brand_pic": "",//平台图片 logo 地址
"brand_name": "大众",//车型
"vinNO": "LSV******",//车架号
"avg_upkeep_year": "3",//年均保养次数
"avg_mileage_year": "",//年均行驶里程
"total_mileage": "9636",//总里程数
"accident_grade": "B",//事故车等级:分为 A、B、C、D 四个 等级
"is_accident_reason": "左前大灯;",//事故车原因描述
"first_mileage": 2197,//首次到店公里数
"is_accident": -1,//是否事故车(-1:否;0:未知;1:是)
"result_content": [//维修记录
{
"date": "2018-05-25",//时间
"mainTainDate": 1464105610,//维保时间戳
"materal": "",//材料
"remark": "",//备注,null 比较多
"type": "汽车维修",//维保类型(使用 type_code 作为维保类 型,此字段可忽略)
"content": "",//维保内容
"mileage": 9636,//里程
"type_code": "2",//1、保养 2、维修 3、检查 4、其他
"payType":"",//支付类型,null 比较多
"totalMoney":"100",//总金额
}
],
"updatetime": "2022-01-05",//时间
"last_time_to_shop": "2016-05-25",//最后到店时间
"last_mileage": ""//最后到店里程
}
}</code></pre>
<h3>失败返回</h3>
<pre><code class="language-json">{
"msg": "报告还未生成,请稍后查询 ",
"code": 701
}</code></pre>
<h3>code返回码说明</h3>
<table>
<thead>
<tr>
<th>code</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td>701</td>
<td>报告还未生成,请稍后查询</td>
</tr>
<tr>
<td>702</td>
<td>查询失败</td>
</tr>
</tbody>
</table>