Quick Navigation
Complete guide to integrating FinanceAI's document processing API
Ready to start processing documents? Create your free account to get instant access to the API.
All API requests require authentication using your API key in the Authorization header.
curl -X POST https://api.financeai.com/v1/documents/scan \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: multipart/form-data" \
-F "file=@document.pdf"Upload and process a financial document to extract structured data.
file (required) - The document file to processtype (optional) - Document type: bank_statement, receipt, invoice{
"id": "doc_123456789",
"type": "bank_statement",
"status": "completed",
"data": {
"account_number": "****1234",
"balance": 5420.50,
"transactions": [
{
"date": "2025-01-15",
"description": "ACH Credit",
"amount": 2500.00,
"type": "credit",
"merchant": "SALARY DEPOSIT"
}
]
}
}Retrieve the processing results for a specific document.
{
"id": "doc_123456789",
"type": "receipt",
"status": "completed",
"created_at": "2025-01-19T10:30:00Z",
"data": {
"merchant_name": "Office Supplies Plus",
"total_amount": 45.99,
"date": "2025-01-19",
"tax_amount": 3.68,
"items": [
{
"description": "Printer Paper",
"amount": 15.99
},
{
"description": "Pens (Pack)",
"amount": 8.99
}
]
}
}const FormData = require('form-data');
const fs = require('fs');
const axios = require('axios');
const form = new FormData();
form.append('file', fs.createReadStream('bank_statement.pdf'));
form.append('type', 'bank_statement');
const response = await axios.post(
'https://api.financeai.com/v1/documents/scan',
form,
{
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
...form.getHeaders()
}
}
);
console.log(response.data);import requests
url = "https://api.financeai.com/v1/documents/scan"
headers = {"Authorization": "Bearer YOUR_API_KEY"}
with open("receipt.pdf", "rb") as f:
files = {"file": f}
data = {"type": "receipt"}
response = requests.post(url, headers=headers, files=files, data=data)
result = response.json()
print(result)documents per month
5 requests/minute
documents per month
50 requests/minute
Custom pricing
Custom rate limits
200Success400Bad Request401Unauthorized429Rate Limited500Server Error{
"error": {
"code": "invalid_file_type",
"message": "File type not supported. Please upload PDF, PNG, or JPG files.",
"details": {
"supported_types": ["pdf", "png", "jpg", "jpeg"]
}
}
}Configure webhooks to receive real-time notifications when document processing is complete.
document.processedDocument processing completeddocument.failedDocument processing failedbatch.completedBatch processing completed{
"event": "document.processed",
"timestamp": "2025-10-19T14:30:00Z",
"data": {
"document_id": "doc_abc123",
"type": "invoice",
"status": "completed",
"extracted_data": {
"supplier_name": "ABC Supplies Inc.",
"invoice_number": "INV-2024-001",
"total_amount": 1250.00,
"currency": "USD",
"invoice_date": "2024-10-15"
}
}
}Use our official SDKs for faster integration in your preferred programming language.
For best results, upload documents with resolution of at least 300 DPI. Ensure text is clearly visible and not obscured by shadows or glare. PDFs are preferred over image formats when available.
Always implement retry logic with exponential backoff for failed requests. Check the confidence scores of extracted data and implement a review process for low-confidence results.
Monitor your rate limit headers and implement queuing for batch processing. Consider upgrading your plan if you frequently hit rate limits during peak usage.
Never expose your API keys in client-side code or public repositories. Rotate keys regularly and use environment variables to store sensitive credentials.
Documents are automatically deleted after 30 days. Download and store extracted data in your own systems if you need long-term access. Use the retention settings to adjust storage duration.
Sign up for your free API key and start processing documents today.
Get Your API Key