Kaaj Financial Statement Analysis API
This document describes the API endpoint for comprehensive analysis of financial statements. The endpoint accepts various financial statement documents (Balance Sheet, Income Statement, Cash Flow Statement) and returns detailed financial analysis including key ratios, trends, and insights.
Endpoint
POST https://api.kaaj.ai/application/financial-statement-analysis
Headers
Authorization: Bearer <your_api_key>
Content-Type: multipart/form-data
Request Body
The request is submitted as multipart/form-data
and must include:
- Financial Statement Files: One or more financial statement files in PDF format.
- JSON Metadata: A JSON field named
metadata
containing an array of objects. Each object must include:- appId (string, required): Unique identifier for the application/form associated with the file.
- fileName (string, required): Name of the corresponding file.
- statementType (string, required): Type of financial statement. Valid values are:
BALANCE_SHEET
INCOME_STATEMENT
CASH_FLOW_STATEMENT
- periodEnd (string, required): The end date of the reporting period in ISO format (YYYY-MM-DD).
- companyName (string, optional): Name of the company the statement belongs to.
- fiscalYear (string, optional): Fiscal year of the statement.
Example Metadata (as a JSON field)
{
"files": [
{
"appId": "APP001",
"fileName": "balance_sheet_2023.pdf",
"statementType": "BALANCE_SHEET",
"periodEnd": "2023-12-31",
"companyName": "Acme Corporation",
"fiscalYear": "2023"
},
{
"appId": "APP001",
"fileName": "income_statement_2023.pdf",
"statementType": "INCOME_STATEMENT",
"periodEnd": "2023-12-31",
"companyName": "Acme Corporation",
"fiscalYear": "2023"
},
{
"appId": "APP001",
"fileName": "cash_flow_2023.pdf",
"statementType": "CASH_FLOW_STATEMENT",
"periodEnd": "2023-12-31",
"companyName": "Acme Corporation",
"fiscalYear": "2023"
}
]
}
Analysis Components
Our AI models extract and analyze financial data from the provided statements, performing comprehensive analysis across multiple dimensions:
1. Balance Sheet Analysis
- Asset composition and quality
- Liability structure
- Equity analysis
- Working capital assessment
- Asset utilization metrics
2. Income Statement Analysis
- Revenue breakdown and trends
- Cost structure analysis
- Profitability metrics
- Operating efficiency
- Earnings quality assessment
3. Cash Flow Statement Analysis
- Operating cash flow analysis
- Investment activities assessment
- Financing activities evaluation
- Free cash flow calculation
- Cash conversion cycle
4. Financial Ratios
- Liquidity ratios (Current ratio, Quick ratio)
- Profitability ratios (ROA, ROE, Profit margins)
- Solvency ratios (Debt-to-Equity, Interest coverage)
- Efficiency ratios (Asset turnover, Inventory turnover)
- Valuation metrics (P/E, EV/EBITDA)
5. Trend Analysis
- Year-over-year comparisons
- Quarter-over-quarter analysis
- Multi-year trend identification
- Seasonal pattern detection
6. Industry Benchmarking
- Comparison against industry averages
- Peer company benchmarking
- Competitive positioning assessment
Response
The API returns a comprehensive analysis package in multiple formats:
Excel Report
An Excel file (.xlsx) containing multiple sheets:
- Executive Summary: Key findings and highlights
- Balance Sheet Analysis: Detailed breakdown of assets, liabilities, and equity
- Income Statement Analysis: Revenue, expenses, and profitability analysis
- Cash Flow Analysis: Operating, investing, and financing cash flows
- Financial Ratios: Comprehensive ratio analysis with benchmarks
- Trend Analysis: Multi-period comparisons and trend identification
- Raw Data: Extracted data from the financial statements
JSON Response
{
"analysisId": "ANALYSIS-123456",
"companyName": "Acme Corporation",
"periodEnd": "2023-12-31",
"reportUrl": "https://api.kaaj.ai/reports/ANALYSIS-123456.xlsx",
"executiveSummary": {
"keyFindings": [
"Strong revenue growth of 15% year-over-year",
"Declining profit margins due to increased operational costs",
"Healthy liquidity position with current ratio of 2.1"
],
"recommendations": [
"Focus on cost control measures to improve profit margins",
"Consider restructuring short-term debt to improve cash flow",
"Evaluate inventory management to reduce holding costs"
]
},
"financialHealth": {
"score": 78,
"rating": "B+",
"trend": "Stable"
},
"balanceSheet": {
"assets": {
"currentAssets": {
"cash": 1250000,
"accountsReceivable": 875000,
"inventory": 1450000,
"shortTermInvestments": 350000,
"prepaidExpenses": 125000,
"otherCurrentAssets": 75000,
"totalCurrentAssets": 4125000
},
"fixedAssets": {
"propertyPlantEquipment": 3750000,
"accumulatedDepreciation": -1250000,
"intangibleAssets": 850000,
"longTermInvestments": 1200000,
"otherLongTermAssets": 325000,
"totalFixedAssets": 4875000
},
"totalAssets": 9000000
},
"liabilitiesAndEquity": {
"currentLiabilities": {
"accountsPayable": 750000,
"shortTermDebt": 500000,
"accruedExpenses": 325000,
"currentPortionOfLongTermDebt": 250000,
"otherCurrentLiabilities": 175000,
"totalCurrentLiabilities": 2000000
},
"longTermLiabilities": {
"longTermDebt": 2500000,
"deferredTaxLiabilities": 350000,
"otherLongTermLiabilities": 150000,
"totalLongTermLiabilities": 3000000
},
"totalLiabilities": 5000000,
"equity": {
"commonStock": 1000000,
"retainedEarnings": 2750000,
"additionalPaidInCapital": 500000,
"treasuryStock": -250000,
"totalEquity": 4000000
},
"totalLiabilitiesAndEquity": 9000000
}
},
"incomeStatement": {
"ordinaryIncomeExpense": {
"income": {
"revenue": 12500000,
"costOfGoodsSold": 7250000,
"grossProfit": 5250000
},
"expenses": {
"salariesAndWages": 1750000,
"rentAndUtilities": 450000,
"depreciation": 350000,
"marketing": 650000,
"generalAndAdministrative": 850000,
"totalOperatingExpenses": 4050000
},
"operatingIncome": 1200000,
"interestExpense": 250000,
"incomeBeforeTax": 950000,
"incomeTax": 285000,
"netOrdinaryIncome": 665000
},
"otherIncomeExpense": {
"otherIncome": 125000,
"otherExpenses": 75000,
"netOtherIncomeExpense": 50000
},
"netIncome": 715000
},
"cashFlowStatement": {
"operatingActivities": {
"netIncome": 715000,
"depreciation": 350000,
"changesInWorkingCapital": {
"accountsReceivable": -125000,
"inventory": -200000,
"accountsPayable": 75000,
"otherWorkingCapital": -50000,
"totalChangesInWorkingCapital": -300000
},
"netCashFromOperatingActivities": 765000
},
"investingActivities": {
"capitalExpenditures": -450000,
"acquisitionsAndDivestitures": -200000,
"investmentsChanges": -150000,
"otherInvestingActivities": 50000,
"netCashFromInvestingActivities": -750000
},
"financingActivities": {
"debtIssuanceRepayment": 200000,
"dividendsPaid": -150000,
"stockIssuanceRepurchase": -100000,
"otherFinancingActivities": -25000,
"netCashFromFinancingActivities": -75000
},
"netChangeInCash": -60000,
"beginningCashBalance": 1310000,
"endingCashBalance": 1250000
},
"financialRatios": {
"profitabilityRatios": {
"grossProfitMargin": 0.42,
"operatingProfitMargin": 0.096,
"netProfitMargin": 0.0572,
"returnOnAssets": 0.0794,
"returnOnEquity": 0.1788,
"returnOnInvestedCapital": 0.1071,
"ebitdaMargin": 0.124
},
"liquidityRatios": {
"currentRatio": 2.0625,
"quickRatio": 1.3375,
"cashRatio": 0.625,
"operatingCashFlowRatio": 0.3825,
"cashConversionCycle": 78.5
},
"solvencyRatios": {
"debtToEquity": 1.25,
"debtToAssets": 0.5556,
"interestCoverageRatio": 4.8,
"debtServiceCoverageRatio": 3.06,
"equityMultiplier": 2.25
},
"efficiencyRatios": {
"assetTurnover": 1.3889,
"inventoryTurnover": 5.0,
"receivablesTurnover": 14.2857,
"payablesTurnover": 9.6667,
"fixedAssetTurnover": 2.5641,
"operatingCycle": 98.2
},
"valuationRatios": {
"priceToEarnings": 15.38,
"priceToBook": 2.75,
"enterpriseValueToEBITDA": 8.92,
"priceToSales": 0.88,
"dividendYield": 0.0375
}
},
"trendAnalysis": {
"yearOverYear": {
"revenue": {
"growth": 0.15,
"trend": "Increasing"
},
"netIncome": {
"growth": 0.08,
"trend": "Increasing"
},
"totalAssets": {
"growth": 0.12,
"trend": "Increasing"
},
"totalLiabilities": {
"growth": 0.14,
"trend": "Increasing"
},
"operatingCashFlow": {
"growth": 0.05,
"trend": "Stable"
}
}
}
}
Success Response
Code: 200 OK Content-Type: application/json
Error Responses
Bad Request
Code: 400 Bad Request
{
"message": "Missing required fields: ensure all files and corresponding metadata are provided."
}
Unsupported File Type
Code: 415 Unsupported Media Type
{
"message": "Unsupported file type. Only PDF files are accepted."
}
Processing Error
Code: 422 Unprocessable Entity
{
"message": "Unable to process financial statements. Please ensure documents are clear and contain valid financial data."
}
Additional Notes
- File Requirements: Financial statements should be in PDF format with clear, readable text. Scanned documents should be high quality.
- Multiple Periods: For trend analysis, submit statements from multiple periods with appropriate periodEnd dates.
- Processing Time: Analysis may take 1-3 minutes depending on the number and complexity of the statements.
- Data Extraction Confidence: The response includes confidence scores for extracted data points.
- Industry Classification: The system automatically attempts to classify the company by industry for benchmarking purposes.
- Security: All uploaded financial documents are encrypted at rest and in transit. Documents are retained for 30 days before automatic deletion.
- Rate Limits: Standard tier accounts are limited to 50 analyses per month.