# Upload document

This endpoint is used for submitting various types of documents required for KYC verification, compliance, and operational purposes. Documents are stored securely and undergo verification processes.

**Endpoint**

`POST/v2/customer/file`

**Link**

{% embed url="<https://stagep.tst-apidmndelss.com/openapi/v2.html#/operations/Customer_UploadFileDummy>" %}

### **Request**

#### **Headers**

| Key                 | Value                 | Required |
| ------------------- | --------------------- | -------- |
| **`Authorization`** | `123`                 | Yes      |
| **`Content-Type`**  | `multipart/form-data` | Yes      |
| **`Accept`**        | `application/json`    | Yes      |

#### **Request Body (multipart/form-data)**

**Required fields:** `customerId`, `attach`

| Field            | Type     | Required | Description                                | Example                             |
| ---------------- | -------- | -------- | ------------------------------------------ | ----------------------------------- |
| **`customerId`** | `string` | **Yes**  | Customer ID who owns the document.         | `"DFVKoPu-OYGB-jac9HHbxt9io"`       |
| **`attach`**     | `file`   | **Yes**  | File to upload (document).                 | `passport.pdf`                      |
| **`info`**       | `string` | No       | Optional description/notes about the file. | `"Primary identification document"` |
| **`type`**       | `string` | No       | Document type/category.                    | `"PASSPORT"`                        |

***

### **Form Data Details**

#### **Supported File Types**

| File Type          | Maximum Size | Common Use Cases               |
| ------------------ | ------------ | ------------------------------ |
| **PDF**            | 10MB         | Contracts, statements, reports |
| **JPEG/PNG**       | 5MB          | Photos, scans, screenshots     |
| **Word Documents** | 5MB          | Agreements, letters            |
| **Text Files**     | 1MB          | Notes, information             |

#### **Document Type Values**

| Document Type                               | Description               | Common Use             |
| ------------------------------------------- | ------------------------- | ---------------------- |
| **`PASSPORT`**                              | Passport document         | Identity verification  |
| **`DRIVERS_LICENCE_FRONT`**                 | Driver's license (front)  | Identity verification  |
| **`DRIVERS_LICENCE_BACK`**                  | Driver's license (back)   | Identity verification  |
| **`GOVERNMENT_ID_FRONT`**                   | Government ID (front)     | Identity verification  |
| **`GOVERNMENT_ID_BACK`**                    | Government ID (back)      | Identity verification  |
| **`UTILITY_BILL`**                          | Utility bill              | Address verification   |
| **`BANK_STATEMENT`**                        | Bank statement            | Financial verification |
| **`INCORPORATION_DOCUMENTS`**               | Business incorporation    | Business verification  |
| **`ARTICLES_OF_INCORPORATION`**             | Articles of incorporation | Business verification  |
| **`FINANCIAL_STATEMENT`**                   | Financial statements      | Financial verification |
| **`LEASE_AGREEMENT`**                       | Lease agreement           | Address verification   |
| **`PAYSLIP`**                               | Payslip                   | Income verification    |
| **`OPERATION_DOCUMENT`**                    | Operation-related         | Transaction support    |
| **`OTHER_1`**, **`OTHER_2`**, **`OTHER_3`** | Miscellaneous             | Various purposes       |

***

### **Response Fields**

| Field            | Type      | Description                     | Example                       |
| ---------------- | --------- | ------------------------------- | ----------------------------- |
| **`id`**         | `string`  | System-generated document ID.   | `"doc_abc123"`                |
| **`customerId`** | `string`  | Customer ID (from request).     | `"DFVKoPu-OYGB-jac9HHbxt9io"` |
| **`fileName`**   | `string`  | Original filename.              | `"passport_scan.pdf"`         |
| **`size`**       | `integer` | File size in bytes.             | `2048576`                     |
| **`mime`**       | `string`  | Detected MIME type.             | `"application/pdf"`           |
| **`docType`**    | `string`  | Document type (from request).   | `"PASSPORT"`                  |
| **`info`**       | `string`  | Additional info (from request). | `"Primary identification"`    |
| **`isLock`**     | `boolean` | Lock status (initially false).  | `false`                       |
| **`createAt`**   | `string`  | Upload timestamp.               | `"2024-05-21T14:30:00Z"`      |
| **`status`**     | `string`  | Initial verification status.    | `"DST_SUBMITTED"`             |

