Skip to main content
Version: 2.3.0

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:
KeyTypeRequiredDescription
TypeIdintYesDocument type ID according to the system catalog (e.g. 8950 = "HDLD" — Labor Contract)
DepartmentIdintYesID of the department issuing the document
LaborContractIdstring (GUID)YesLabor 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​

KeyTypeDescription
dataobjectDetailed information of the newly created document (see below)
successbooleanRequest processing status (true: Success, false: Failure)
codeintResponse status code
messagesarrayList of processing response messages from the system

Details of data Object in Response:​

KeyTypeDescription
idstringDocument ID (DocumentId) in GUID format
createdDatestringDocument creation time (ISO 8601 format)
lastModifiedDatestringMost recent document update time (ISO 8601 format)
validFromstringDocument validity start time
validTostringDocument validity end time
nostringDocument number
subjectstringDocument subject/title
hasVerifiedbooleanIndicates whether the document has been verified
hasSealbooleanIndicates whether the document uses a seal
requireVerifiedUserSigningbooleanIndicates whether the signer is required to verify their account
statusobjectDocument status (1: New)
contractStatusobjectContract status (1: Contract valid)
createdByUserIdintID of the user account that created the document
processRecipientCountintNumber of recipients assigned to process the document
waitingProcessesarrayList of processes currently waiting
typeobjectDocument type details (id, code, name)
laborContractRevisionobjectDetails of the linked labor contract revision (similar to the data returned in section 7.2)
fileobjectDocument file information (name, size)
downloadUrlstringDownload URL for the document file
downloadOriginalUrlstringDownload URL for the original document file
downloadWatermarkMetadataUrlstringDownload URL for the document file with metadata/watermark attached