> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stockinsights.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Financial Statements

> The income statement, balance sheet and cash flow of an India quarterly result, as soon as they are extracted from the result PDF.

These events send the financial statements of an India quarterly result as soon
as StockInsights extracts them from the result PDF. The PDF usually comes hours
or days before the XBRL filing, so these events are the first source of the
numbers.

Each statement of each basis has the keys of the
[financial statements API](https://docs.stockinsights.ai/api-reference/india_endpoints/income-statement.md):
the same names, in the same order.

| Event | Sent when |
| - | - |
| [`quarterly-result.income-statement.created`](https://docs.stockinsights.ai/webhooks/v2/financial-statements/income-statement-created) | The income statement of a quarterly result is first extracted |
| [`quarterly-result.balance-sheet.created`](https://docs.stockinsights.ai/webhooks/v2/financial-statements/balance-sheet-created) | The balance sheet is first extracted |
| [`quarterly-result.cash-flow.created`](https://docs.stockinsights.ai/webhooks/v2/financial-statements/cash-flow-created) | The cash flow statement is first extracted |
| [`quarterly-result.income-statement.updated`](https://docs.stockinsights.ai/webhooks/v2/financial-statements/income-statement-updated) | A later extraction gives other numbers |
| [`quarterly-result.balance-sheet.updated`](https://docs.stockinsights.ai/webhooks/v2/financial-statements/balance-sheet-updated) | A later extraction gives other numbers |
| [`quarterly-result.cash-flow.updated`](https://docs.stockinsights.ai/webhooks/v2/financial-statements/cash-flow-updated) | A later extraction gives other numbers |

## Which statements a filing has

* Most companies report only the income statement in Q1 and Q3.
* The balance sheet and the cash flow statement usually come only in Q2 (half
  year) and Q4 (full year).
* A statement that the filing does not have sends no event. Do not wait for a
  balance sheet in Q1.
* Each statement is sent on its own. If one statement fails our checks, the
  others are still sent, and the failed one is sent later when it passes.

## The data

```json theme={null}
{
  "consolidated": { "...": "the statement object of the consolidated basis" },
  "standalone": { "...": "the statement object of the standalone basis" },
  "filing_id": "06af7256-fc54-7491-8000-4a0b2da74b92",
  "ticker": "PETPLST",
  "source": "pdf"
}
```

* `consolidated` and `standalone` are each the statement object of the API for
  that basis, or `null` when the filing has no statement of that basis.
* `filing_id`, `ticker` and `source` are webhook extras. `filing_id` is the `id`
  of the `quarterly-result.created` event of the same result.
* To get the XBRL statement of the same period from the API, call it with
  `ticker`, `period_end_date`, `reporting_type` and `statement_scope`.

Each event page lists every field.

## Where the webhook differs from the API

* **The source.** The API reads the XBRL filing. The webhook reads the result
  PDF. The numbers can differ a little, and a later extraction can correct a
  number with an `.updated` event.
* **No rounding.** The webhook sends the numbers as extracted. The API rounds
  them to 2 decimals.
* **Keys that the PDF never has are left out:**
  `off_balance_sheet` (bank balance sheet),
  `operating.operating_profit_before_working_capital_changes` (non-bank cash
  flow), `operating.cash_from_operations` and `reconciliation_items` (cash flow).
* **A PDF item that has no API key is not sent**, as the API does not send it
  either. For example, the PDF's total income and total expenses are not sent:
  add the API items to get them.

## Values that are sums of PDF items

Where the API has one number and the PDF has its parts, the webhook sends the sum
of the parts that are not `null`. When all the parts are `null`, the number is
`null`.

| Statement | Key | Sum of the PDF items |
| - | - | - |
| Balance sheet, non-bank | `…borrowings` | Secured loans and unsecured loans |
| Balance sheet, non-bank | `…trade_payables` | Dues to micro and small enterprises and to others |
| Balance sheet, non-bank | `non_current_assets.intangible_assets` | Intangible assets and goodwill, as in the API |
| Balance sheet, bank | `capital_and_liabilities.deposits` | The four kinds of deposits |
| Balance sheet, bank | `assets.fixed_assets` | Gross block, less depreciation and impairment, plus the lease adjustment |
| Cash flow, non-bank | `operating.changes_in_working_capital` | The four working capital changes |
| Income statement | `discontinued_ops.tax_expense` | The tax items of discontinued operations |

## Corrections

When a later extraction of the same quarterly result gives other numbers, the
statement gets an `.updated` event. `data` is the full new statement.
`previous_attributes` has only the old values that changed, in the shape of
`data`:

```json theme={null}
"previous_attributes": {
  "consolidated": { "financials": { "income": { "sales": 16.26 } } }
}
```

* If a later extraction gives the same numbers, no event is sent.
* Each new version of the numbers is sent once. A second correction is a second
  `.updated` event.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.