Upload Documents
The Upload Documents endpoint enables partners to securely submit files associated with a customer profile as part of the boarding and compliance workflow. Accepted documents include identity verification records, contracts, financial statements, and other compliance-related files. After a successful upload, the system processes and stores the document, returning metadata that confirms the operation outcome.
Endpoint
POST /netevia/uploadDocument
Authentication
Bearer token required. Obtain via:
POST https://api.banking.netevia.dev/api/auth/v2
Include in header: Authorization: Bearer {token}
Token lifetime: 10 minutes. Refresh via POST /api/auth/refresh.
When to use
Use this endpoint during customer onboarding or ongoing compliance reviews when a document must be attached to a profile. Common scenarios include submitting government-issued IDs for identity verification, uploading business formation documents for a business customer, or providing supporting files requested by the underwriting team. The document is linked to the specified profile and tracked via a document upload session.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| profileId | integer (int32) | Yes | The unique identifier of the customer profile the document is being attached to. |
| documentUploadSessionId | string | No | Session ID grouping multiple document uploads into a single submission workflow. Obtain from the boarding session. |
| documentType | string | No | Category of the document being uploaded (e.g., GOVERNMENT_ID, PROOF_OF_ADDRESS, BUSINESS_LICENSE). |
| fileName | string | No | Original file name including extension (e.g., passport_scan.pdf). |
| data | string | No | Base64-encoded content of the file. |
| contentType | string | No | MIME type of the file (e.g., application/pdf, image/jpeg, image/png). |
| verificatedEntity | string | No | Identifier of the entity (person or business) whose document is being verified (e.g., a beneficial owner ID or business owner reference). |
{
"profileId": 100234,
"documentUploadSessionId": "sess_a1b2c3d4e5f6",
"documentType": "GOVERNMENT_ID",
"fileName": "drivers_license_front.jpg",
"data": "BASE64_ENCODED_FILE_CONTENT_HERE",
"contentType": "image/jpeg",
"verificatedEntity": "owner_7891011"
}Response
200 OK
The response may be one of two schemas depending on the operation context: a standard boarding response or a financial account opening response.
BoardingResponse
| Field | Type | Description |
|---|---|---|
| profileId | integer (int32) | The profile ID associated with the submitted document. |
| errors | string / null | Error message string if the operation encountered issues; null on success. |
| success | boolean | true if the document was uploaded and processed successfully; false otherwise. |
| changeLog | array / null | List of change log entries recording what was updated as a result of this operation. |
changeLog item fields
| Field | Type | Description |
|---|---|---|
| requestType | integer (int32) | Numeric code representing the type of banking request associated with the change. |
| changes | string / null | Human-readable description of the change applied. |
OpenFinancialAccountResponse (extends BoardingResponse — returned when the document upload triggers account opening)
| Field | Type | Description |
|---|---|---|
| profileId | integer (int32) | The profile ID associated with the submission. |
| errors | string / null | Error message if applicable; null on success. |
| success | boolean | true if the operation succeeded. |
| changeLog | array / null | List of change log entries. |
| financialAccountId | string / null | ID of the newly opened financial account, if the upload triggered account creation. |
{
"profileId": 100234,
"errors": null,
"success": true,
"changeLog": [
{
"requestType": 3,
"changes": "Identity document uploaded and linked to profile."
}
]
}Error Codes
| Code | When it happens |
|---|---|
| 400 | Missing required fields, invalid Base64 encoding, or unsupported content type |
| 401 | Token missing, expired, or invalid |
| 403 | Insufficient permissions to upload documents for the specified profile |
| 404 | Profile not found for the given profileId |
| 500 | Internal server error during document processing or storage |
Common Mistakes
- Forgetting to Base64-encode the file content before placing it in the
datafield — sending raw binary or a file path will cause a 400 error. - Omitting the
contentTypefield or providing an incorrect MIME type, which can cause the document to be stored or processed incorrectly. - Using an expired Bearer token; tokens expire after 10 minutes, so refresh before making the request if the session has been idle.
- Providing a
profileIdthat does not exist or belongs to a different partner, resulting in a 404 or 403 response. - Sending very large files without confirming the maximum file size limit for the environment; oversized payloads may result in a 400 or 500 error.
Related Endpoints
POST /api/auth/v2— Obtain a Bearer token required for authenticationPOST /api/auth/refresh— Refresh an existing Bearer token before it expiresPOST /netevia/boardBusiness— Initiate the business customer boarding process that generates a document upload sessionPOST /netevia/boardPersonal— Initiate the personal customer boarding process
Example
curl -X POST https://api.banking.netevia.dev/netevia/uploadDocument \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"profileId": 100234,
"documentUploadSessionId": "sess_a1b2c3d4e5f6",
"documentType": "GOVERNMENT_ID",
"fileName": "drivers_license_front.jpg",
"data": "BASE64_ENCODED_FILE_CONTENT_HERE",
"contentType": "image/jpeg",
"verificatedEntity": "owner_7891011"
}'