Skip to main content

Financial Analysis

This guide walks you through building a full financial analysis for a company by combining accounting, banking, and tax data.

Goal

Evaluate a company’s financial health by collecting:

  • Published balance sheets and income statements
  • Detailed tax bundles
  • Banking data (accounts, transactions, cashflow)
  • VAT and corporate tax filings

Data collected

Data typeDescriptionProviderEndpoint
Financial StatementPublished financial statementscompany_legal_fr/users/{userId}/financial-statements
Tax ReturnComplete tax bundlescompany_legal_fr, impots_gouv/users/{userId}/tax-returns
Tax Return AnalysisComputed ratios and indicatorscompany_legal_fr/users/{userId}/tax-return-analysis
Sector AnalysisIndustry comparisonscompany_legal_fr/users/{userId}/sector-analysis
Bank AccountBank accountsbudget_insight, gocardless/users/{userId}/bank-accounts
Bank TransactionTransaction historybudget_insight, gocardless/users/{userId}/bank-transactions
Bank CashflowCashflow analysisbudget_insight, gocardless/users/{userId}/bank-cashflow
VAT DeclarationVAT filingsimpots_gouv/users/{userId}/vat-declarations

Provider architecture

Financial Data Stack

Blend legal, tax, and banking feeds to build a full financial cockpit.

Legal data

Automatic

  • Provider: `company_legal_fr`
  • Data: Financial Statements, Tax Return (INPI), Tax Return Analysis, Sector Analysis

Tax data

OAuth redirect

  • Provider: `impots_gouv`
  • Data: Tax Return, VAT Declaration, Corporate Tax, Tax Account

Banking data

OAuth redirect

  • Providers: `budget_insight`, `gocardless`
  • Data: Bank Account, Bank Transaction, Bank Cashflow, Credit Insights

Implementation steps

Step 1: Enable the providers

PUT /api/v6/providers/company_legal_fr
{
"enable": true
}
PUT /api/v6/providers/company_legal_fr/settings
{
"auto_connect": true
}

Provider Impots Gouv (tax data - OAuth required)

PUT /api/v6/providers/impots_gouv
{
"enable": true
}

Provider Budget Insight (bank data - OAuth required)

PUT /api/v6/providers/budget_insight
{
"enable": true
}

Step 2: Create the user

POST /api/v6/users/legal
{
"name": "Company to analyze SAS",
"siren": "123456789",
"group": "analyse-financiere"
}

Step 3: Create the data connections

POST /api/v6/users/{userId}/data-connections
{
"requested_data_types": [
"FINANCIAL_STATEMENT",
"TAX_RETURN",
"TAX_RETURN_ANALYSIS",
"SECTOR_ANALYSIS"
],
"provider_name": "company_legal_fr"
}

3.2 Tax data (OAuth redirect required)

POST /api/v6/users/{userId}/data-connections
{
"requested_data_types": [
"TAX_RETURN",
"VAT_DECLARATION",
"CORPORATE_TAX",
"TAX_ACCOUNT"
],
"provider_name": "impots_gouv"
}
User authorization required

For impots_gouv and banking providers, users must complete an OAuth authorization flow. Redirect them to the redirect_url returned when the user is created.

3.3 Banking data (OAuth redirect required)

POST /api/v6/users/{userId}/data-connections
{
"requested_data_types": [
"BANK_ACCOUNT",
"BANK_TRANSACTION",
"BANK_CASHFLOW",
"BANK_CREDIT_INSIGHTS"
],
"provider_name": "budget_insight"
}

Step 4: Launch the synchronization

POST /api/v6/users/{userId}/sync
{
"data_types": [
"FINANCIAL_STATEMENT",
"TAX_RETURN",
"TAX_RETURN_ANALYSIS",
"SECTOR_ANALYSIS",
"VAT_DECLARATION",
"BANK_ACCOUNT",
"BANK_TRANSACTION",
"BANK_CASHFLOW"
]
}

Step 5: Analyze financial data

5.1 Published financial statements

GET/api/v6/users/{userId}/financial-statements

Key metrics to extract:

  • Revenue and its evolution
  • Net income
  • Equity
  • Debt level

5.2 Detailed tax bundles

GET/api/v6/users/{userId}/tax-returns

Response structure:

[
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"type": "C",
"closing_year": 2023,
"closing_date": "2023-12-31",
"duration": 12,
"revenue": 1500000,
"net_profit": 150000,
"tax_return_values": [
{ "code": "FL", "values": [1500000, 0, 0, 0] },
{ "code": "HN", "values": [150000, 0, 0, 0] }
],
"warnings": []
}
]

Bundle types

CodeType
CFull (standard regime)
SSimplified (simplified regime)
KConsolidated

5.3 Automated tax bundle analysis

GET/api/v6/users/{userId}/tax-return-analysis

The API calculates financial ratios automatically:

  • Profitability (ROE, ROA)
  • Solvency
  • Liquidity
  • Capital structure

5.4 Sector comparison

GET/api/v6/users/{userId}/sector-analysis

Compare the company's performance against the industry median (APE code).

5.5 Banking data

GET/api/v6/users/{userId}/bank-accounts
GET/api/v6/users/{userId}/bank-cashflow

Cashflow analysis:

[
{
"month": "2021-08",
"balance": {
"value": 0,
"currency": "string"
},
"inbound": {
"value": 0,
"currency": "string"
},
"outbound": {
"value": 0,
"currency": "string"
}
}
]

Example financial scoring

function calculateFinancialScore(data) {
const { taxReturns, bankCashflow, sectorAnalysis } = data;

// Latest tax bundle
const lastTaxReturn = taxReturns[0];

// Ratio calculations
const profitMargin = lastTaxReturn.net_profit / lastTaxReturn.revenue;
const revenueGrowth = calculateGrowth(taxReturns);

// Cashflow score (based on the last 6 months)
const cashflowScore = bankCashflow
.slice(0, 6)
.reduce((acc, month) => acc + (month.balance > 0 ? 1 : 0), 0) / 6;

// Sector benchmark
const sectorPerformance = sectorAnalysis.percentile || 50;

// Final score (0-100)
return {
score: Math.round(
profitMargin * 30 +
revenueGrowth * 20 +
cashflowScore * 30 +
(sectorPerformance / 100) * 20
),
details: {
profitMargin,
revenueGrowth,
cashflowScore,
sectorPerformance
}
};
}

Data quality checks

Tax bundles include warnings that highlight completeness or consistency issues:

CodeMessage
01Missing balance sheet - assets - 2050-SD
02Missing balance sheet - liabilities - 2051-SD
26Control: assets = liabilities - 2050-SD
41Control: profit or loss - 2053-SD
danger

If warnings are present, the data might be incomplete or inconsistent. Double-check manually before making a decision.

PUT /api/v6/webhooks/DATA_SYNC_SUCCESS
{
"url": "https://mon-app.com/webhooks/financial-data-ready"
}

See also