API Documentation
Integrate Statement Flow's bank statement processing into your applications with our REST API.
Important: All Endpoints Use POST Method
All Statement Flow API endpoints use the POST HTTP method, even for operations that traditionally use GET (like listing or retrieving data). This is due to the platform's architecture and ensures consistent authentication and request handling.
Pass all parameters in the JSON request body, including filters and IDs.
Quick Start
Get up and running in minutes
Get API Key
Generate an API key from your Settings page
Upload File
Upload your statement to a public URL
Call API
Send the file URL to our conversion endpoint
Get Results
Receive clean, formatted transaction data
Generate your API key from the Settings page to start making requests. API access is available on Professional plans and higher.
Generate API KeyBase URL
All API requests should be made to:
https://statementflow.co/functionsNote: Append the function name to this base URL (e.g., /convertDocument)
Authentication
All API requests require authentication using your API key in the Authorization header:
Authorization: Bearer YOUR_API_KEYImportant: Keep your API key secure. Never expose it in client-side code or public repositories.
Rate Limits & Quotas
Request Limits
- • 60 requests per minute
- • 1000 requests per hour
- • Subject to monthly page quotas
- • File size limit: 10MB
Quota Management
- • Each page processed counts toward your quota
- • Check remaining quota via
/getUserUsage - • Upgrade your plan for higher limits
- • API usage shares quota with web app
API Endpoints
https://statementflow.co/functions/convertDocumentConvert a bank statement from a URL to CSV or JSON format
Note: You must first upload your file to a publicly accessible URL, then pass that URL to this endpoint.
Parameters (JSON Body)
| Name | Type | Required | Description |
|---|---|---|---|
| file_url | string | Required | URL of the PDF or image file to convert |
| output_format | string | Optional | Output format: "csv" or "json". Default: "csv" |
https://statementflow.co/functions/getUserUsageGet current usage statistics and remaining quota
Note: Returns pages used, remaining quota, and billing cycle information.
https://statementflow.co/functions/listUserDocumentsList your processed documents
Note: Returns a list of documents with their processing status and metadata.
Parameters (JSON Body)
| Name | Type | Required | Description |
|---|---|---|---|
| limit | integer | Optional | Number of documents to return (default: 50, max: 100) |
| status | string | Optional | Filter by status: "parsed", "processing", "failed" |
https://statementflow.co/functions/getDocumentDetailsGet details of a specific processed document
Note: Returns complete document metadata including transaction count and download URLs.
Parameters (JSON Body)
| Name | Type | Required | Description |
|---|---|---|---|
| document_id | string | Required | The document ID to retrieve |
Code Examples
Convert a bank statement using different programming languages
curl -X POST https://statementflow.co/functions/convertDocument \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"file_url": "https://your-storage.com/statement.pdf",
"output_format": "csv"
}'Response Format
Successful conversion response:
{
"data": {
"success": true,
"document_id": "doc_1234567890",
"message": "Document processed successfully",
"filename": "bank_statement.pdf",
"pages_processed": 3,
"transactions_found": 45,
"csv_url": "https://files.statementflow.co/converted/abc123.csv",
"json_url": "https://files.statementflow.co/converted/abc123.json",
"pages_charged": 3,
"balance_validation": {
"opening_balance": 1250.00,
"closing_balance": 1847.32,
"calculated_balance": 1847.32,
"balance_matches": true
}
}
}Error response:
{
"data": {
"success": false,
"error": "INVALID_FILE_FORMAT",
"message": "Only PDF and image files are supported",
"details": "Uploaded file type: application/excel"
}
}Output Formats
CSV Format
The generated CSV follows this exact format:
Date,Description,Reference Number,Amount
2024-01-15,ATM WITHDRAWAL,REF123456,-50.00
2024-01-16,SALARY DEPOSIT,SAL789012,2500.00
2024-01-17,GROCERY STORE,CARD890123,-87.45JSON Format
The JSON format provides structured data with additional metadata:
[
{
"date": "2024-01-15",
"description": "ATM WITHDRAWAL",
"reference_number": "REF123456",
"amount": -50.00
},
{
"date": "2024-01-16",
"description": "SALARY DEPOSIT",
"reference_number": "SAL789012",
"amount": 2500.00
}
]• Date: YYYY-MM-DD format
• Description: Transaction description (cleaned and formatted)
• Reference Number: Transaction reference, check number, or ID (if available)
• Amount: Positive for credits/deposits, negative for debits/withdrawals
