Nhảy tới nội dung
Phiên bản: 2.3.0

Gửi quy trình lô chứng từ đã import

Ngày cập nhật: 30 tháng 4, 2023
Người cập nhật: VNPT eContract's team


Mục đích

Hàm thực hiện gửi quy trình xử lý cho các chứng từ đã import trong lô chứng từ.

  • Request URL: /api/batch-imports/send
  • HTTP method: POST
  • Authorize: Bearer token
  • Parameter:
KeyTypeDescription
idint[Bắt buộc] Id lô chứng từ

Mẫu request

Thông tin id lô chứng từ cần gửi quy trình:
id: 1234
Request: /api/batch-imports/send/1234

Mẫu response body

{
"data": {
"id": 1234,
"createdDate": "2022-12-13T10:21:51.712847",
"uploadedByUserId": 2341,
"numberOfRecords": 3,
"name": "Test import lô chứng từ bằng 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": "HĐLĐ_03",
"hasVerified": false,
"fileType": 0,
"status": {
"value": 2,
"description": "Ready document"
},
"contractStatus": {
"value": 0,
"description": "Undefined"
},
"description": "Hợp đồng lao động 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"
]
}

Mã trả về

CodeDescription
202Quá trình xử lý vẫn chưa kết thúc
Lưu ý

Code: 202 => Lô chứng từ đang được xử lý, lô càng nhiều chứng từ, hệ thống sẽ xử lý chuyển đổi thành file càng lâu, tùy vào số lượng chứng từ khi gặp mã lỗi này cần gọi lại api sau xxx giây. (xxx phụ thuộc số lượng chứng từ trong lô, ví dụ: lô 10 chứng từ gọi lại sau 15 giây)

mẹo

Xem thêm: Webhook