Skip to main content
Version: 2.3.0

Login with the processing code

Updated date: 07/08/2026
Updated by: VNPT eContract's team


Purpose​

Perform system login using the processing code sent through the user's email or SMS. After logging in with this code, the user can proceed with document processing.

  • Request URL: /auth/process-code-login
  • HTTP method: POST
  • HTTP content-type: application/json
  • Parameter:
KeyTypeDescription
processCodestring[Required] Processing code

Sample request​

{
"processCode": "220023"
}

Sample response body​

{
"success": true,
"data": {
"token": {
"accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9……"
},
"document": {
"id": "14b197ff-09ec-452b-8975-590d2330f1a9",
"createdDate": "2022-11-28T14:20:42.0606135",
"lastModifiedDate": "2022-11-28T14:20:57.5850304",
"no": "CKDS.20221128.73J3",
"subject": "Chứng từ CKDS.20221128.73J3",
"hasVerified": false,
"status": {
"value": 3,
"description": "Processing document"
},
"department": {
"id": 28,
"name": "VNPT eContract",
"code": "DHB",
"users": []
},
"createdByUserId": 2341,
"processRecipientCount": 1,
"waitingProcess": {
"id": "c4c08c13-1226-4c48-4e58-08dad11115ac",
"createdDate": "2022-11-28T14:20:55.6559845",
"comId": 164,
"isOrder": true,
"orderNo": 1,
"pageSign": 1,
"position": "13,688,193,778",
"displayType": {
"value": 0,
"description": "0"
},
"accessPermission": {
"value": 2,
"description": "Sign draw"
},
"status": {
"value": 1,
"description": "Waiting"
},
"processedByUserId": 2341,
},
"processInOrder": true,
"isWaitToSignDraw": false,
"isWaitToSignDigital": false,
"isWaitToApprove": false,
"isWaitToFillData": false,
"isWaitToCoordinate": false,
"isWaitToESign": false,
"isWaitToEkyc": false,
"isFillable": false,
"type": {
"id": 46,
"code": "CKDS",
"name": "Chiết khấu doanh số",
"description": "Chứng từ chiết khấu doanh số",
"documentCount": 1
},
"processes": [
{
"id": "c4c08c13-1226-4c48-4e58-08dad11115ac",
"createdDate": "2022-11-28T14:20:55.6559845",
"comId": 164,
"isOrder": true,
"orderNo": 1,
"pageSign": 1,
"position": "13,688,193,778",
"displayType": {
"value": 0,
"description": "0"
},
"accessPermission": {
"value": 2,
"description": "Sign draw"
},
"status": {
"value": 1,
"description": "Waiting"
},
"processedByUserId": 2341,
"documentId": "14b197ff-09ec-452b-8975-590d2330f1a9"
}
],
"histories": [
{
"createdDate": "2022-11-28T14:20:55.6559845",
"requestType": {
"value": 0,
"description": "Web"
},
"ipAddress": "::1",
"user": {
"id": 2341,
"code": "SYSADMIN",
"name": "Quản trị hệ thống",
"email": "admin@dochub.vn",
"comId": 164,
"username": "admin@dochub.vn",
"isSelected": false
},
"activity": {
"value": 1,
"description": "Create document"
}
}
]
"attachments": [],
"relatedDocuments": [],
"messages": [],
"file": {
"name": "TEST.pdf",
"size": 260936
},
"downloadUrl": "{HOST}/Api/Download?token=..."
}
}
}

Response Body Description​

KeyTypeDescription
successbooleanRequest processing status (true: Success, false: Failed)
messagesarrayList of messages or errors returned (e.g., ["Invalid process code"])
dataobjectObject containing authentication and detailed document information (see details below)

Details of the data object:​

KeyTypeDescription
tokenobjectContains JWT authentication token information:
{ "accessToken": Token string used for subsequent API requests }
documentobjectDetailed information of the document to be processed (see details below)

Details of the document object:​

