Skip to main content
Version: 2.3.0

Delete documents

Updated date: 12/12/2023
Updated by: VNPT eContract's team


Purpose

The function deletes the document when the document is in New document status.

Caution

Document are only delete by the creator.

  • Request URL: /api/documents/delete
  • HTTP method: DELETE
  • Authorize: Bearer token
  • Parameter:
KeyTypeDescription
idstring[Required] Id of document

Sample request

Document id information to be deleted:
id: 14beb1c5-e181-49c0-14bf-08dbfbac357d
Request: /api/documents/delete/14beb1c5-e181-49c0-14bf-08dbfbac357d

Sample response body

{
"data": {
"id": "cb1230b1-fd36-4a98-ac91-c54eaff62b66",
"createdDate": "2023-12-19T09:19:58.4281084",
"lastModifiedDate": "2023-12-19T09:20:24.6641293+07:00",
"no": "IT2.CKDS2023.VNPT.GL2Y",
"subject": "Chứng từ IT2.CKDS2023.VNPT.GL2Y",
"hasVerified": false,
"status": {
"value": -2,
"description": "Deleted"
},
"contractStatus": {
"value": 0,
"description": "Undefined"
},
"createdByUserId": 6,
"processRecipientCount": 0,
"processInOrder": true,
"isWaitToSignDraw": false,
"isWaitToSignDigital": false,
"isWaitToApprove": false,
"isWaitToFillData": false,
"isFillable": false,
"processes": [],
"histories": [
{
"createdDate": "2023-12-19T09:20:24.6641309+07:00",
"requestType": {
"value": 0,
"description": "Web"
},
"ipAddress": "10.70.39.64",
"activity": {
"value": -2,
"description": "Delete document"
}
}
],
"attachments": [],
"relatedDocuments": [],
"linkedDocuments": [],
"messages": [],
"downloadUrl": "{HOST}/Api/Download?token=...",
"downloadOriginalUrl": "{HOST}/Api/Download?token=...",
"sharedUsers": []
},
"success": true,
"code": 0,
"messages": [
"Delete document success"
]
}