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:
| Key | Type | Description |
|---|---|---|
processCode | string | [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
| Key | Type | Description |
|---|---|---|
success | boolean | Request processing status (true: Success, false: Failed) |
messages | array | List of messages or errors returned (e.g., ["Invalid process code"]) |
data | object | Object containing authentication and detailed document information (see details below) |
Details of the data object:
| Key | Type | Description |
|---|---|---|
token | object | Contains JWT authentication token information:{ "accessToken": Token string used for subsequent API requests } |
document | object | Detailed information of the document to be processed (see details below) |
Details of the document object:
| Key | Type | Description |
|---|---|---|
id | string | Document ID |
createdDate | string | Document creation time (ISO 8601 format) |
lastModifiedDate | string | Time of the document's most recent update (ISO 8601 format) |
no | string | Document number |
subject | string | Document title |
hasVerified | boolean | Document verification status |
status | object | Document 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 |
department | object | Information about the department/unit managing the document: {
"id": "Department ID",
"name": "Department name",
"code": "Department code",
"users": "List of users"
} |
createdByUserId | int | ID of the user who created the document |
processRecipientCount | int | Number of recipients processing the document |
waitingProcess | object | Details of the step currently pending processing (see details below) |
processInOrder | boolean | Sequential processing configuration (true: Sequential, false: Parallel) |
isWaitToSignDraw | boolean | Whether the document is waiting for a draw signature (true/false) |
isWaitToSignDigital | boolean | Whether the document is waiting for a digital signature (true/false) |
isWaitToApprove | boolean | Whether the document is waiting for approval (true/false) |
isWaitToFillData | boolean | Whether the document is waiting for data to be filled in (true/false) |
isWaitToCoordinate | boolean | Whether the document is waiting for coordination (true/false) |
isWaitToESign | boolean | Whether the document is waiting for an E-Sign signature (true/false) |
isWaitToEkyc | boolean | Whether the document is waiting for eKYC verification signing (true/false) |
isFillable | boolean | Whether data can be filled into the document's form (true/false) |
type | object | Document type information: {
"id": "Document type ID",
"code": "Type code",
"name": "Document type name",
"description": "Description",
"documentCount": "Number of related documents"
} |
processes | array | List of processing steps in the workflow (Array[object]) (see details below) |
histories | array | List of activity history records on the document (Array[object]) (see details below) |
attachments | array | List of attached files |
relatedDocuments | array | List of related documents |
messages | array | List of messages/notes on the document |
file | object | Main file information: { "name": File name, "size": File size (bytes) } |
downloadUrl | string | Download 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:
| Key | Type | Description |
|---|---|---|
id | string | Identifier of the processing step |
createdDate | string | Time the processing step was created |
comId | int | ID of the company/unit handling the process |
isOrder | boolean | Whether the processing follows a sequential order |
orderNo | int | Order of the step in the workflow |
pageSign | int | Page on which the signature box is placed |
position | string | Coordinates of the signature box position |
displayType | object | Signature display type: { "value": int, "description": string } |
accessPermission | object | Document 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 |
status | object | Status 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 |
processedByUserId | int | ID of the user performing the processing |
documentId | string | ID of the related document |
Details of the histories list:
A list containing activity history records, with the attributes of one element:
| Key | Type | Description |
|---|---|---|
createdDate | string | Time the action was performed |
requestType | object | Source of the request: { "value": int, "description": string } -1: Unspecified 0: Web 1: Api 3: Service 4: Mobile |
ipAddress | string | IP address of the user who performed the action |
user | object | Information about the user who performed the action: {
"id": "User ID",
"code": "User code",
"name": "User name",
"email": "Email",
"comId": "Company ID",
"username": "Username"
} |
activity | object | Action 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 |