Nhảy tới nội dung
Phiên bản: 2.3.0

Tạo mới chứng từ

Ngày cập nhật: 30 tháng 4, 2023
Người cập nhật: VNPT eContract's team


Mục đích

Hàm thực hiện tạo mới thông tin của chứng từ

  • Request URL: /api/documents/create
  • HTTP method: POST
  • HTTP content-type: multipart/form-data
  • Authorize: Bearer token
  • Parameter:
KeyTypeDescription
nostring[Bắt buộc] Mã chứng từ
subjectstring[Bắt buộc] Tiêu đề chứng từ
filefile[Bắt buộc] File chứng từ (định dạng PDF)
descriptionstringMô tả chứng từ
typeIdint[Bắt buộc] Id loại chứng từ
documentTemplateIdintId mẫu chứng từ
departmentIdint[Bắt buộc] Id Bộ phận
customerCodestringMã khách hàng
customerInformationstringThông tin khách hàng
relatedDocumentIdsArray[int]Mảng Id các chứng từ liên quan
attachmentsArray[file]Mảng các file đính kèm

Mẫu response body

{
"data": {
"id": "67f7f485-3c65-4e5a-a8fd-08dad7588424",
"createdDate": "2022-12-06T14:07:19.7166444+07:00",
"lastModifiedDate": "2022-12-06T14:07:19.7168438+07:00",
"no": "Test0.02656043684177667",
"subject": "Test0.02656043684177667",
"hasVerified": false,
"fileType": 0,
"status": {
"value": 1,
"description": "New document"
},
"contractStatus": {
"value": 0,
"description": "Undefined"
},
"description": "Test tạo mới chứng từ bằng API",
"createdByUserId": 2341,
"processRecipientCount": 0,
"processInOrder": false,
"isWaitToSignDraw": false,
"isWaitToSignDigital": false,
"isWaitToApprove": false,
"isCancelable": true,
"isEditable": true,
"isShareable": false,
"isAccessable": false,
"isExpired": false,
"canDownload": false,
"type": {
"id": 46,
"code": "CKDS",
"name": "Chiết khấu doanh số",
"description": "Chứng từ chiết khấu doanh số",
"documentCount": 1
},
"processes": [],
"histories": [
{
"createdDate": "2022-12-06T14:07:20.0170103+07:00",
"requestType": {
"value": 0,
"description": "Web"
},
"ipAddress": "10.70.39.66",
"activity": {
"value": 1,
"description": "Create document"
}
}
],
"attachments": [],
"relatedDocuments": [],
"messages": [],
"file": {
"name": "Document.pdf",
"size": 1194181
},
"downloadUrl": "{HOST}/Api/Download?token=..."
},
"success": true,
"code": 0,
"messages": [
"Create document success"
]
}