3.2 Delete organizational architecture interface delDeptById
**Request address:** - ` /ivci/api/dept/delDeptById ` **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: ``` { "userName":"testuser", "antiFake":"4bbab6ff0d8042548cc6f2df9f3655fa", "timestamp":"20160518165030", "serverIP":"127.0.0.1", "deleteDept":{ "deptId":9901 } } ``` **Content parameter description** |Name|Type|Description|Remark| |:---- |:---|:----- |----- | |userName|String|Username|Mandatory| |antiFake|String|Anti-fake random string|Mandatory| |timestamp|String|Request timestamp, accurate to second|Mandatory| |serverIP|String|Server IP|Mandatory| |deleteDept|json|Delete department information|Mandatory| |deleteDept.deptId|String|Delete department information ID|Mandatory| **Use examples::** 1. Back end ```java //Read privateKeyStr 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=”,\”deleteDept\”:{.............}”;//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/delDeptById?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|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 the returned data result (If it succeed, the result will be returned. For querying the data that has been returned successfully, if query it in batch, data will be returned. If query is single, json object will be received. For deleting, updating or other operations, return null, which means no data is returned.| |