A valid request URL is required to generate request examples"<string>"Get All FI Data PDF
Retrieve complete financial information in PDF format for accounts associated with an approved consent.
A valid request URL is required to generate request examples"<string>"Overview
The Get All FI Data PDF API allows you to download complete financial information in PDF format for accounts associated with a specific consent. This API is ideal when you need human-readable, formatted financial statements that can be easily viewed, printed, or shared with end users. The PDF includes formatted account details, transaction history, balance information, and account holder details in a professional document layout.Key Use Cases
- User-Facing Reports: Generate formatted financial statements that users can easily read and understand.
- Document Archival: Create permanent records of financial data in a standardized PDF format.
- Regulatory Compliance: Provide formatted financial documents for compliance and audit purposes.
- Selective Account Retrieval: Download PDFs for specific accounts by providing their link reference numbers.
- Transaction Filtering: Generate PDFs containing only transactions within a specified date range.
Important Notes
- Data will only be returned if it is available in FinPro. Ensure the FI Request has been completed and the status shows
DATA_READYbefore calling this API. - The requested data must align with the parameters specified in the approved consent.
- If you need data in structured JSON format for programmatic processing, use the Get All FI Data API instead.
- The response is a binary PDF file, not JSON. Handle the response accordingly in your application.
Authentication
This API requires authentication using the following headers:application/json to indicate that the request body contains JSON data. Note that the response will be a PDF file (binary content).Request Body
2023-01-01T00:00:00Z). When provided, only transactions on or after this date will be included.2023-01-31T23:59:59Z). When provided, only transactions on or before this date will be included.Request Example - All Accounts
{
"consentID": "15c8007e-3435-4a81-8730-b67690a1c9a6"
}
Request Example - Specific Accounts
{
"consentID": "15c8007e-3435-4a81-8730-b67690a1c9a6",
"linkRefNumber": [
"7cd06b51-9e73-4600-a1e1-e97a6df659f4",
"0d200ea3-1eb4-4418-b154-2b4836a9501e"
]
}
Request Example - With Transaction Date Filtering
{
"consentID": "15c8007e-3435-4a81-8730-b67690a1c9a6",
"linkRefNumber": [
"0d200ea3-1eb4-4418-b154-2b4836a9501e"
],
"transactionsStartDate": "2023-01-01T00:00:00Z",
"transactionsEndDate": "2023-01-31T23:59:59Z"
}
Response Format
Success Response
The API returns a binary PDF file as the response body with the following characteristics:- Content-Type:
application/pdf(the response header will indicate this) - Format: PDF version 1.3 or higher
- Content: Formatted financial information including:
- Account profile details
- Account holder information (name, DOB, mobile, email, PAN, address)
- Account summary (balance, account type, branch, IFSC, MICR codes)
- Transaction history in a tabular format
- Bank/FIP name and account details
- Clear section headers for Profile, Summary, and Transactions
- Tabular layout for transaction data
- Masked account numbers for security
- All relevant account holder and account details
PDF Content Structure
The generated PDF contains the following sections:1. Header Section
- Financial Institution Provider (FIP) name
- FI Type (e.g., Deposit, Mutual Funds)
2. Profile Section
Contains account holder information organized in a table:| Field | Description |
|---|---|
| Name | Account holderβs full name |
| DOB | Date of birth |
| Mobile | Mobile phone number |
| Email address | |
| Address | Complete residential address |
| PAN | Permanent Account Number |
| CKYC Compliance | KYC compliance status (YES/NO) |
3. Summary Section
Contains account summary details:| Field | Description |
|---|---|
| Current Balance | Current account balance with currency |
| Balance Date Time | Timestamp of balance calculation |
| Account Type | Type of account (SAVINGS/CURRENT) |
| Branch | Bank branch name |
| Facility | Account facilities (e.g., OD for overdraft) |
| IFSC Code | Bankβs IFSC code |
| MICR Code | Bankβs MICR code |
| Opening Date | Account opening date |
| Current OD Limit | Current overdraft limit |
| Drawing Limit | Drawing limit available |
| Status | Account status (ACTIVE/INACTIVE) |
4. Transactions Section
Contains transaction history in tabular format:| Column | Description |
|---|---|
| Transaction Id | Unique transaction identifier |
| Type | Transaction type (CREDIT/DEBIT) |
| Mode | Transaction mode (UPI, NEFT, RTGS, CASH, etc.) |
| Amount | Transaction amount |
| Current Balance | Balance after transaction |
| Transaction Timestamp | Date and time of transaction |
| Value Date | Value date of transaction |
| Narration | Transaction description/narration |
| Reference | Reference number (e.g., cheque number) |
Response Field Descriptions
All fields present in the PDF are derived from the structured financial data. The table below describes the data fields and their possible values:Profile Fields
| Field | Type | Values | Description |
|---|---|---|---|
| Holders Type | string | SINGLE, JOINT | Indicates if the account has single or multiple holders |
| Holder Name | string | - | Full name of the account holder |
| DOB | string | Date format | Date of birth of the account holder |
| Mobile | string | 10-digit number | Mobile phone number |
| Nominee | string | Registered, Not-Registered | Nominee registration status |
| Landline | string | - | Landline phone number if available |
| Address | string | - | Complete residential address |
| string | Email format | Email address | |
| PAN | string | 10-character | Permanent Account Number |
| CKYC Compliance | string | YES, NO, NO_DATA_AVAILABLE | Central KYC compliance status |
Summary Fields
| Field | Type | Values | Description |
|---|---|---|---|
| Current Balance | string | Numeric | Current account balance |
| Currency | string | INR, USD, etc. | Currency of the balance |
| Exchange Rate | string | Numeric | Exchange rate if applicable |
| Balance DateTime | string | ISO timestamp | When the balance was calculated |
| Type | string | SAVINGS, CURRENT | Type of account |
| Branch | string | - | Bank branch name |
| Facility | string | OD, etc. | Account facilities available |
| IFSC Code | string | 11 characters | Bankβs IFSC code |
| MICR Code | string | 9 digits | Bankβs MICR code |
| Opening Date | string | Date format | Date when account was opened |
| Current OD Limit | string | Numeric | Current overdraft limit |
| Drawing Limit | string | Numeric | Available drawing limit |
| Status | string | ACTIVE, INACTIVE, etc. | Current account status |
Transaction Fields
| Field | Type | Values | Description |
|---|---|---|---|
| Type | string | CREDIT, DEBIT | Transaction direction |
| Mode | string | CASH, UPI, IMPS, NEFT, RTGS, CARD, ATM, CHEQUE, DEMAND_DRAFT, AUTO_DEBIT, INTEREST_CREDIT, NACH, ECS, REMITTANCE, OTHERS | Mode of transaction |
| Amount | string | Numeric | Transaction amount |
| Current Balance | string | Numeric | Balance after this transaction |
| Transaction Timestamp | string | ISO timestamp | When the transaction occurred |
| Value Date | string | Date format | Value date of the transaction |
| Transaction ID | string | - | Unique transaction identifier |
| Narration | string | - | Description of the transaction |
| Reference | string | - | Reference number (e.g., cheque number) |
Error Responses
Invalid Consent ID
When the provided consent ID does not exist:{
"ver": "1.21.0",
"timestamp": "2025-10-01T11:51:28.773Z",
"errorCode": "InvalidConsentId",
"errorMsg": "Consent ID does not exist."
}
400 Bad Request
Common Error Scenarios
When errors occur, the response will be JSON (not PDF) containing error details:- InvalidConsentId: The provided consent ID does not exist in the system or has been deleted.
- InvalidRequest: The request body contains invalid data, such as malformed date formats or invalid link reference numbers.
- NoDataAvailable: No financial data has been fetched for this consent yet. Ensure youβve completed the FI Request and the status is
DATA_READY. - DataIsDeleted: The data has expired and been deleted according to the data retention policy.
- ConsentRevoked: The consent has been revoked by the user and can no longer be used.
Rate Limiting
This API is subject to rate limiting to ensure fair usage and system stability:- Rate Limit: 1000 requests per time window
- Headers Returned:
X-RateLimit-Limit: Maximum number of requests allowedX-RateLimit-Remaining: Number of requests remaining in current windowX-RateLimit-Reset: Unix timestamp when the rate limit resets
429 Too Many Requests response.
Usage Flow
-
Verify Data Readiness: Use the FI Request Status API to ensure the
eventStatusisDATA_READYbefore calling this API. -
Identify Required Accounts: If you only need PDFs for specific accounts, collect their
linkRefNumbervalues from the FI Request Status API response. -
Request PDF: Call this API with the
consentIDand optionally thelinkRefNumberarray to specify which accounts you want. - Handle Binary Response: The response will be a binary PDF file. Save it to disk or stream it to the user as appropriate for your application.
- Check Response Type: If the response is JSON instead of PDF, it indicates an error. Parse the JSON to understand the error.
- Present to User: Display, download, or share the PDF with the end user as needed.
Best Practices
- Status Check First: Always verify that data is ready using the FI Request Status API before attempting to retrieve the PDF. Calling this API when data is not ready will result in an error.
-
Selective Downloads: If you only need data for specific accounts, use the
linkRefNumberparameter to request only those accounts. This reduces response size and processing time. -
Transaction Filtering: Use
transactionsStartDateandtransactionsEndDateto generate PDFs with only relevant transactions. This is especially useful for monthly or quarterly statements. -
Error Handling: Check the response
Content-Typeheader. If itβsapplication/json, parse it as an error response. If itβsapplication/pdf, handle it as a binary file. -
File Naming: When saving the PDF, use a meaningful filename that includes the consent ID, account details, and date range for easy identification (e.g.,
FI_Data_ConsentID_StartDate_EndDate.pdf). - User Presentation: For user-facing applications, provide options to view the PDF in-browser, download it, or share it via email.
- Storage Considerations: PDF files can be large, especially for accounts with many transactions. Consider the storage implications when archiving PDFs.
-
Security: PDFs contain sensitive financial information. Ensure they are:
- Transmitted over HTTPS
- Stored securely with appropriate access controls
- Protected with encryption if stored long-term
- Deleted when no longer needed according to your data retention policy
-
Multiple Accounts: When requesting PDFs for multiple accounts (by not specifying
linkRefNumber), the API may return a single consolidated PDF or multiple PDFs. Handle accordingly based on the actual implementation. - Date Range Validation: Ensure the transaction date range falls within the consentβs approved FI data range to avoid errors.
- Timeout Handling: PDF generation can take longer for accounts with extensive transaction histories. Implement appropriate timeout values in your HTTP client.
PDF Viewing and Compatibility
The generated PDFs are compliant with standard PDF specifications and can be:- Viewed in any standard PDF reader (Adobe Acrobat, Preview, Chrome, Firefox, etc.)
- Printed on standard paper sizes
- Digitally archived for long-term storage
- Shared via email or messaging platforms
- Embedded in web applications using PDF viewers
Handling Compressed Content Streams (Raw PDF Parsing)
You can request this PDF to be delivered with compressed content streams. When enabled for your integration, PDFs from this API use Flate compression (/Filter /FlateDecode) on their content streams β a standard part of the PDF specification (ISO 32000) that every conforming PDF library (Apache PDFBox, iText, pypdf, PyMuPDF, pdf-lib, pdfjs-dist, etc.) and viewer already supports. If you havenβt requested this, the PDF you receive already contains plaintext content streams and none of this section applies β no extra handling is needed either way you consume the file.
When compression is enabled, this section only matters if you parse the raw PDF bytes yourself β for example, extracting text with regular expressions directly against the file instead of using a PDF library. In that scenario, the text-showing content inside a compressed stream will appear as opaque compressed binary rather than plaintext, and your existing text matching will stop finding it.
The code below finds each Flate-compressed content stream in the PDF and decompresses it back to plaintext bytes, leaving everything else (fonts, images, cross-reference tables, other filters) untouched.
How it works
- Scan the PDF for
N 0 obj << ... >> streamheaders. - For each one, check the objectβs own dictionary for a sole
/Filter /FlateDecodeentry β filter chains (e.g.[/ASCII85Decode /FlateDecode]) are left alone, since inflating still-encoded bytes directly would produce garbage. - Read the streamβs declared
/Length. An indirect reference (/Length 5 0 R) is rejected rather than misread as a literal number β that stream is left compressed. - Inflate the stream bytes (zlib/DEFLATE) and splice them back in place of the compressed bytes.
- If inflation fails for any reason, leave that stream untouched rather than corrupting the file.
FlateDecode streams transparently.import java.io.ByteArrayOutputStream;
import java.nio.charset.StandardCharsets;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.zip.DataFormatException;
import java.util.zip.Inflater;
public class PdfStreamDecompressor {
private static final Pattern STREAM_HEADER =
Pattern.compile("\\d+\\s+0\\s+obj\\s*<<((?:[^<>]|<<[^<>]*>>)*)>>\\s*stream\\r?\\n");
private static final Pattern LENGTH = Pattern.compile("/Length\\s+(\\d+)(?!\\s+\\d+\\s+R)");
private static final Pattern SOLE_FILTER = Pattern.compile("/Filter\\s*/FlateDecode\\b");
private static final Pattern FILTER_ARRAY = Pattern.compile("/Filter\\s*\\[\\s*([^\\]]*)\\]");
// Inflates every sole-/FlateDecode content stream in a PDF; everything else
// (fonts, images, other filters) is copied through unchanged.
public static byte[] decompressPdfStreams(byte[] pdfBytes) {
// ISO-8859-1 is a 1-byte-to-1-char mapping, so char offsets below equal byte offsets.
String latin1 = new String(pdfBytes, StandardCharsets.ISO_8859_1);
Matcher headerMatcher = STREAM_HEADER.matcher(latin1);
ByteArrayOutputStream out = new ByteArrayOutputStream();
int cursor = 0;
while (headerMatcher.find()) {
String dict = headerMatcher.group(1);
Matcher lengthMatcher = LENGTH.matcher(dict);
if (!isSoleFlateFilter(dict) || !lengthMatcher.find()) continue;
int streamStart = headerMatcher.end();
int declaredLength = Integer.parseInt(lengthMatcher.group(1));
if (streamStart + declaredLength > pdfBytes.length) continue;
byte[] streamBytes = new byte[declaredLength];
System.arraycopy(pdfBytes, streamStart, streamBytes, 0, declaredLength);
byte[] inflated;
try {
inflated = inflate(streamBytes);
} catch (DataFormatException e) {
continue; // not valid Flate data after all - leave untouched
}
out.write(pdfBytes, cursor, streamStart - cursor); // verbatim up to + incl. stream header
out.write(inflated, 0, inflated.length);
cursor = streamStart + declaredLength;
}
out.write(pdfBytes, cursor, pdfBytes.length - cursor);
return out.toByteArray();
}
private static boolean isSoleFlateFilter(String dict) {
if (SOLE_FILTER.matcher(dict).find()) return true;
Matcher arrayMatch = FILTER_ARRAY.matcher(dict);
if (!arrayMatch.find()) return false;
String[] filters = arrayMatch.group(1).trim().split("\\s+");
return filters.length == 1 && filters[0].equals("/FlateDecode");
}
private static byte[] inflate(byte[] compressed) throws DataFormatException {
Inflater inflater = new Inflater(); // zlib/Flate wrapper, matches PDF's DEFLATE streams
inflater.setInput(compressed);
ByteArrayOutputStream out = new ByteArrayOutputStream(compressed.length * 3);
byte[] buffer = new byte[4096];
while (!inflater.finished()) {
int count = inflater.inflate(buffer);
if (count == 0 && inflater.needsInput()) break;
out.write(buffer, 0, count);
}
inflater.end();
return out.toByteArray();
}
}
import re
import zlib
_STREAM_HEADER = re.compile(
rb"\d+\s+0\s+obj\s*<<((?:[^<>]|<<[^<>]*>>)*)>>\s*stream\r?\n"
)
_LENGTH = re.compile(rb"/Length\s+(\d+)(?!\s+\d+\s+R)")
_SOLE_FILTER = re.compile(rb"/Filter\s*/FlateDecode\b")
_FILTER_ARRAY = re.compile(rb"/Filter\s*\[\s*([^\]]*)\]")
def _is_sole_flate_filter(stream_dict: bytes) -> bool:
if _SOLE_FILTER.search(stream_dict):
return True
match = _FILTER_ARRAY.search(stream_dict)
if not match:
return False
filters = match.group(1).strip().split()
return len(filters) == 1 and filters[0] == b"/FlateDecode"
def decompress_pdf_streams(pdf_bytes: bytes) -> bytes:
"""Inflate every sole-/FlateDecode content stream in a PDF; everything
else (fonts, images, other filters) is copied through unchanged."""
chunks = []
cursor = 0
for match in _STREAM_HEADER.finditer(pdf_bytes):
stream_dict = match.group(1)
length_match = _LENGTH.search(stream_dict)
if not _is_sole_flate_filter(stream_dict) or not length_match:
continue
stream_start = match.end()
declared_length = int(length_match.group(1))
stream_bytes = pdf_bytes[stream_start:stream_start + declared_length]
try:
inflated = zlib.decompress(stream_bytes)
except zlib.error:
continue # not valid Flate data after all - leave untouched
chunks.append(pdf_bytes[cursor:stream_start]) # verbatim up to + incl. stream header
chunks.append(inflated)
cursor = stream_start + declared_length
chunks.append(pdf_bytes[cursor:])
return b"".join(chunks)
import * as zlib from 'zlib';
const STREAM_HEADER = /\d+\s+0\s+obj\s*<<((?:[^<>]|<<[^<>]*>>)*)>>\s*stream\r?\n/g;
const LENGTH = /\/Length\s+(\d+)(?!\s+\d+\s+R)/;
const SOLE_FILTER = /\/Filter\s*\/FlateDecode\b/;
const FILTER_ARRAY = /\/Filter\s*\[\s*([^\]]*)\]/;
function isSoleFlateFilter(dict: string): boolean {
if (SOLE_FILTER.test(dict)) return true;
const arrayMatch = dict.match(FILTER_ARRAY);
if (!arrayMatch) return false;
const filters = arrayMatch[1].trim().split(/\s+/).filter(Boolean);
return filters.length === 1 && filters[0] === '/FlateDecode';
}
// Inflates every sole-/FlateDecode content stream in a PDF; everything else
// (fonts, images, other filters) is copied through unchanged.
export function decompressPdfStreams(buffer: Buffer): Buffer {
const latin1 = buffer.toString('latin1');
const chunks: Buffer[] = [];
let cursor = 0;
let match: RegExpExecArray | null;
STREAM_HEADER.lastIndex = 0;
while ((match = STREAM_HEADER.exec(latin1)) !== null) {
const dict = match[1];
const lengthMatch = dict.match(LENGTH);
if (!isSoleFlateFilter(dict) || !lengthMatch) continue;
const streamStart = match.index + match[0].length;
const declaredLength = parseInt(lengthMatch[1], 10);
const streamBytes = buffer.subarray(streamStart, streamStart + declaredLength);
let inflated: Buffer;
try {
inflated = zlib.inflateSync(streamBytes);
} catch {
continue; // not valid Flate data after all - leave untouched
}
chunks.push(buffer.subarray(cursor, streamStart)); // verbatim up to + incl. stream header
chunks.push(inflated);
cursor = streamStart + declaredLength;
}
chunks.push(buffer.subarray(cursor));
return Buffer.concat(chunks);
}
Notes and limitations
- Only a sole
/FlateDecodefilter is handled. A filter chain (e.g./Filter [/ASCII85Decode /FlateDecode]) is intentionally left compressed. /Lengthgiven as an indirect reference (5 0 R) is not resolved β that stream is skipped and left compressed. This only affects the small minority of PDF generators that use indirect lengths; direct integer lengths (the common case) are handled fully.- Object dictionaries themselves (e.g.
/Type /Catalog,/Pages) are never compressed by this feature and remain plaintext regardless β only the content stream bodies are affected. - If a stream fails to inflate, itβs left as-is rather than raising an error, so a partially-matched or already-plaintext stream never corrupts the rest of the file.
Authorizations
Your unique client identifier provided by MoneyOne during FIU onboarding
Your confidential client secret provided by MoneyOne
Your organization's unique identifier in the FinPro system
Application-specific identifier for tracking API calls
Body
Request body for retrieving financial information in PDF format for accounts associated with an approved consent.
The unique consent identifier provided by the Account Aggregator after consent approval. This must be a valid GUID format identifier for an ACTIVE consent.
An array of link reference numbers for specific accounts for which PDF data is required. If this parameter is not provided, PDFs will be generated for all accounts linked to the consent. Use this to generate PDFs for selected accounts only.
The start date from when transaction data should be included in the PDF. Must be in ISO 8601 UTC date-time format (e.g., 2023-01-01T00:00:00Z). When provided, only transactions on or after this date will be included.
The end date until when transaction data should be included in the PDF. Must be in ISO 8601 UTC date-time format (e.g., 2023-01-31T23:59:59Z). When provided, only transactions on or before this date will be included.
Response
PDF generated successfully. The response is a binary PDF file containing formatted financial information including account profile details, account holder information, account summary, and transaction history.
Binary PDF file containing formatted financial information
Was this page helpful?
