Delete Document

User is allow to delete document. Authorization to call this API should be handle by the client application.

Sequence for calling API to delete document

Source Code Sample

JSONObject jsonData = new JSONObject();
jsonData.put("contractnum", "D5CFEE6865AC4C15929A3E3AB11AE95A");
String deleteDocumentsData = Utils.bytes2HexString(Utils.aesEcbPkcs5PaddingEncrypt(jsonData.toString(), apiSecret));
String deleteDocumentsMac = Utils.SHA256(new StringBuilder(deleteDocumentsData).append(apiSecret).toString().getBytes());

HttpDelete deleteRequest = new HttpDelete("/signserver/v1/contract/list" + "?mac=" + deleteDocumentsMac + "&data=" + deleteDocumentsData + "&accesstoken=" + accessToken);
HttpResponse httpResponse = httpclient.execute(target, deleteRequest);
HttpEntity entity = httpResponse.getEntity();
if (entity != null) {
    String response = EntityUtils.toString(entity);
}
Sample code to prepare raw data object for delete document

Request Body Creation

{
	"contractnum": "D5CFEE6865AC4C15929A3E3AB11AE95A"
} 

Example of Request

https://<domain>/signserver/v1/contract/file?accesstoken=1f710ee6-b2ba-4aa4-b07b-538f472e3ff9-000027ed&data=d7319e81cf...............b6a87&mac=c36ac72d5d845a86a06d24d8548a802b3016d8fedc9ea4556d0162e10c4f3612

Expected Response

{
	"result": 0,
	"message": "Success"
}

For error code, please refer to status code page.

{"result":71}

API reference : Delete Document

How can we help?