get
https://api.cloud.mbanq.com/v1/savings//documents//attachment
Use this API to download a document (such as a statement PDF) associated with a specific savings account. This is the final step in the statement generation workflow.
Prerequisites
- Pass the
savingsAccountIdas a path parameter. - Pass the
documentIdas a path parameter. Use the Get Account Documents Details endpoint to retrieve thedocumentIdfor the generated statement.
Example Request
GET /v1/savingsaccounts/{savingsAccountId}/documents/{documentId}/attachment
Response Format
The response is a binary file stream (application/octet-stream), not a JSON body. Use the response headers to handle the file correctly:
| Header | Description |
|---|---|
Content-Disposition | Contains the suggested filename (e.g., attachment; filename="statement.pdf"). |
Content-Type | The MIME type of the file (e.g., application/pdf). |
Statement Generation Workflow
This endpoint is the last step of a three-step process:
- Generate Account Statement — trigger the statement job and receive a
jobId. - Get Job History — poll the job status and retrieve the
documentIdon completion. - Get Account Documents Details — retrieve document metadata to confirm the
documentId. - Download Account Statement (this endpoint) — download the file using the
documentId.
