Skip to main content
Version: 2.3.0

Create Multi-file Document

Last updated: September 16, 2026
Updated by: VNPT eContract's team


Purpose​

Create a new document that supports multiple files, allowing simultaneous upload of multiple component files within the same document. The API returns the DocumentId of the document and the list of fileInfoId corresponding to each uploaded file. The fileInfoId values are used as input when configuring the signing process for each file in the Update Document Process API.

  • Request URL: /v2/documents/create
  • HTTP method: POST
  • HTTP content-type: multipart/form-data
  • Authorize: Bearer token
  • Parameter:
KeyTypeRequiredDescription
nostring(40)YesDocument number/code
subjectstring(200)YesDocument title
descriptionstring(500)NoDocument description
typeIdintYesDocument type Id according to the system catalog
departmentIdintYesId of the department issuing the document
filesarray<file>YesList of component files of the document, passed directly in the request in multipart/form-data format. Supports passing multiple files in the same request
relatedDocumentIdsarray<GUID>NoDocumentId of an existing document — used when needing to extract/link additional files into an existing document
attachmentsarray<file>NoArray list of attachment files for the document
customerCodestring(500)NoCustomer code, used to identify or reference the customer related to the document
customerInformationstring(100)NoCustomer information related to the document

Sample request​

FieldSample value
noDOCUMENT-MF-001
subjectMulti-file document DOCUMENT-MF-001
descriptionExample of multi-file document creation
typeId8950
departmentId9855
files[Tai-lieu-chinh.pdf, Phu-luc-01.pdf]

Sample response body​

{
"data": {
"id": "f5b0c112-d357-44ce-b8a8-7cb77d3d0b9e",
"createdDate": "2026-08-13T11:12:51.3713264+07:00",
"lastModifiedDate": "2026-08-13T11:12:51.3714737+07:00",
"no": "DOCUMENT-MF-001",
"subject": "Multi-file document DOCUMENT-MF-001",
"hasVerified": false,
"hasVerify": false,
"hasSeal": false,
"requireVerifiedUserSigning": false,
"status": {
"value": 1,
"description": "New"
},
"contractStatus": {
"value": 0,
"description": "Undefined"
},
"description": "Example of multi-file document creation",
"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": "DOCID",
"name": "Test document",
"documentCount": 1,
"enableVnptSeal": false,
"requireVerifiedUserSigning": false,
"children": []
},
"processes": [],
"accessibleViewProcesses": [],
"histories": [
{
"createdDate": "2026-08-13T11:12:51.6256727+07:00",
"requestType": {
"value": 0,
"description": "Web"
},
"ipAddress": "10.70.39.34",
"activity": {
"value": 1,
"description": "Create document"
}
}
],
"attachments": [],
"relatedDocuments": [],
"linkedDocuments": [],
"messages": [],
"fillingItems": [],
"sharedUsers": [],
"isMarkStar": false,
"downloadFileUrls": [
{
"id": "9d2a2be2-e55e-4c17-f7ec-08def8f12485",
"fileName": "Tai-lieu-chinh.pdf",
"orderNo": 1,
"size": 288288,
"fileType": {
"value": 0,
"description": "General"
},
"downloadUrl": "{HOST}/api/Download?token=..."
},
{
"id": "bd4421b7-9aef-4a40-f7ed-08def8f12485",
"fileName": "Phu-luc-01.pdf",
"orderNo": 2,
"size": 73919,
"fileType": {
"value": 0,
"description": "General"
},
"downloadUrl": "{HOST}/api/Download?token=..."
}
],
"zipDownloadUrl": "{HOST}/api/Download/MergeFilesZipDocument?token=...",
"requiresSealSendConfirmation": false,
"fixedPosition": false,
"isLaborContractDocument": false
},
"success": true,
"code": 0,
"messages": [
"Create document success"
]
}

Response Body Description​

KeyTypeDescription
successbooleanResponse status of the request (true: Success, false: Failure)
codeintResponse code from the system
messagesarrayList of messages or errors returned from the system
dataobjectObject containing details of the newly created document (see details below)

Details of data:​

