Loans documents

Loans Documents

The Loans Documents endpoint returns all documents associated with a specific loan. This includes agreements, disclosures, statements, and any other documentation relevant to the customer's loan lifecycle. Documents are returned in reverse chronological order by default.

Endpoint

GET /api/loans/documents

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 you need to display or download all loan-related documents for a specific customer. It is also useful for syncing loan documentation into partner platforms for audit or compliance purposes, or for automating document archiving workflows. Make sure the customer has granted necessary permissions for accessing their loan documents before calling this endpoint.

Query Parameters

ParameterTypeRequiredDescription
loanIdstringNoThe unique identifier of the loan whose documents should be retrieved.

Response

200 OK

Returns an array of document detail objects.

FieldTypeDescription
documentstringThe document content or a reference/URL to the document. Nullable.
documentIdstringThe unique identifier for the document. Nullable.
documentTypestringThe type or category of the document (e.g., agreement, disclosure, statement). Nullable.
[
  {
    "document": "https://documents.netevia.com/loans/doc-abc123.pdf",
    "documentId": "doc-abc123",
    "documentType": "LoanAgreement"
  },
  {
    "document": "https://documents.netevia.com/loans/doc-def456.pdf",
    "documentId": "doc-def456",
    "documentType": "Disclosure"
  },
  {
    "document": "https://documents.netevia.com/loans/doc-ghi789.pdf",
    "documentId": "doc-ghi789",
    "documentType": "MonthlyStatement"
  }
]

Error Codes

CodeWhen it happens
400The provided loanId is malformed or invalid
401Token missing, expired, or invalid
403Insufficient permissions or customer has not granted access to loan documents
404No loan found matching the provided loanId
500Internal server error

Common Mistakes

  • Omitting the loanId query parameter may return documents across all loans for the authenticated context instead of a targeted result — always pass a specific loanId when retrieving documents for a single loan.
  • Attempting to access loan documents without verifying the customer has granted the necessary permissions will result in a 403 error.
  • Bearer tokens expire after 10 minutes; ensure the token is refreshed before making the request to avoid 401 errors.

Related Endpoints

  • GET /api/loans — Retrieve the list of loans for a customer
  • GET /api/loans/{loanId} — Retrieve details for a specific loan
  • POST /api/loans/apply — Submit a loan application for a business customer

Example

curl -X GET "https://api.banking.netevia.dev/api/loans/documents?loanId=loan-12345" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json"
Query Params
string
Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Response

Language
Credentials
Bearer
JWT
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
text/plain
application/json
text/json