Download Statements
This endpoint retrieves a statement file for a specified financial account and billing period. The file is returned as a base64-encoded content object in the requested format. Supported formats include PDF, CSV, QBO (Quickbooks Online), and OFX (Open Financial Exchange).
Deprecated: This endpoint is marked as deprecated. Partners should verify with Netevia whether a replacement endpoint is available before integrating.
Endpoint
GET /api/statements
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 programmatically retrieve a customer's account statement for a specific billing period. This is useful for presenting statements within your application UI, generating downloadable statement files for end users, or exporting transaction history to accounting tools like QuickBooks.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| financialAccountId | string | Yes | The unique identifier of the financial account for which to retrieve the statement. |
| period | string (date-time) | Yes | The billing period for the statement, in ISO 8601 date-time format (e.g., 2024-01-01T00:00:00Z). |
| fileFormat | string (enum) | Yes | The desired output format. Allowed values: PDF, CSV, QBO, OFX. |
Response
200 OK
| Field | Type | Description |
|---|---|---|
| name | string | The filename of the generated statement (e.g., statement_january_2024.pdf). |
| content | string | The file content, base64-encoded. |
| contentType | string | The MIME type of the file (e.g., application/pdf, text/csv). |
{
"name": "statement_2024-01.pdf",
"content": "JVBERi0xLjQKJcOkw7zDtsOfCjIgMCBvYmoK...",
"contentType": "application/pdf"
}Error Codes
| Code | When it happens |
|---|---|
| 400 | Missing or invalid query parameters (e.g., unsupported fileFormat value or malformed period). |
| 401 | Token missing, expired, or invalid. |
| 403 | Insufficient permissions to access this financial account. |
| 404 | Financial account not found or no statement exists for the specified period. |
| 500 | Internal server error. |
Common Mistakes
- Providing a
periodvalue that does not correspond to a completed billing cycle will result in a 404 or empty response. - The
contentfield in the response is base64-encoded — you must decode it before saving or displaying the file. - Passing an unsupported value for
fileFormat(anything other thanPDF,CSV,QBO, orOFX) will result in a 400 error. - This endpoint is deprecated; check with Netevia for the current recommended statements endpoint before building new integrations.
Related Endpoints
GET /api/statements/list— Retrieve a list of available statement periods for a financial account.GET /api/financialaccounts/{financialAccountId}— Retrieve details for a specific financial account.
Example
curl -X GET "https://api.banking.netevia.dev/api/statements?financialAccountId=fa_XXXXXXXXXX&period=2024-01-01T00%3A00%3A00Z&fileFormat=PDF" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json"