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

Cập nhật quy trình chứng từ

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


Mục đích

Hàm thực hiện cập nhật thông tin quy trình xử lý chứng từ, bao gồm thông tin về người xử lý trong quy trình và quyền xử lý chứng từ.

  • Request URL: /api/documents/update-process
  • HTTP method: POST
  • HTTP content-type: application/json
  • Authorize: Bearer token
  • Parameter:
KeyTypeDescription
idstring[Bắt buộc] Id chứng từ cần cập nhật quy trình
processInOrderbooleanCấu hình mẫu chứng từ là tuần tự hay không tuần tự:
true: quy trình xử lý tuần tự
false: quy trình xử lý không tuần tự
processesArray[object]Mảng thông tin người tham gia và xử lý chứng từ trong quy trình:
{
"orderNo": Số thứ tự xử lý trong quy trình,
"processedByUserCode": Mã của người xử lý trong quy trình,
"accessPermissionCode": Mã quyền xử lý chứng từ trong quy trình
}
mẹo

accessPermissionCode là các quyền truy cập (V, D, DR, A). Với:

  • Vchỉ xem
  • Dký số
  • DRký nháy
  • Aphê duyệt
  • Fđiền dữ liệu
Caution

F luôn được xếp trước DDR trong quy trình xử lý tuần tự

Mẫu request

{
"id": "73f4e64c-521e-457f-013f-08dad829ec1c",
"processInOrder": true,
"processes": [
{
"orderNo": 1,
"processedByUserCode": "baoth",
"accessPermissionCode": "DR"
},
{
"orderNo": 2,
"processedByUserCode": "phannhan",
"accessPermissionCode": "D"
},
{
"orderNo": 3,
"processedByUserCode": "processes",
"accessPermissionCode": "A"
}
]
}

Mẫu response body

{
"data": {
"id": "73f4e64c-521e-457f-013f-08dad829ec1c",
"createdDate": "2022-12-07T15:06:17.9285943",
"lastModifiedDate": "2022-12-07T15:07:33.5124703+07:00",
"no": "Test0.6228890976236303",
"subject": "Test0.6228890976236303",
"hasVerified": false,
"fileType": 0,
"status": {
"value": 1,
"description": "New document"
},
"contractStatus": {
"value": 0,
"description": "Undefined"
},
"description": "Test tạo mới chứng từ bằng API",
"createdByUserId": 2341,
"processRecipientCount": 2,
"processInOrder": false,
"isWaitToSignDraw": false,
"isWaitToSignDigital": false,
"isWaitToApprove": false,
"isCancelable": true,
"isEditable": true,
"isShareable": false,
"isAccessable": false,
"isExpired": false,
"canDownload": false,
"processes": [
{
"id": "9ba763ea-e6f2-4dfb-b6de-08dad82a185b",
"createdDate": "2022-12-07T15:07:33.5122804+07:00",
"comId": 164,
"isOrder": false,
"orderNo": 1,
"pageSign": 0,
"displayType": {
"value": 0,
"description": "0"
},
"accessPermission": {
"value": 1,
"description": "View only"
},
"status": {
"value": 1,
"description": "Waiting"
},
"processedByUserId": 2341,
"documentId": "73f4e64c-521e-457f-013f-08dad829ec1c"
},
{
"id": "04434de3-4bd4-4576-b6df-08dad82a185b",
"createdDate": "2022-12-07T15:07:33.5124667+07:00",
"comId": 164,
"isOrder": false,
"orderNo": 2,
"pageSign": 0,
"displayType": {
"value": 0,
"description": "0"
},
"accessPermission": {
"value": 2,
"description": "Sign draw"
},
"status": {
"value": 1,
"description": "Waiting"
},
"processedByUserId": 2341,
"documentId": "73f4e64c-521e-457f-013f-08dad829ec1c"
},
{
"id": "40259656-d5fb-4a3b-b6e0-08dad82a185b",
"createdDate": "2022-12-07T15:07:33.5124699+07:00",
"comId": 164,
"isOrder": false,
"orderNo": 3,
"pageSign": 0,
"displayType": {
"value": 0,
"description": "0"
},
"accessPermission": {
"value": 3,
"description": "Approve"
},
"status": {
"value": 1,
"description": "Waiting"
},
"processedByUserId": 2341,
"documentId": "73f4e64c-521e-457f-013f-08dad829ec1c"
}
],
"histories": [
{
"createdDate": "2022-12-07T15:07:33.5125307+07:00",
"requestType": {
"value": 0,
"description": "Web"
},
"ipAddress": "10.70.39.66",
"activity": {
"value": 2,
"description": "Update document"
}
}
],
"messages": [],
"downloadUrl": "{HOST}/Api/Download?token=..."
},
"success": true,
"code": 0,
"messages": [
"Update document success"
]
}