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

# Financial API workflows

> Follow complete request flows from ticker lookup to standardized values, reported tables, and filing evidence.

Use these workflows when you want an integration path rather than an endpoint inventory.

## Choose a workflow

| Goal | Start with | Keep for later requests |
| - | - | - |
| Load one financial statement | Standardized statement endpoint | `company.id`, `catalog_version` |
| Load a financial model | Income, balance sheet, cash flow, and ratio endpoints | company ID and query parameters |
| Show the issuer's printed statement | As-reported endpoint | `filing_id`, `table_id`, `value_id` |
| Explain a standardized value | Statement with `includeSources=true` | `filing_id`, `cell_id`, page |
| Refresh after new results | `financials.published` event | event ID and company ID |

## Start with one statement

```bash theme={null}
curl -sG "https://api.rangler.co/v1/company/financials/income-statement/standardized" \
  -H "X-API-Key: $RANGLER_API_KEY" \
  --data-urlencode "company=ACCESSCORP" \
  --data-urlencode "countryCode=NG" \
  --data-urlencode "periodType=annual,latest" \
  --data-urlencode "includeSources=true"
```

The `company` parameter also accepts the returned company UUID. Switch only the endpoint path to retrieve the balance sheet or cash flow statement.

The response distinguishes directly reported and calculated values:

```json theme={null}
{
  "company": {
    "id": "efa534f5-3b01-4f12-a33b-3c797b05beee",
    "name": "ACCESS HOLDINGS PLC",
    "ticker": "ACCESSCORP",
    "exchange": "NGX",
    "country_code": "NG"
  },
  "catalog_version": "sha256:971d8ba4d993db36b5e02c0870a250b7595ac59569701f057fb3a2724be57e30",
  "periods": [
    {
      "period_id": "fy_2025-12-31",
      "period_end_date": "2025-12-31",
      "period_granularity": "full_year",
      "reported_currency": "NGN",
      "display_currency": "NGN",
      "metrics": {
        "profit_after_tax": 743045000000.0,
        "interest_income": 3546335000000.0
      },
      "metric_origins": {
        "profit_after_tax": "reported",
        "interest_income": "derived_line_item"
      },
      "sources": {
        "profit_after_tax": {
          "cell_id": "c6955b10-1531-51fd-ae30-bba80f90e2a7",
          "page": 86,
          "filing_id": "58a5c0c4-9955-4292-85ed-0da998dae339"
        }
      }
    }
  ]
}
```

## Load several financial sections

The API keeps each concept separate. Fetch the sections your application needs in parallel and cache them independently.

<Tabs>
  <Tab title="Python">
    ```python theme={null}
    import os
    import requests
    from concurrent.futures import ThreadPoolExecutor

    base = "https://api.rangler.co/v1"
    headers = {"X-API-Key": os.environ["RANGLER_API_KEY"]}
    params = {
        "company": "ACCESSCORP",
        "countryCode": "NG",
        "periodType": "annual,latest",
    }
    paths = [
        "/company/financials/income-statement/standardized",
        "/company/financials/balance-sheet/standardized",
        "/company/financials/cash-flow-statement/standardized",
        "/company/ratios",
    ]

    def read(path):
        response = requests.get(base + path, headers=headers, params=params, timeout=30)
        response.raise_for_status()
        return response.json()

    with ThreadPoolExecutor(max_workers=len(paths)) as executor:
        income, balance, cash_flow, ratios = executor.map(read, paths)
    ```
  </Tab>

  <Tab title="JavaScript">
    ```js theme={null}
    const params = new URLSearchParams({
      company: 'ACCESSCORP',
      countryCode: 'NG',
      periodType: 'annual,latest',
    });
    const paths = [
      '/company/financials/income-statement/standardized',
      '/company/financials/balance-sheet/standardized',
      '/company/financials/cash-flow-statement/standardized',
      '/company/ratios',
    ];

    const responses = await Promise.all(
      paths.map((path) =>
        fetch(`https://api.rangler.co/v1${path}?${params}`, {
          headers: { 'X-API-Key': process.env.RANGLER_API_KEY },
        }),
      ),
    );
    if (responses.some((response) => !response.ok)) throw new Error('A Rangler request failed');
    const [income, balance, cashFlow, ratios] = await Promise.all(
      responses.map((response) => response.json()),
    );
    ```
  </Tab>
</Tabs>

Use the returned `company.id` on subsequent requests. Fetch metric definitions through `GET /v1/standardized-metrics-list` and ratio definitions through `GET /v1/ratios-list`, then cache them by `catalog_version`.

## Follow a value to its source

First request a standardized statement with `includeSources=true`. Then use the returned company and cell IDs:

```bash theme={null}
curl -s "https://api.rangler.co/v1/companies/efa534f5-3b01-4f12-a33b-3c797b05beee/statement-cells/c6955b10-1531-51fd-ae30-bba80f90e2a7/source" \
  -H "X-API-Key: $RANGLER_API_KEY" \
  --output source.png
```

Source renders return `image/png`. Geometry is a separate endpoint and can return `404` when Rangler can render the source row but cannot safely locate the exact value rectangle.

## Retrieve the printed statement

Use an as-reported route when you need the issuer's original rows and columns:

```bash theme={null}
curl -sG "https://api.rangler.co/v1/company/financials/income-statement/as-reported" \
  -H "X-API-Key: $RANGLER_API_KEY" \
  --data-urlencode "company=ACCESSCORP" \
  --data-urlencode "countryCode=NG" \
  --data-urlencode "limit=5"
```

When you already have a `value_id`, retrieve its source crop through `GET /v1/companies/{company_id}/statement-table-values/{value_id}/source`.

## Refresh after published results

Subscribe to `financials.published`. On delivery:

1. Deduplicate the event by `id`.
2. Read its `company_id`.
3. Re-fetch the exact endpoint and query your application stores.
4. Compare period IDs, restatement flags, and values before replacing local records.
5. Acknowledge the webhook quickly and process the refresh asynchronously.

Use `GET /v1/events?type=financials.published` to find updates if a webhook is missed.


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