KeyTypeDescription
idGUIDDocumentId of the newly created document
createdDatedatetimeTime the document was created (ISO 8601 format)
lastModifiedDatedatetimeTime of the most recent update (ISO 8601 format)
nostringDocument number/code (matches the no value in the request)
subjectstringDocument title
descriptionstringDocument description
hasVerifiedbooleanWhether the document has been verified
hasVerifybooleanWhether the document requires verification
hasSealbooleanWhether the document requires message authentication (VNPT SEAL)
requireVerifiedUserSigningbooleanWhether the signer is required to verify their identity
statusobjectDocument status: {"value": int, "description": string}
1: New document
2: Ready
3: Processing
4: Completed
5: Being revised
-1: Rejected
-2: Deleted
-3: Cancelled
contractStatusobjectContract validity status: {"value": int, "description": string}
0: Undefined
1: Still valid
2: Near expiry
-1: Expired
-2: Not yet effective
createdByUserIdintId of the document creator
processRecipientCountintNumber of participants in the process
waitingProcessesarrayList of people currently pending processing (empty when the document has not yet been sent to a process)
processInOrderbooleanWhether processing is sequential (true) or parallel (false)
isWaitToSignDrawbooleanPending initial signature status (true/false)
isWaitToSignDigitalbooleanPending digital signature status (true/false)
isWaitToApprovebooleanPending approval status (true/false)
isWaitToFillDatabooleanPending data entry status (true/false)
isWaitToCoordinatebooleanPending coordination status (true/false)
isWaitToESignbooleanPending E-Sign (electronic signature) status (true/false)
isWaitToEkycbooleanPending eKYC verification signature status (true/false)
isFillablebooleanWhether the document allows data entry (form-filling)
typeobjectDocument type (see details below):
{
    "id": int,
    "code": string,
    "name": string,
    "documentCount": int,
    "enableVnptSeal": boolean,
    "requireVerifiedUserSigning": boolean,
    "children": array
}
processesarrayList of processing steps configured for the document (empty at the creation step)
accessibleViewProcessesarrayList of people granted permission to view the document
historiesarrayDocument action history (Array[object]) (see details below)
attachmentsarrayList of attachments accompanying the document (Array[object])
relatedDocumentsarrayList of related documents (Array[object])
linkedDocumentsarrayList of linked documents (Array[object])
messagesarray<string>Additional messages at the data level (different from the outer messages in the response)
fillingItemsarrayList of data fields to be filled in (if the document is a form)
sharedUsersarrayList of people the document has been shared with for viewing
isMarkStarbooleanWhether the document is marked as starred
downloadFileUrlsarrayList of uploaded component files (Array[object]) (see details below)
zipDownloadUrlstringURL to download all files as a zip
requiresSealSendConfirmationbooleanWhether confirmation is required before sending message authentication (VNPT SEAL)
fixedPositionbooleanWhether the signature position is fixed
isLaborContractDocumentbooleanWhether the document is associated with a labor contract (LaborContractId)

Details of the type object:​

KeyTypeDescription
idintDocument type Id
codestringDocument type code (e.g.: DOCID)
namestringDocument type name
documentCountintNumber of documents created under this type
enableVnptSealbooleanWhether this document type has message authentication (VNPT SEAL) enabled
requireVerifiedUserSigningbooleanWhether this document type requires signer verification
childrenarrayList of child document types (if any)

Details of the downloadFileUrls list:​

A list containing the uploaded component file objects, with the properties of 1 element:

KeyTypeDescription
idGUIDfileInfoId of the component file — used as input in the Document Process Update API
fileNamestringFile name
orderNointFile order within the document
sizeintFile size (bytes)
fileTypeobjectFile type: {"value": int, "description": string}
downloadUrlstringFile download URL

Details of the action history (histories):​

KeyTypeDescription
createdDatestringTime the action was performed (ISO 8601 format)
requestTypeobjectSource of the request: {"value": int, "description": string}
-1: Unspecified
0: Web
1: Api
3: Service (System service)
4: Mobile (Mobile application)
ipAddressstringIP address that performed the action
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