Browse the API reference

Live Financial Statement

post/extensions/roboledger/{graph_id}/operations/live-financial-statement

Part of Extensions: RoboLedger.

Generate an ad-hoc financial statement directly from the tenant's OLTP ledger data using the active CoA→GAAP mapping. This is the authoritative source for RoboLedger entity graphs — no graph materialization required. Rejected on shared-repository graphs; those should use financial-statement-analysis instead.

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.

Authentication

Authenticate in any one of these ways — not all of them:

  • API key in the X-API-Key header.
  • Bearer token in the Authorization header.

Path parameters

NameTypeDescription
graph_idrequiredstringGraph Id

Header parameters

NameTypeDescription
Idempotency-KeyoptionalstringIdempotency-Key

Request body

Required, application/json.

FieldTypeDescription
statement_typerequiredstring

income_statement | balance_sheet | cash_flow_statement | equity_statement. ``equity_statement`` is provisional — equity balances, not a rollforward — and is not offered on the MCP surface until it articulates.

period_startoptionalstring (date)

Explicit window start. Overrides period_type/fiscal_year.

period_endoptionalstring (date)

Explicit window end. Overrides period_type/fiscal_year.

period_typeoptionalstring

annual | quarterly | instant (ignored when dates supplied)

fiscal_yearoptionalinteger

Fiscal year for annual window (anchored on FiscalCalendar)

limitoptionalinteger

Max fact rows returned. Defaults to the ceiling so a statement is never cut mid-section — visible rows would stop footing to visible subtotals. Lower it only for a preview.

Default: 1000

Example request

curl
curl -X POST "https://api.robosystems.ai/extensions/roboledger/{graph_id}/operations/live-financial-statement" \
  -H "X-API-Key: $ROBOSYSTEMS_API_KEY" \
  -H "Idempotency-Key: <Idempotency-Key>" \
  -H "Content-Type: application/json" \
  -d '{
  "statement_type": "string"
}'

Responses

200 Successful Response

FieldTypeDescription
operationrequiredstring

Kebab-case operation name

operationIdrequiredstring

op_-prefixed ULID for audit and SSE correlation

statusrequiredstring

Operation lifecycle state

One of: completed, pending, failed

resultoptionalLiveFinancialStatementResponse

Command-specific result payload

LiveFinancialStatementResponse fields
FieldTypeDescription
graph_idrequiredstring
statement_typerequiredstring
periodsrequiredPeriodSpec[]

Rendered columns, aligned with each row's ``values``. Current and prior for income_statement and balance_sheet; current only for cash_flow_statement — the prior period is pivoted as the indirect-method delta basis and not rendered.

PeriodSpec fields
FieldTypeDescription
startrequiredstring (date)

Period start date (inclusive). Window the column rolls up.

endrequiredstring (date)

Period end date (inclusive). Window the column rolls up.

labelrequiredstring

Column header label (e.g. 'FY2025 Q3', '2024', 'YTD').

factsrequiredLiveStatementFactRow[]

A single row of an OLTP-backed ad-hoc statement.

LiveStatementFactRow fields
FieldTypeDescription
qnamerequiredstring
namerequiredstring
traitoptionalstring
valuesrequirednumber[]
depthoptionalinteger

Default: 0

is_subtotaloptionalboolean

Default: false

fact_countrequiredinteger
validationoptionalValidationCheckResponse

Guard-rail outcome for the rendered columns — accounting equation, net-income equation, totals footing, operating-plug size. Null only when no structure rendered.

ValidationCheckResponse fields
FieldTypeDescription
passedrequiredboolean

True iff at least one rule ran and every rule produced zero failures on every rendered column. False when nothing was checked (`status == 'inconclusive'`).

statusrequiredstring

`passed` — every rule ran on every column with zero failures; `failed` — at least one rule failed; `inconclusive` — no validation rules exist for this block type, so nothing was checked.

checksrequiredstring[]

Names of rules that were evaluated.

failuresrequiredstring[]

Human-readable descriptions of rule failures.

warningsrequiredstring[]

Non-blocking advisories from rule evaluation.

unmapped_countoptionalinteger

Default: 0

truncatedoptionalboolean

Default: false

atrequiredstring

ISO-8601 UTC timestamp

createdByoptionalstring

User ID that initiated the operation (null for legacy callers)

idempotentReplayoptionalboolean

True when this envelope came from the idempotency cache — the underlying command did not execute again. False on fresh executions.

Default: false

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