Skip to main content
Version: 2.3.0

Create or Update Labor Contract

Updated Date: August 18, 2026
Updated By: VNPT eContract's team


Purpose​

Initialize (or update) a labor contract associated with an existing employee in the system (identified via EmployeeCode, created in API section 7.1). The API returns LaborContractId (in GUID format) — this value must be saved to be used as an input parameter for the API Creating Documents for Labor Contract (section 7.3).

  • Request URL: /api/labor-contracts/create-or-update
  • HTTP method: POST
  • HTTP content-type: application/json
  • Authorize: Bearer token
  • Parameter:
KeyTypeRequiredDescription
EmployeeCodestringYesEmployee code created in API section 7.1
ContractNumberstringYesLabor contract number
JobTitlestringYesJob title
SalarynumberYesSalary level
WorkingPositionintYesJob position based on system catalog
ContractTypeintYesContract type (2: Fixed-term)
ReportTypeintNoReporting method (1: Declaration)
PositionAllowancenumberNoPosition allowance
SeniorityAllowancePercentnumberNoSeniority allowance percentage (%)
ProfessionalSeniorityPercentnumberNoProfessional seniority allowance percentage (%)
SalaryAllowancenumberNoSalary allowance
AdditionalCompensationnumberNoOther additional compensation
EffectiveDatestringYesContract effective date (format: yyyy-MM-dd)
ExpiredDatestringNoContract expiration date (format: yyyy-MM-dd)
NotestringNoContract note
SigningMethodintYesSigning method (1: Electronic Labor Contract)
FilestringNoPath/filename of the contract template used to render contract content
caution

Note: In test data, the File field is passed as a local path on the machine running the test. When integrating in production, partners should confirm with the development team regarding the official mechanism for passing contract files (e.g., pre-uploading via a file upload API, or referencing an existing contract template on the system).

Sample Request​

{
"EmployeeCode": "NVC20260805062149",
"ContractNumber": "HDLD-NVC-20260805062149",
"JobTitle": "Chuyên viên kinh doanh",
"Salary": 20000000,
"WorkingPosition": 2,
"ContractType": 2,
"ReportType": 1,
"PositionAllowance": 1000000,
"SeniorityAllowancePercent": 0,
"ProfessionalSeniorityPercent": 0,
"SalaryAllowance": 500000,
"AdditionalCompensation": 500000,
"EffectiveDate": "2026-06-24",
"ExpiredDate": "2027-06-24",
"Note": "Hợp đồng lao động xác định thời hạn 12 tháng",
"SigningMethod": 1,
"File": "D:\...\Hop-dong-lao-dong-xac-dinh-thoi-han.pdf"
}

Sample Response — HTTP 200​

{
"data": {
"id": "969bfc9a-570f-4d4e-a98b-42361a73f7e8",
"createdDate": "2026-08-05T13:21:53.7572904+07:00",
"employee": {
"id": 1430,
"createdDate": "2026-08-05T13:21:52.8949042",
"userId": 70427,
"employeeCode": "NVC20260805062149",
"fullName": "Nguyễn Văn Cường 2149",
"dateOfBirth": "1997-02-17T00:00:00",
"gender": 1,
"identityNumber": "909218625041",
"email": "nguyenvancuong20260805062149@example.com",
"phoneNumber": "091****109",
"socialInsuranceCode": "BH178591090921862504",
"status": {
"value": 1,
"description": "Enabled"
},
"currentWorkingPosition": 1,
"currentJobTitle": "Chuyên viên kinh doanh",
"currentSalary": 20000000,
"currentSalaryAllowance": 4,
"currentContractType": 2,
"currentReportType": 1,
"currentContractEffectiveDate": "2026-01-15T00:00:00",
"currentContractNote": "Hợp đồng lao động xác định thời hạn tạo qua API",
"currentContractSigningMethod": {
"value": 1,
"description": "Electronic Labor Contract"
},
"syncStatus": {
"value": 1,
"description": "Not Synced"
},
"currentContractNumber": "HDLD-NVC-20260805062149"
},
"employeeFullName": "Nguyễn Văn Cường 2149",
"contractNumber": "HDLD-NVC-20260805062149",
"contractName": "Employment contract Nguyễn Văn Cường 2149",
"status": {
"value": 0,
"description": "Draft"
},
"currentRevisionId": "7a2d74b5-140f-4893-8b4b-fc409077e289",
"currentRevision": {
"id": "7a2d74b5-140f-4893-8b4b-fc409077e289",
"createdDate": "2026-08-05T13:21:53.7994921+07:00",
"laborContractId": "969bfc9a-570f-4d4e-a98b-42361a73f7e8",
"version": 1,
"status": {
"value": 0,
"description": "Draft"
},
"actionType": {
"value": 0,
"description": "Initialization"
},
"currentLaborContractRenderId": "576b48e7-5472-4278-9168-11e23b7bec45",
"employeeFullName": "Nguyễn Văn Cường 2149",
"employeeDateOfBirth": "1997-02-17T00:00:00",
"employeeGender": {
"value": 1,
"description": "Male"
},
"employeeIdentityNumber": "909218625041",
"employeeSocialInsuranceNumber": "BH178591090921862504",
"employeeEmail": "nguyenvancuong20260805062149@example.com",
"employeePhoneNumber": "091****109",
"contractNumber": "HDLD-NVC-20260805062149",
"contractName": "Employment contract Nguyễn Văn Cường 2149",
"contractType": {
"value": 2,
"description": "Fixed-term"
},
"jobTitle": "Chuyên viên kinh doanh",
"workingPosition": {
"value": 2,
"description": "High-level Technical Specialist"
},
"salary": 20000000,
"positionAllowance": 1000000,
"seniorityAllowancePercent": 0,
"professionalSeniorityPercent": 0,
"salaryAllowance": 500000,
"additionalCompensation": 500000,
"effectiveDate": "2026-06-24T00:00:00",
"expiredDate": "2027-06-24T00:00:00",
"signingMethod": {
"value": 1,
"description": "Electronic Labor Contract"
},
"reportType": {
"value": 1,
"description": "Declaration"
},
"syncStatus": {
"value": 1,
"description": "Not Synced"
},
"downloadUrl": "{HOST}/Api/Download?token=...",
"contractFile": {
"fileName": "Hop-dong-lao-dong-xac-dinh-thoi-han.pdf",
"fileSize": 358043
}
},
"totalDocumentCount": 0
},
"success": true,
"code": 0,
"messages": [
"Create labor contract success"
]
}
info