***

### **Field Details**

#### **Document Status Values**

| Status                      | Description                   | Initial State               |
| --------------------------- | ----------------------------- | --------------------------- |
| **`DST_SUBMITTED`**         | Document submitted for review | **Default for new uploads** |
| **`DST_APPROVED`**          | Document approved             | After verification          |
| **`DST_CHANGES_REQUESTED`** | Changes requested             | If modifications needed     |
| **`DST_REJECTED`**          | Document rejected             | If verification fails       |
| **`DST_MISSING`**           | Document missing              | System status               |

#### **Common MIME Types**

| MIME Type                                                                     | File Extension | Typical Use                 |
| ----------------------------------------------------------------------------- | -------------- | --------------------------- |
| **`application/pdf`**                                                         | .pdf           | Documents, forms            |
| **`image/jpeg`**                                                              | .jpg, .jpeg    | Photos, scans               |
| **`image/png`**                                                               | .png           | Screenshots, digital images |
| **`application/msword`**                                                      | .doc           | Word documents              |
| **`application/vnd.openxmlformats-officedocument.wordprocessingml.document`** | .docx          | Modern Word documents       |

***

### **Examples**

Request sample:<br>

```
curl --location 'https://stagep.tst-apidmndelss.com/v2/customer/file' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjEyMzQ1LCJleHAiOjE5OTk5OTk5OTksImtleSI6InNhbXBsZS1rZXktMTIzNDU2Nzg5MCIsIm90cF92ZXJpZmllZCI6ZmFsc2V9.sampleSignatureValue1234567890abcdef"' \
--form 'attach=@"postman-cloud:///1111-2222-3333-444455556666"' \
--form 'attach=@"/Users/MacBook/Downloads/FPFC-Delos Flow_ Create personal account-160426-111133.pdf"' \
--form 'attach=@"/Users/MacBook/Downloads/62395849-pass-sample (1).jpg"' \
--form 'info="Test"' \
--form 'type="PASSPORT"'
```

\
\
Response sample:

```
{
    "document": {
        "id": "cbc5b871-6ef6-410f-a0ad-bc956d805eac",
        "customerId": "DFVKoPu-OYGB-jac9HHbxt9io",
        "fileName": "62349849-pass-sample (1).jpg",
        "size": 294836,
        "mime": "image/jpeg",
        "docType": "PASSPORT",
        "info": "Test",
        "isLock": false,
        "createAt": "2026-05-26T10:50:30.331Z",
        "status": "DST_APPROVED"
    }
}
```

<br>

***

### **Notes**

* **File Size Limits**: PDFs up to 10MB, images up to 5MB
* **Supported Formats**: PDF, JPEG, PNG, DOC, DOCX, TXT
* **Security**: All documents are encrypted at rest
* **Verification**: New documents start with `DST_SUBMITTED` status
* **Compliance**: Documents undergo KYC/AML verification processes
* **Retention**: Documents are retained according to regulatory requirements

**Upload Best Practices**:

* Use clear, legible scans for identity documents
* Ensure files are not password protected
* Use original documents (not screenshots) when possible
* Include all pages for multi-page documents
* Verify file clarity and readability before upload

**Please note that by using this command you only upload the document to our system. To actually use this document in customer application or transactions, you have to use the data received in the successful response of this command (e.g. document id) in other corresponding commands like Set Customer Application or Add Document.**&#x20;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.delos.financial/documents/upload-document.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
