Send the imported batch document process
Updated date: 30/04/2023
Updated by: VNPT eContract's team
Purpose
Performing the sending of the processing workflow for the imported documents in the document batch.
- Request URL:
/api/batch-imports/send
- HTTP method:
POST
- Authorize:
Bearer token
- Parameter:
Key | Type | Description |
---|---|---|
id | int | [Required] Id of batch |
Sample request
Id of batch need to send process:
id: 1234
Request: /api/batch-imports/send/1234
Sample response body
{
"data": {
"id": 1234,
"createdDate": "2022-12-13T10:21:51.712847",
"uploadedByUserId": 2341,
"numberOfRecords": 3,
"name": "Test batch import via API",
"documents": [
{
"id": "e78e0529-5444-461b-f25d-08dadcb92ffb",
"createdDate": "2022-12-13T10:21:55.7754631",
"lastModifiedDate": "2022-12-13T10:35:32.0989272+07:00",
"expiryDate": "2022-12-15T00:00:00",
"no": "IG76",
"subject": "Labor_03",
"hasVerified": false,
"fileType": 0,
"status": {
"value": 2,
"description": "Ready document"
},
"contractStatus": {
"value": 0,
"description": "Undefined"
},
"description": "Labor contract 03",
"createdByUserId": 2341,
"processRecipientCount": 3,
"waitingProcess": {
"id": "bccb777c-76ea-4aaa-d625-08dadcb93017",
"createdDate": "2022-12-13T10:21:55.7754418",
"comId": 164,
"isOrder": true,
"orderNo": 1,
"displayType": {
"value": 0,
"description": "0"
},
"accessPermission": {
"value": 2,
"description": "Sign draw"
},
"status": {
"value": 1,
"description": "Waiting"
},
"processedByUserId": 2328,
"documentId": "e78e0529-5444-461b-f25d-08dadcb92ffb"
},
"processInOrder": true,
"isWaitToSignDraw": false,
"isWaitToSignDigital": false,
"isWaitToApprove": false,
"isCancelable": false,
"isEditable": false,
"isShareable": false,
"isAccessable": false,
"isExpired": false,
"canDownload": false,
"downloadUrl": "{HOST}/Api/Download?token=..."
}
],
"isSendable": true,
"isCancelable": true
},
"success": true,
"code": 0,
"messages": [
"Send batch document success"
]
}
Return code
Code | Description |
---|---|
202 | Processing has not been finished |
Caution
Code: 202 => A batch of documents is being processed, the more documents a batch has, the longer the system will process and convert them into files. Depending on the number of documents, when encountering this error code, the api needs to be called again after xxx seconds. (xxx depends on the number of documents in the batch, for example: batch of 10 documents, call back after 15 seconds)