Nộp giấy tờ chủ sở hữu
Được sử dụng để nộp giấy tờ cá nhân. Khác với giấy tờ doanh nghiệp, giấy tờ cá nhân được tải lên trực tiếp dưới dạng byte array trong một bước duy nhất (single-phase process).
Parameters
| Property | Type | Required | Description |
|---|---|---|---|
| miniAppId | Long | true | ID của Mini App |
| ownerDocumentFiles | List<DocumentFile> | true | Danh sách tệp giấy tờ (byte array). SDK Node.js gửi dạng form-data upload. |
DocumentFile
| Property | Type | Required | Description |
|---|---|---|---|
| file | byte[] | true | Nội dung tệp dưới dạng byte array |
| name | String | true | Tên tệp |
Return Values
| Property | Type | Description |
|---|---|---|
| error | int | Mã lỗi của kết quả trả về, bằng 0 nếu request thành công |
| message | String | Lời nhắn chi tiết tương ứng với mã lỗi |
| data | Object | Kết quả nộp giấy tờ |
Lưu ý
- Nếu đã có yêu cầu xác thực chủ sở hữu trước đó, API sẽ trả về lỗi:
- error: -101
- message: "Đã có yêu cầu xác thực chủ sở hữu"
- Nếu ứng dụng chưa cập nhật
subCateIds, API sẽ trả về lỗi:- message: "Vui lòng cập nhật thông tin"
- Vui lòng sử dụng API Cập nhật loại hình để cập nhật
subCateIds. Có thể lấy danh sáchsubCateIdshợp lệ từ API Lấy thông tin Mini App.
Data Object
| Property | Type | Description |
|---|---|---|
| ownerDocumentResults | Document | Kết quả cho giấy tờ cá nhân |
Document
| Property | Type | Description |
|---|---|---|
| id | Long | ID của request |
| reviewStatus | String | Trạng thái xét duyệt |
| ownerId | String | ID của chủ sở hữu |
| createdAt | Long | Thời gian tạo |
| documentFiles | List<DocumentFile> | Danh sách tệp giấy tờ |
Sample Code
import java.io.File;
import java.nio.file.Files;
import java.util.ArrayList;
import java.util.List;
import com.vng.zalo.miniapp.openapi.sdk.models.documents.DocumentFile;
import com.vng.zalo.miniapp.openapi.sdk.models.documents.request.SubmitOwnerDocumentsRequest;
import com.vng.zalo.miniapp.openapi.sdk.models.documents.response.SubmitOwnerDocumentsResponse;
File file1 = new File("/path/to/pdf-1.pdf");
File file2 = new File("/path/to/pdf-2.pdf");
List<DocumentFile> ownerDocumentFiles = new ArrayList<>();
// Document 1
DocumentFile doc1 = new DocumentFile();
doc1.setFile(Files.readAllBytes(file1.toPath()));
doc1.setName("pdf-1.pdf");
ownerDocumentFiles.add(doc1);
// Document 2
DocumentFile doc2 = new DocumentFile();
doc2.setFile(Files.readAllBytes(file2.toPath()));
doc2.setName("pdf-2.pdf");
ownerDocumentFiles.add(doc2);
SubmitOwnerDocumentsRequest request = new SubmitOwnerDocumentsRequest();
request.setMiniAppId(YOUR_MINI_APP_ID);
request.setOwnerDocumentFiles(ownerDocumentFiles);
SubmitOwnerDocumentsResponse response = client.submitOwnerDocuments(request);