3.20 Vehicle binding equipment(Device) interface
**Request address:** - ` /ivci/api/vehicle/bindingEquipment` **Request method:** - POST,GET **Parameter description** |Parameter name|Type|Description|Remark| |:---- |:---|:----- |----- | |content |String |Requested encrypted data |Mandatory | |merchantId |String |Request customer ID of the users | Mandatory | **Remark** Content json format after decrypted via RSA ``` { "userName":"testuser", "antiFake":"4bbab6ff0d8042548cc6f2df9f3655fa", "timestamp":"20160518165030", "serverIP":"127.0.0.1", "bindVehicle":{ "vehicleId":123456, "equipmentPn":"PN001236589", "metermileage":100.56 } } ``` **Content parameter description** |Parameter name|Type|Description|Remark| |:---- |:---|:----- |----- | |userName | String| User name |Mandatory| |antiFake | String| Anti-fake string |Mandatory| |timestamp | String| Request time stamp to second |Mandatory| |serverIP | String| Server IP |Mandatory| |bindVehicle |json| Bind vehicle information |Mandatory| |bindVehicle.vehicleId | Int |Vehicle id| Mandatory| |bindVehicle.equipmentPn |String | Equipment(Device) PN| Mandatory| |bindVehicle.metermileage | Double | Original meter mileage | Mandatory| **Use examples:** 1. Back end ```java //read privateKeyStr String privateKey=........... // get digital signature SimpleDateFormat formatter = new SimpleDateFormat ("yyyyMMddHHmmss"); String timestamp=formatter.format(new Date()); String signStr=RSAUtils.sign(timestamp.getBytes(), privateKey); String ip=request.getRemoteAddr(); // encrypt with private key String ext=",\"bindVehicle\":{.......}"; String dataStr="{\"userName\":\"testuser\",\"antiFake\":\""+signStr+"\",\"timestamp\":\""+timestamp+"\",\"serverIP\":\""+ip+"\" "+ext+" }"; String content=RSAUtils.encryptByPrivateKey(dataStr, privateKey); ``` 2. Front end Back end returns the encrypted content to the front end, and send request http://xxxxx/ivci/api/vehicle/bindingEquipment?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|Operate 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| | |