KeyTypeDescription
idstringDocument ID
createdDatestringDocument creation time (ISO 8601 format)
lastModifiedDatestringTime of the document's most recent update (ISO 8601 format)
nostringDocument number
subjectstringDocument title
hasVerifiedbooleanDocument verification status
statusobjectDocument status: {"value": int, "description": string}
-4: Expired document
-3: Canceled document
-2: Deleted document
-1: Rejected document
1: New document
2: Ready document
3: Processing document
4: Completed document
5: Correcting document
6: InQueue document
7: Auto Sign processing document
departmentobjectInformation about the department/unit managing the document:
{ 
    "id": "Department ID",  
    "name": "Department name",  
    "code": "Department code",  
    "users": "List of users" 
}
createdByUserIdintID of the user who created the document
processRecipientCountintNumber of recipients processing the document
waitingProcessobjectDetails of the step currently pending processing (see details below)
processInOrderbooleanSequential processing configuration (true: Sequential, false: Parallel)
isWaitToSignDrawbooleanWhether the document is waiting for a draw signature (true/false)
isWaitToSignDigitalbooleanWhether the document is waiting for a digital signature (true/false)
isWaitToApprovebooleanWhether the document is waiting for approval (true/false)
isWaitToFillDatabooleanWhether the document is waiting for data to be filled in (true/false)
isWaitToCoordinatebooleanWhether the document is waiting for coordination (true/false)
isWaitToESignbooleanWhether the document is waiting for an E-Sign signature (true/false)
isWaitToEkycbooleanWhether the document is waiting for eKYC verification signing (true/false)
isFillablebooleanWhether data can be filled into the document's form (true/false)
typeobjectDocument type information:
{
    "id": "Document type ID",
    "code": "Type code",
    "name": "Document type name",
    "description": "Description",
    "documentCount": "Number of related documents"
}
processesarrayList of processing steps in the workflow (Array[object]) (see details below)
historiesarrayList of activity history records on the document (Array[object]) (see details below)
attachmentsarrayList of attached files
relatedDocumentsarrayList of related documents
messagesarrayList of messages/notes on the document
fileobjectMain file information:
{ "name": File name, "size": File size (bytes) }
downloadUrlstringDownload link for the document file

Details of the processes list:​

A list containing the processing step objects in the document workflow, with the attributes of one element:

KeyTypeDescription
idstringIdentifier of the processing step
createdDatestringTime the processing step was created
comIdintID of the company/unit handling the process
isOrderbooleanWhether the processing follows a sequential order
orderNointOrder of the step in the workflow
pageSignintPage on which the signature box is placed
positionstringCoordinates of the signature box position
displayTypeobjectSignature display type:
{ "value": int, "description": string }
accessPermissionobjectDocument processing permission: {"value": int, "description": string}
1: View only
2: Sign draw
3: Approve
4: Sign digital
5: Fill data
6: Coordinate
7: E-Sign
8: eKYC sign
statusobjectStatus of the processing step:
{ "value": int, "description": string }
-1: Rejected
1: Waiting
2: Viewed
3: Signed
4: Approved
5: Filled
7: Coordinated
8: In Queue
processedByUserIdintID of the user performing the processing
documentIdstringID of the related document

Details of the histories list:​

A list containing activity history records, with the attributes of one element:

KeyTypeDescription
createdDatestringTime the action was performed
requestTypeobjectSource of the request: { "value": int, "description": string }
-1: Unspecified
0: Web
1: Api
3: Service
4: Mobile
ipAddressstringIP address of the user who performed the action
userobjectInformation about the user who performed the action:
{
    "id": "User ID",
    "code": "User code",
    "name": "User name",
    "email": "Email",
    "comId": "Company ID",
    "username": "Username"
}
activityobjectAction performed: {"value": int, "description": string}
-3: Cancel document
-2: Delete document
-1: Reject document
1: Create document
2: Update document
3: Invite recipient
4: View document
5: Sign document
6: Download document