InfraNotes Financial Intelligence · v0
Welcome
Select a document from the sidebar to read it.
Release 3 Dev 2 Handoff: Working Capital
Route
GET /api/v1/intelligence/working-capital/summary- Permission:
intelligence:cashflow:view - Query params:
start_date: optionalYYYY-MM-DD; defaults to today.end_date: optionalYYYY-MM-DD; defaults to three months afterstart_date.entity_id: optional UUID filter.
- Response envelope: standard FI
{ "data": ..., "meta": ... }.
Data Contract
data includes:
receivablesandpayables: AR/AP aging summaries withtotal_open,due_in_window,open_item_count, ordered agingbuckets,currency, and source freshness.expected_cash_flow:inflow_amount,outflow_amount,net_amount,currency, andsource.cash_conversion_cycle: DSO/DPO where AR/AP throughput exists;available=falsewithunavailable_reasonsuntil inventory-day facts exist.forecast_variance: latest forecast-accuracy variance when available; otherwiseavailable=false.freshness: source freshness records forreceivable,payable,cashflow_predictions, andforecast_accuracy.degradedanddegraded_reasons: currently used for mixed-currency aggregation without FX conversion.
Empty And Degraded States
- No AR/AP facts: aging summaries return zero totals and empty-count buckets.
- No AR/AP facts but cashflow predictions exist:
expected_cash_flow.sourceiscashflow_predictions. - No forecast accuracy:
forecast_variance.available=false. - Mixed currencies: totals are still returned, but
degraded=truebecause no FX conversion is applied.
Event Inputs
The Kafka consumer now persists service-owned facts from:
accounting.ar.updated: receivable facts from Core Ledger AR invoices.accounting.ap.updated: payable facts from Core Ledger AP bills.
Both paths upsert into working_capital_items by (tenant_id, source_kind, source_id).
Frontend Notes
- Show AR/AP cards directly from
receivablesandpayables. - Show expected cash flow from
expected_cash_flow; surfacesourcein tooltips. - Treat
cash_conversion_cycle.available=falseas a partial-data state, not an error. - Surface stale or missing
freshnessrows as data-quality warnings.
Release 1 Deferred Closure Check
infranotes-fronthas no direct/api/planning/*calls in planning pages, but the shared FI planning utility clients still uselegacyPlanningPathfor calendar, reminder, and recurrence helpers.- Budget, goal, planned-expense, scenario, and cashflow legacy paths have canonical replacements listed in
docs/RELEASE_0_CANONICAL_API.md. - Calendar, reminder, and recurrence helpers have no FI v1 canonical replacement yet; adding those routes would be a separate public API contract decision, not part of the Release 3 working-capital read surface.