Retrieve a previously uploaded user document (such as a driver's license or SSN document) by specifying its file type, returned as a base64-encoded string.
Get User Document by File Type
This endpoint retrieves a previously uploaded document associated with the authenticated user, identified by its file type. The document is returned in base64-encoded format along with its MIME content type, enabling downstream applications to decode and render it appropriately. Supported document types span identity documents, business records, financial statements, insurance documents, and card icons.
Endpoint
GET /Files/document
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 when your application needs to display or process a document that a user previously uploaded to their Netevia account — for example, showing a driver's license on file, retrieving a tax document, or accessing a business registration record. This is also useful for compliance workflows that require programmatic access to identity verification documents stored against a profile.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| fileType | string (enum) | Yes | The type of document to retrieve. Must match one of the predefined banking.models.filetype enum values (see allowed values below). |
Allowed fileType values:
| Value | Description |
|---|---|
UserIcon | Profile icon image for the user |
TransactionIcon | Icon associated with a transaction |
DriverLicense | Driver's license document |
SocialSecurityNumber | SSN document |
TaxFiling | Tax filing document |
OperatingAgreement | Business operating agreement |
ArticlesOfIncorporation | Articles of incorporation |
BusinessRegistration | Business registration document |
BusinessLicense | Business license |
TaxId_application | Tax ID application |
Passport | Passport document |
RewardIntegrationImage | Image used in rewards integration |
Lease_Agreement | Lease agreement document |
Utility_Bill | Utility bill |
Other | Any other document type |
CardIconSmall | Small card icon image |
CardIconLarge | Large card icon image |
UsMilitaryRecordOfService | US military record of service |
StateUsMilitaryArmedForcesId | State-issued US military/armed forces ID |
UsTaxForm | US tax form |
W2 | W-2 tax form |
Form1099 | Form 1099 |
PhoneBill | Phone bill |
CableBill | Cable bill |
InternetBill | Internet bill |
BankStatement | Bank statement |
Statement401k | 401(k) statement |
BrokerageStatement | Brokerage statement |
LifeInsurance | Life insurance document |
HealthInsurance | Health insurance document |
AutoInsurance | Auto insurance document |
MunicipalId | Municipal ID |
StateIssuedId | State-issued ID |
CertificateOfCitizenship | Certificate of citizenship |
CourtOrderForLegalNameChange | Court order for legal name change |
StateUsPermanentResidentCard | US permanent resident card |
StateConsularIdentificationCard | Consular identification card |
StateUsBorderCrossingCard | US border crossing card |
StateUsEmploymentAuthorizationCard | US employment authorization card |
StateTribalId | Tribal ID |
BirthCertificate | Birth certificate |
Form5498 | Form 5498 |
Form1098 | Form 1098 |
PayStub | Pay stub |
MedicareCard | Medicare card |
CardIconLargeBackSide | Large card icon (back side) |
BurnerCardIconSmall | Small burner card icon |
BurnerCardIconLarge | Large burner card icon |
BurnerCardIconLargeBackSide | Large burner card icon (back side) |
SubscriptionIcon | Subscription icon image |
Statement | General account statement |
Response
200 OK
The document is returned as a base64-encoded payload along with its content type. The exact response structure depends on the document retrieved.
| Field | Type | Description |
|---|---|---|
| fileContent | string | Base64-encoded content of the requested document |
| contentType | string | MIME type of the document (e.g., image/jpeg, application/pdf) |
{
"fileContent": "JVBERi0xLjQKJcOkw7zDtsOfCjIgMCBvYmoKPDwvTGVuZ3RoIDMgMCBSL0ZpbHRlci9GbGF0ZURlY29kZT4+CnN0cmVhbQp4...",
"contentType": "application/pdf"
}Error Codes
| Code | When it happens |
|---|---|
| 400 | The fileType query parameter is missing, empty, or does not match a valid enum value |
| 401 | Token missing, expired, or invalid |
| 403 | Insufficient permissions to access the requested document |
| 404 | No document of the specified fileType has been uploaded for the authenticated user |
| 500 | Internal server error |
Common Mistakes
- Passing a
fileTypevalue that is not an exact case-sensitive match to the enum (e.g.,driverLicenseinstead ofDriverLicense) will result in a 400 error. - Attempting to retrieve a document type that was never uploaded for the user returns a 404 — ensure the upload step completed successfully before calling this endpoint.
- Forgetting to decode the base64
fileContentbefore attempting to display or process the document. - Using the wrong MIME type for rendering — always use the returned
contentTypefield to determine how to handle the file, rather than assuming a fixed format.
Related Endpoints
POST /Files/document— Upload a new document for the authenticated user by file typeDELETE /Files/document— Remove a previously uploaded document by file typeGET /Files— List all documents on file for the authenticated user
Example
curl -X GET "https://api.banking.netevia.dev/Files/document?fileType=DriverLicense" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Accept: application/json" 200Success
