3.19Query vehicle interface under the jurisdiction of the customer
**Request address:** - `/ivci/api/vehicle/getUserVehicles` **Request mode:** - POST,GET **Parameter name** |Parameter name|type|description|remark| |:---- |:---|:----- |----- | |content |String |Requested encrypted data |Mandatory | |merchantId |String |Request customer ID of the users | Mandatory | **Remark** Content is decrypted into json format via RSA ``` { "userName":"testuser", "antiFake":"4bbab6ff0d8042548cc6f2df9f3655fa", "timestamp":"20160518165030", "serverIP":"127.0.0.1" } ``` **Content parameter description** |ParameterName|Type|Description|Remark| |:---- |:---|:----- |----- | |userName | String | User name |Mandatory| |antiFake | String | Anti-fake random string |Mandatory| |timestamp | String | Request time stamp,accurate to second |Mandatory| |serverIP | String | Server IP |Mandatory| **Use exampless:** 1. Backend ```java //read privateKeyStr String privateKey=........... //gete data signature SimpleDateFormat formatter = new SimpleDateFormat ("yyyyMMddHHmmss"); String timestamp=formatter.format(new Date()); String signStr=RSAUtils.sign(timestamp.getBytes(), privateKey); String ip=request.getRemoteAddr(); //encrypted with private key String ext=””; String dataStr=”{\“userName\”:\”testuser\”,\“antiFake\”:\””+signStr+”\”,\“timestamp\”:\””+timestamp+”\”,\"serverIP\":\""+ip+”\” “+ext+” }”; String content=RSAUtils.encryptByPrivateKey(dataStr, privateKey); ``` 2. Front end The backend return the encrypted content to the front end, and then send the requestcalling http://xxxxx/ivci/api/vehicle/getUserVehicles?merchantId=100000&content=content **Return data** Return data should be in json format. ```json {"code":0,"msg":"operation failure","data":{}} ``` **Return parameter** |Parameter name|Type|Description|Remark| |:---- |:---|:----- |----- | |code | String | Operation result code(success=0,failure=1),refer to appendix 1 |Return | |msg |String | Operate return information(Operation success,return null,operation failure,return prompt information)| | |data | json | Vehicle information of the user account |Return| Data structure,as follow: ```javascript "data":[ {"vehicleId":16353956,"plateNo":"渝B02T26"}, {"vehicleId":16353959,"plateNo":"IOT001"}, {"vehicleId":16353960,"plateNo":"IOT002"}, {"vehicleId":16353961,"plateNo":"IOT003"}, {"vehicleId":16353762,"plateNo":"渝A8T962"}] ``` |Parameter name|Type|Description|Remark| |:---- |:---|:----- |----- | |vehicleId | Int |Vehicle id |Return| |plateNo |String | Plate number |Return| Return data need to be decoded, the decryption process is as follows: ```java String key="......"; String mi="56D56B912C68308AA6D863DE087DBFD82D65C37836FC15E0B92"; String ming=RSAUtils.decryptByPrivateKey(mi, key); ```