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:
| Key | Type | Required | Description |
|---|---|---|---|
no | string(40) | Yes | Document number/code |
subject | string(200) | Yes | Document title |
description | string(500) | No | Document description |
typeId | int | Yes | Document type Id according to the system catalog |
departmentId | int | Yes | Id of the department issuing the document |
files | array<file> | Yes | List of component files of the document, passed directly in the request in multipart/form-data format. Supports passing multiple files in the same request |
relatedDocumentIds | array<GUID> | No | DocumentId of an existing document — used when needing to extract/link additional files into an existing document |
attachments | array<file> | No | Array list of attachment files for the document |
customerCode | string(500) | No | Customer code, used to identify or reference the customer related to the document |
customerInformation | string(100) | No | Customer information related to the document |
Sample request
| Field | Sample value |
|---|---|
no | DOCUMENT-MF-001 |
subject | Multi-file document DOCUMENT-MF-001 |
description | Example of multi-file document creation |
typeId | 8950 |
departmentId | 9855 |
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
| Key | Type | Description |
|---|---|---|
success | boolean | Response status of the request (true: Success, false: Failure) |
code | int | Response code from the system |
messages | array | List of messages or errors returned from the system |
data | object | Object containing details of the newly created document (see details below) |
Details of data:
| Key | Type | Description |
|---|---|---|
id | GUID | DocumentId of the newly created document |
createdDate | datetime | Time the document was created (ISO 8601 format) |
lastModifiedDate | datetime | Time of the most recent update (ISO 8601 format) |
no | string | Document number/code (matches the no value in the request) |
subject | string | Document title |
description | string | Document description |
hasVerified | boolean | Whether the document has been verified |
hasVerify | boolean | Whether the document requires verification |
hasSeal | boolean | Whether the document requires message authentication (VNPT SEAL) |
requireVerifiedUserSigning | boolean | Whether the signer is required to verify their identity |
status | object | Document status: {"value": int, "description": string}1: New document 2: Ready 3: Processing 4: Completed 5: Being revised -1: Rejected -2: Deleted -3: Cancelled |
contractStatus | object | Contract validity status: {"value": int, "description": string}0: Undefined 1: Still valid 2: Near expiry -1: Expired -2: Not yet effective |
createdByUserId | int | Id of the document creator |
processRecipientCount | int | Number of participants in the process |
waitingProcesses | array | List of people currently pending processing (empty when the document has not yet been sent to a process) |
processInOrder | boolean | Whether processing is sequential (true) or parallel (false) |
isWaitToSignDraw | boolean | Pending initial signature status (true/false) |
isWaitToSignDigital | boolean | Pending digital signature status (true/false) |
isWaitToApprove | boolean | Pending approval status (true/false) |
isWaitToFillData | boolean | Pending data entry status (true/false) |
isWaitToCoordinate | boolean | Pending coordination status (true/false) |
isWaitToESign | boolean | Pending E-Sign (electronic signature) status (true/false) |
isWaitToEkyc | boolean | Pending eKYC verification signature status (true/false) |
isFillable | boolean | Whether the document allows data entry (form-filling) |
type | object | Document type (see details below): {
"id": int,
"code": string,
"name": string,
"documentCount": int,
"enableVnptSeal": boolean,
"requireVerifiedUserSigning": boolean,
"children": array
} |
processes | array | List of processing steps configured for the document (empty at the creation step) |
accessibleViewProcesses | array | List of people granted permission to view the document |
histories | array | Document action history (Array[object]) (see details below) |
attachments | array | List of attachments accompanying the document (Array[object]) |
relatedDocuments | array | List of related documents (Array[object]) |
linkedDocuments | array | List of linked documents (Array[object]) |
messages | array<string> | Additional messages at the data level (different from the outer messages in the response) |
fillingItems | array | List of data fields to be filled in (if the document is a form) |
sharedUsers | array | List of people the document has been shared with for viewing |
isMarkStar | boolean | Whether the document is marked as starred |
downloadFileUrls | array | List of uploaded component files (Array[object]) (see details below) |
zipDownloadUrl | string | URL to download all files as a zip |
requiresSealSendConfirmation | boolean | Whether confirmation is required before sending message authentication (VNPT SEAL) |
fixedPosition | boolean | Whether the signature position is fixed |
isLaborContractDocument | boolean | Whether the document is associated with a labor contract (LaborContractId) |
Details of the type object:
| Key | Type | Description |
|---|---|---|
id | int | Document type Id |
code | string | Document type code (e.g.: DOCID) |
name | string | Document type name |
documentCount | int | Number of documents created under this type |
enableVnptSeal | boolean | Whether this document type has message authentication (VNPT SEAL) enabled |
requireVerifiedUserSigning | boolean | Whether this document type requires signer verification |
children | array | List 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:
| Key | Type | Description |
|---|---|---|
id | GUID | fileInfoId of the component file — used as input in the Document Process Update API |
fileName | string | File name |
orderNo | int | File order within the document |
size | int | File size (bytes) |
fileType | object | File type: {"value": int, "description": string} |
downloadUrl | string | File download URL |
Details of the action history (histories):
| Key | Type | Description |
|---|---|---|
createdDate | string | Time the action was performed (ISO 8601 format) |
requestType | object | Source of the request: {"value": int, "description": string} -1: Unspecified 0: Web 1: Api 3: Service (System service) 4: Mobile (Mobile application) |
ipAddress | string | IP address that performed the action |
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 |