3.3 Modify organization architecture interface: updateDept
**Request address:** - ` /ivci/api/dept/updateDept ` **Request mode:** - POST,GET **Parameter description** |Parameter name|Type|Description|Remark| |:---- |:---|:----- |----- | |content| String | Request encrypted data| Mandatory| |merchantId | String | Request customer ID of the users | Mandatory| **Note** Content json format after decrypted via RSA ```json { "userName":"testuser", "antiFake":"4bbab6ff0d8042548cc6f2df9f3655fa", "timestamp":"20160518165030", "serverIP":"127.0.0.1", "updateDept":{ "deptId":100, "deptName":"test department", "depfsId":0, "deptAddress":"Shenzhen, Guangdong Prov.", "personinCharge":"jasion", "personinPhone":"18888888888" } } ``` **Content parameter description** |Name|Type|Description|Remark| |:---- |:---|:----- |----- | |userName | String| Username| Mandatory| |antiFake | String | Anti-fake random string | Mandatory| |timestamp | String |Request timestamp, accurate to seconds | Mandatory| |serverIP | String | Server IP | Mandatory| |updateDept |json | Modify department information | Mandatory| |updateDept.deptName| String| Modify department name | Optional| |updateDept.depfsId| String | Modify superior of department | Optional| |updateDept.deptAddress | String | Modify department address | Optional| |updateDept.personinCharge | String| Modify department server |Optional| |updateDept.personinPhone | String | Modify epartment director phone number | Optional| |updateDept.deptId | String | Modify department ID| Mandatory| **Use examples:** 1. Back end ```java //Read teKeyStr String privateKey=........... //Acquire data signature SimpleDateFormat formatter = new SimpleDateFormat ("yyyyMMddHHmmss"); String timestamp=formatter.format(new Date()); String signStr=RSAUtils.sign(timestamp.getBytes(), privateKey); String ip=request.getRemoteAddr(); //Encrypting with private key String ext=",\"updateDept\":{.............}";//Add department information String dataStr="{\“userName\":\"testuser\",\“antiFake\":\""+signStr+"\",\“timestamp\":\""+timestamp+"\",\"serverIP\":\""+ip+"\" “+ext+" }"; String content=RSAUtils.encryptByPrivateKey(dataStr, privateKey); ``` 2. Front end The background returns the encrypted content to the front-end, and then sends the request. http://xxxxx/ivci/api/dept/updateDept?merchantId=100000&content=content **Return data** All return data should be in json format. ```json {"code":1,"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 message (If success, return null; failure, return the prompt message )| | |data | json | Operate return data result (Success, return result, for example, if query success, return the query data. Batch query, return data. Single query, return json object. If delete or updata, return null, that doesn’t return the message )| |