---
title: "Financial Statement Analysis"
method: POST
path: "/extensions/roboledger/{graph_id}/operations/financial-statement-analysis"
tags: ["RoboLedger: Analytical Views"]
---

# Financial Statement Analysis

`POST /extensions/roboledger/{graph_id}/operations/financial-statement-analysis`

## Request

- Base URL: `https://api.robosystems.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.robosystems.ai/extensions/roboledger/{graph_id}/operations/financial-statement-analysis`
- Auth: one of:
  - API key in header `X-API-Key`
  - HTTP bearer

Query a rendered financial statement from the graph-backed XBRL hypercube (Structure → FactSet → Fact). Works on the SEC shared repository today and on any RoboLedger tenant graph whose ledger has been materialized to LadybugDB. For shared-repo graphs, provide `ticker` to auto-resolve the latest filing; for tenant graphs, provide `report_id` explicitly.

**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.

## Path parameters

- `graph_id` string, required

## Headers

- `Idempotency-Key` string, nullable

## Request body

- FinancialStatementAnalysisRequest: Request for financial-statement-analysis (graph-backed Cypher).
  - `statement_type` string, required: income_statement | balance_sheet | cash_flow_statement | equity_statement
  - `ticker` string, nullable: Company ticker (required on shared-repo graphs, ignored otherwise)
  - `report_id` string, nullable: Specific report identifier. If omitted, auto-resolves latest by ticker + filters.
  - `fiscal_year` integer, nullable: Filter by fiscal year focus when auto-resolving the report
  - `period_type` string, nullable: annual | quarterly | instant
  - `limit` integer

## Response `200`

Successful Response

- OperationEnvelopeFinancialStatementAnalysisResponse
  - `operation` string, required: Kebab-case operation name
  - `operationId` string, required: op_-prefixed ULID for audit and SSE correlation
  - `status` 'completed' | 'pending' | 'failed', required: Operation lifecycle state
  - `result` FinancialStatementAnalysisResponse: Results of the financial-statement-analysis view op.
    - `graph_id` string, required
    - `statement_type` string, required
    - `ticker` string, nullable
    - `report_id` string, nullable
    - `resolved_report` ResolvedReportInfo: Information about the auto-resolved report.
      - `report_id` string, required
      - `form` string, nullable
      - `filing_date` string, nullable
      - `fiscal_year` integer, nullable
      - `fiscal_period` string, nullable
      - `links` FilingLinks: Where a filing on a shared repository is served.
        - `viewer` string, nullable: The xbrlkit viewer over the published holon — the link to show the filing
        - `holon` string, nullable
        - `tavi` string, nullable
        - `as_filed` string, nullable: The primary document as filed
        - `exhibits` object, nullable: An 8-K's exhibits by exhibit number (EX-99.1)
        - `manifest` string, nullable: Every file in the filing's public folder, with its URL
        - `edgar` string, nullable: The filing's folder on EDGAR
    - `facts` AnalyticalStatementFactRow[], required
      - `canonical_concept` string, nullable
      - `qname` string, required
      - `name` string, required
      - `value` number, nullable
      - `unit` string, nullable: The fact's unit, e.g. `USD` or `USD/shares`. A line a filer reports in two units (its own currency and a US-dollar translation) comes back once per unit.
      - `start_date` string, nullable
      - `end_date` string, nullable
      - `period_type` string, nullable
      - `duration_type` string, nullable
    - `fact_count` integer, required
  - `at` string, required: ISO-8601 UTC timestamp
  - `createdBy` string, nullable: User ID that initiated the operation
  - `idempotentReplay` boolean: True when this envelope came from the idempotency cache — the underlying command did not execute again. False on fresh executions.

## Other responses

- `400`: Invalid request
- `401`: Authentication required
- `403`: Access denied
- `404`: Resource not found
- `409`: Idempotency-Key conflict — key reused with different body
- `422`: Validation error
- `429`: Rate limit exceeded
- `500`: Internal server error

---

[API](https://skmtc.dev/robosystems/apis/robosystems-api.md) · [All operations](https://skmtc.dev/robosystems/apis/robosystems-api/llms.txt) · [OpenAPI document](https://skmtc.dev/robosystems/apis/robosystems-api/revisions/e661e2d5ca6a?raw)
