Create Document for Labor Contract
Last updated: August 18, 2026 Updated by: VNPT eContract's team
Purpose
Generate the official document from the labor contract created in API section 7.2. The document serves as the basis for submitting the contract to the signing/approval workflow in the system.
- Request URL:
/api/documents/create - HTTP method:
POST - HTTP content-type:
application/json - Authorize:
Bearer token - Parameters:
| Key | Type | Required | Description |
|---|---|---|---|
TypeId | int | Yes | Document type ID according to the system catalog (e.g. 8950 = "HDLD" — Labor Contract) |
DepartmentId | int | Yes | ID of the department issuing the document |
LaborContractId | string (GUID) | Yes | Labor contract ID in GUID format returned by API section 7.2 |
Sample Request
{
"TypeId": 8950,
"DepartmentId": 9855,
"LaborContractId": "969bfc9a-570f-4d4e-a98b-42361a73f7e8"
}
Sample Response — HTTP 200
{
"data": {
"id": "75807d54-7c01-43fd-bd52-309eb04d9fc4",
"createdDate": "2026-08-05T13:21:54.7071423+07:00",
"lastModifiedDate": "2026-08-05T13:21:54.7072758+07:00",
"validFrom": "2026-06-24T00:00:00",
"validTo": "2027-06-24T23:59:59",
"no": "HDLD-NVC-20260805062149",
"subject": "Employment contract Nguyễn Văn Cường 2149",
"hasVerified": false,
"hasVerify": false,
"hasSeal": true,
"requireVerifiedUserSigning": true,
"status": {
"value": 1,
"description": "New"
},
"contractStatus": {
"value": 1,
"description": "Contract valid"
},
"createdByUserId": 27938,
"processRecipientCount": 0,
"waitingProcesses": [],
"processInOrder": false,
"isWaitToSignDraw": false,
"isWaitToSignDigital": false,
"isWaitToApprove": false,
"isWaitToFillData": false,
"isWaitToCoordinate": false,
"isWaitToESign": false,
"isWaitToEkyc": false,
"isFillable": false,
"type": {
"id": 8950,
"code": "HDLD",
"name": "Hợp đồng lao động",
"documentCount": 1,
"enableVnptSeal": false,
"requireVerifiedUserSigning": false,
"children": []
},
"laborContractRevision": {
"id": "7a2d74b5-140f-4893-8b4b-fc409077e289",
"laborContractId": "969bfc9a-570f-4d4e-a98b-42361a73f7e8",
"version": 1,
"status": {
"value": 0,
"description": "Draft"
},
"contractNumber": "HDLD-NVC-20260805062149",
"employeeFullName": "Nguyễn Văn Cường 2149"
},
"processes": [],
"accessibleViewProcesses": [],
"histories": [
{
"createdDate": "2026-08-05T13:21:54.8353817+07:00",
"requestType": {
"value": 0,
"description": "Web"
},
"ipAddress": "10.70.39.163",
"activity": {
"value": 1,
"description": "Create document"
}
}
],
"attachments": [],
"relatedDocuments": [],
"linkedDocuments": [],
"messages": [],
"file": {
"name": "HDLD-NVC-20260805062149.pdf",
"size": 358043
},
"downloadUrl": "{HOST}/Api/Download?token=...",
"downloadOriginalUrl": "{HOST}/Api/Download?token=...",
"downloadWatermarkMetadataUrl": "{HOST}/Api/Download?token=...",
"fillingItems": [],
"sharedUsers": [],
"isMarkStar": false,
"requiresSealSendConfirmation": false,
"fixedPosition": false
},
"success": true,
"code": 0,
"messages": [
"Create document success"
]
}
Response Parameters
| Key | Type | Description |
|---|---|---|
data | object | Detailed information of the newly created document (see below) |
success | boolean | Request processing status (true: Success, false: Failure) |
code | int | Response status code |
messages | array | List of processing response messages from the system |
Details of data Object in Response:
| Key | Type | Description |
|---|---|---|
id | string | Document ID (DocumentId) in GUID format |
createdDate | string | Document creation time (ISO 8601 format) |
lastModifiedDate | string | Most recent document update time (ISO 8601 format) |
validFrom | string | Document validity start time |
validTo | string | Document validity end time |
no | string | Document number |
subject | string | Document subject/title |
hasVerified | boolean | Indicates whether the document has been verified |
hasSeal | boolean | Indicates whether the document uses a seal |
requireVerifiedUserSigning | boolean | Indicates whether the signer is required to verify their account |
status | object | Document status (1: New) |
contractStatus | object | Contract status (1: Contract valid) |
createdByUserId | int | ID of the user account that created the document |
processRecipientCount | int | Number of recipients assigned to process the document |
waitingProcesses | array | List of processes currently waiting |
type | object | Document type details (id, code, name) |
laborContractRevision | object | Details of the linked labor contract revision (similar to the data returned in section 7.2) |
file | object | Document file information (name, size) |
downloadUrl | string | Download URL for the document file |
downloadOriginalUrl | string | Download URL for the original document file |
downloadWatermarkMetadataUrl | string | Download URL for the document file with metadata/watermark attached |