Download Statements in PDF
The GET /api/Statement/V2/pdf endpoint returns the account statement for a specified financial account and billing period as a downloadable PDF file. The response includes the file name, Base64-encoded content, and MIME content type so the caller can save or stream the PDF directly. Authentication is required to protect sensitive financial data.
Endpoint
GET /api/Statement/V2/pdf
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 a customer needs to download a formatted account statement for a specific billing period — for example, to submit proof of account activity, for bookkeeping, or for regulatory compliance. It is suitable for both business and personal customers who need a structured PDF record of their transaction history.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
financialAccountId | string | No | The unique identifier of the financial account whose statement should be retrieved. |
period | string (date-time) | No | The statement period to retrieve, in ISO 8601 date-time format (e.g., 2024-01-01T00:00:00Z). When omitted, the most recent available statement is returned. |
Response
200 OK
| Field | Type | Description |
|---|---|---|
name | string (nullable) | The file name of the generated PDF (e.g., statement_2024-01.pdf). |
content | string (nullable) | The Base64-encoded binary content of the PDF file. Decode this value to obtain the raw PDF bytes. |
contentType | string (nullable) | The MIME type of the file. Typically application/pdf. |
{
"name": "statement_2024-01.pdf",
"content": "JVBERi0xLjQKJcOkw7zDtsOfCjIgMCBvYmoK...",
"contentType": "application/pdf"
}Error Codes
| Code | When it happens |
|---|---|
| 400 | financialAccountId or period is provided in an invalid format. |
| 401 | Token missing, expired, or invalid. |
| 403 | The authenticated user does not have access to the requested financial account. |
| 404 | No statement found for the specified account and period. |
| 500 | Internal server error. |
Common Mistakes
- Passing
periodas a plain date string (e.g.,2024-01) instead of a full ISO 8601 date-time string (e.g.,2024-01-01T00:00:00Z) will result in a 400 error. - Forgetting to Base64-decode the
contentfield before writing it to disk will produce a corrupt PDF file. - Using a
financialAccountIdthat belongs to a different customer or partner will return a 403 response. Always use an ID associated with the authenticated user's account. - The
contentfield can be large for accounts with many transactions; ensure your HTTP client and file-handling logic support large response payloads.
Related Endpoints
GET /api/Statement/V2— Retrieve account statement data in JSON format instead of PDF.GET /api/FinancialAccount— List financial accounts and obtain validfinancialAccountIdvalues.
Example
curl -X GET "https://api.banking.netevia.dev/api/Statement/V2/pdf?financialAccountId=fa_XXXXXXXXXX&period=2024-01-01T00%3A00%3A00Z" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Accept: application/json"