Note: data.id is the LaborContractId — it must be saved to use for Creating Documents for Labor Contract (section 7.3). The newly created contract has status = "Draft" until the corresponding document is created and sent to the signing workflow.

Response Parameter​

KeyTypeDescription
dataobjectDetailed information of the newly created/updated labor contract (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
idstringLabor contract ID (GUID) — used as LaborContractId for the next step
createdDatestringContract creation time (ISO 8601 format)
employeeobjectDetailed information of the linked employee (see below)
employeeFullNamestringFull name of the employee
contractNumberstringLabor contract number
contractNamestringLabor contract name
statusobjectContract status
0: Draft
1: Pending Signature
2: Signing
3: Signed
4: Effective
5: Expired
6: Terminated
7: Cancelled
8: Rejected
9: Correcting
currentRevisionIdstringGUID of the current contract revision
currentRevisionobjectDetailed information of the contract revision (see below)
totalDocumentCountintTotal count of related documents created

Details of employee Object in Response:​

KeyTypeDescription
idintEmployee ID
createdDatestringRecord creation time (ISO 8601 format)
userIdintID of the linked user account
employeeCodestringEmployee code
fullNamestringEmployee full name
dateOfBirthstringDate of birth (ISO 8601 format)
genderintGender (1: Male, 2: Female)
identityNumberstringNational ID / Citizen ID number
emailstringEmployee email address
phoneNumberstringPhone number
socialInsuranceCodestringSocial insurance code
statusobjectEmployee status (1: Enabled)
currentWorkingPositionintCurrent job position
currentJobTitlestringCurrent job title
currentSalarynumberCurrent salary level
currentSalaryAllowancenumberCurrent salary allowance
currentContractTypeintCurrent contract type (2: Fixed-term)
currentReportTypeintContract reporting method
currentContractEffectiveDatestringEffective date of current contract (ISO 8601 format)
currentContractNotestringNote for current contract
currentContractSigningMethodobjectContract signing method (1: Electronic Labor Contract)
syncStatusobjectSynchronization status (1: Not Synced)
currentContractNumberstringCurrent contract number

Details of currentRevision Object in Response:​

KeyTypeDescription
idstringRevision GUID
createdDatestringRevision creation time (ISO 8601 format)
laborContractIdstringLabor contract GUID
versionintContract revision version number
statusobjectRevision status
0: Draft
1: Pending Signature
2: Signing
3: Signed
4: Effective
5: Expired
6: Terminated
7: Cancelled
8: Rejected
9: Correcting
actionTypeobjectAction type
0: Initialization
1: Salary Adjustment
2: Renew Contract
3: Terminate Contract
4: Change Position
5: Update Social Insurance Information
20: Recreate
currentLaborContractRenderIdstringContract render record GUID
employeeFullNamestringEmployee full name
employeeDateOfBirthstringEmployee date of birth (ISO 8601 format)
employeeGenderobjectGender (1: Male)
employeeIdentityNumberstringNational ID / Citizen ID number
employeeSocialInsuranceNumberstringSocial insurance code
employeeEmailstringEmployee email address
employeePhoneNumberstringPhone number
contractNumberstringContract number
contractNamestringContract name
contractTypeobjectContract type (2: Fixed-term)
jobTitlestringJob title
workingPositionobjectJob position (2: High-level Technical Specialist)
salarynumberSalary level
positionAllowancenumberPosition allowance
seniorityAllowancePercentnumberSeniority allowance percentage (%)
professionalSeniorityPercentnumberProfessional seniority allowance percentage (%)
salaryAllowancenumberSalary allowance
additionalCompensationnumberOther additional compensation
effectiveDatestringEffective date (ISO 8601 format)
expiredDatestringExpiration date (ISO 8601 format)
signingMethodobjectSigning method (1: Electronic Labor Contract)
reportTypeobjectReporting method (1: Declaration)
syncStatusobjectSynchronization status (1: Not Synced)
downloadUrlstringDownload URL for draft contract file
contractFileobjectContract file info (fileName, fileSize)

Common Errors​

successcodemessagesMeaning
false0"Cannot create a new labor contract because the employee already has a labor contract that has not been terminated"This employee already has an active labor contract (not yet liquidated/terminated). You need to pass the contract Id to perform an update.
false0"Employee of an existing labor contract cannot be changed"Cannot change employee details for an existing labor contract.
false0"Document number 'TEST.2026.001' has been used."This document number/code is already in use on the system. Please enter a different document number.