{"openapi":"3.1.0","info":{"title":"Folio data API","description":"Read-only access to the deals Folio serves. Open demo: no key, no writes, no model calls.","version":"1.0.0"},"paths":{"/v1/deals":{"get":{"tags":["v1"],"summary":"List the deals Folio serves","description":"List the registered deals with their deal-table summary.\n\nSourced from :data:`DEALS` (``folio.config.DEAL_REGISTRY``), so a deal\nadded as data — not code — surfaces here automatically; ``id`` is the value\nto pass to the ``/deal/{deal_id}/...`` routes. Each row carries the picker\nfacets (``jurisdiction``/``vintage``/``asset_class``, #344/#641) plus the\ndeal-table columns read from the deal's document model and registered\ndocuments (#748, :mod:`folio.api.deal_summary`), each ``None`` explained in\n``unavailable``.\n\nWith no query parameters the response is every deal, in registry order —\nthe shape the deal selector and comparison picker read. ``type``,\n``jurisdiction`` and ``tier`` filter (repeat or comma-separate to OR\nvalues), ``q`` searches, ``sort`` orders, and ``limit``/``offset`` page\nserver-side; ``X-Total-Count`` carries the filtered total before paging.\nReads committed artifacts only: no extraction, no model call.","operationId":"list_deals","parameters":[{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Asset class(es), e.g. CLO, RMBS.","title":"Type"},"description":"Asset class(es), e.g. CLO, RMBS."},{"name":"jurisdiction","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Issuer jurisdiction(s).","title":"Jurisdiction"},"description":"Issuer jurisdiction(s)."},{"name":"tier","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Coverage tier(s): prospectus_only, reports, tape.","title":"Tier"},"description":"Coverage tier(s): prospectus_only, reports, tape."},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Case/accent-insensitive search over name, id and parties.","title":"Q"},"description":"Case/accent-insensitive search over name, id and parties."},{"name":"sort","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Sort field, ``-`` prefix for descending; nulls last.","title":"Sort"},"description":"Sort field, ``-`` prefix for descending; nulls last."},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":1000,"minimum":1},{"type":"null"}],"description":"Page size.","title":"Limit"},"description":"Page size."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Rows to skip.","default":0,"title":"Offset"},"description":"Rows to skip."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DealSummary"},"title":"Response List Deals"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/deals/{deal_id}/model":{"get":{"tags":["v1"],"summary":"A deal's extracted model: terms, parties, tranches","description":"Return the deal config plus the cached extracted DealModel.\n\nServes the extracted model (tranches, triggers, waterfalls, completeness,\nmetadata) from the assembler's on-disk cache when present. **Never triggers\na cold extraction** — that runs Docling (~10min) — so on a cache miss the\nendpoint returns the config with ``deal_model=None`` and\n``extraction_status=\"not_cached\"`` rather than blocking the request.","operationId":"get_deal_model","parameters":[{"name":"deal_id","in":"path","required":true,"schema":{"type":"string","title":"Deal Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DealModelResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/deals/{deal_id}/waterfall":{"get":{"tags":["v1"],"summary":"A period's reconstructed waterfall","description":"Return the latest reconstructed period's waterfall from the one ledger.\n\nSources from S6's reconstructed ``DealStateSeries`` (the single source of\ntruth — see ``_reconstruct_series``) instead of re-running a single-period\n``WaterfallRunner`` on hardcoded constants. The per-tranche opening/closing\nbalances are the **amortizing** tranche balances of the latest transition's\nopening and closing ``DealState`` (so balances genuinely move period to\nperiod), and the PDL/reserve that gated the cascade come from the\nreconstructed state — not the old hardcoded ``reserve=0/0`` / ``pdl=0/0``.\nThe 11-step Revenue cascade is the S4 execution trace S6 recorded for that\nperiod.\n\nThe old single-period ``WaterfallRunner`` snapshot path is **retired** for\nthis endpoint; ``WaterfallRunner`` now serves only the forward ``/project``\nscenario projector.\n\nA deal with a single tape (no transition to reconstruct) has no waterfall\nperiod yet → returns an empty cascade for the seed date.\n\n``period`` (a reporting date from ``periods``) selects an earlier\nreconstructed period instead of the latest; the Cash flows page's period\npicker reads the deal's history through it. A date no reconstructed period\ncloses on is a 404 — never a silent fall back to the latest, which would\nrender one period's cascade under another period's label.","operationId":"get_deal_waterfall","parameters":[{"name":"deal_id","in":"path","required":true,"schema":{"type":"string","title":"Deal Id"}},{"name":"period","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Period"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WaterfallResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/deals/{deal_id}/compliance":{"get":{"tags":["v1"],"summary":"A deal's tests and triggers","description":"Run covenant compliance across all reporting periods for the deal.\n\nNormalises every ESMA tape the deal references, then runs the covenant\nmonitor over the per-period pool analytics. The trigger set comes from the\ndeal model's *extracted* triggers (the cached ``covenants.triggers``,\nmapped onto the monitor's schema) so each deal is checked against its own\nthresholds and directions; it falls back to the monitor's hardcoded\n``DEFAULT_TRIGGERS`` only when the deal has no cached model or no extracted\ntriggers (Green Lion's extracted triggers match the defaults, so its\nbehaviour is unchanged). Reading the cache never triggers a live\nextraction.\n\nThe ``original_pool_balance`` denominator (clean-up-call proximity and\ncumulative-loss-rate) is resolved from the deal context, defaulting to the\nGreen Lion closing balance when the deal carries none — so the route is\ndeal-generic without a registry-schema migration.","operationId":"get_deal_compliance","parameters":[{"name":"deal_id","in":"path","required":true,"schema":{"type":"string","title":"Deal Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Deal Compliance"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/deals/{deal_id}/validation":{"get":{"tags":["v1"],"summary":"Validation of the model against the deal's own documents","description":"Reconcile the waterfall engine against the deal's own published PoP.\n\nRuns V4's engine-validation harness OFFLINE (committed extracted-model seed +\ncommitted Notes & Cash fixture — no network, no LLM) and returns the\nstructured per-step reconciliation: each engine step compared to the deal's\nactual published Notes & Cash Priority of Payments, to the cent, carrying the\nhonest ``source`` label (``engine`` / ``report-supplied`` / ``residual``).\n\nA registered deal with no committed validation fixture (e.g. Green Lion\n2023-1) returns HTTP 200 with ``available=false`` and an honest note rather\nthan erroring — so the UI degrades gracefully. So does a deal whose committed\nreport its stored outcome withholds (#760), with the note naming the outcome's\nstatus and reasons. An unknown deal id 404s.","operationId":"get_deal_validation","parameters":[{"name":"deal_id","in":"path","required":true,"schema":{"type":"string","title":"Deal Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/deals/{deal_id}/report-gate":{"get":{"tags":["v1"],"summary":"Reconciliation of the report against the engine, with review items","description":"Run the reconciliation-as-gate over a deal's report (#272).\n\nExtracts the deal's Notes & Cash report into a typed, provenanced\n``ParsedReport`` (offline + deterministic — committed fixtures, no network/LLM),\nfolds it through the shared ``run_period`` engine, reconciles the engine-computed\nPriority of Payments against the deal's published figures **to the cent**, then\nmarks every confirmed field ``reconciled=True`` and routes ONLY the\nunreconciled + low-confidence fields to human review. This inverts the review\nburden: instead of a human checking everything the extractor produced, they\ncheck only the handful the engine could not confirm.\n\nThe optional ``confidence_threshold`` query (default ``0.7``) is the extraction-\nconfidence floor below which an *unreconciled* field is routed to a human;\nreconciled fields are auto-trusted regardless of confidence.\n\nA registered deal with no offline gate inputs (an offline-resolvable report —\ncommitted fixtures or a durable cache — plus an extracted model) returns HTTP 200\n``available=false`` with an honest note (like ``/validation``); an unknown deal\nid 404s. The gate is now **general** (#398): GL-2024-1 routes through its\ncommitted fixtures, but any report-driven deal with offline inputs runs the gate\nwith no per-deal builder.","operationId":"get_deal_report_gate","parameters":[{"name":"deal_id","in":"path","required":true,"schema":{"type":"string","title":"Deal Id"}},{"name":"confidence_threshold","in":"query","required":false,"schema":{"type":"number","default":0.7,"title":"Confidence Threshold"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportGateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/deals/{deal_id}/reported-items":{"get":{"tags":["v1"],"summary":"What the report prints that the engine does not model","description":"What each committed report prints that the engine does not model (#758).\n\nOffline and read-only. A report whose own reconciliation is ``refused`` is\nserved with its reasons and no items.","operationId":"get_deal_reported_items","parameters":[{"name":"deal_id","in":"path","required":true,"schema":{"type":"string","title":"Deal Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportedItemsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/deals/{deal_id}/report-verification":{"get":{"tags":["v1"],"summary":"The report's figures against the engine's","description":"Verify a deal's investor report against the engine-computed distributions.\n\nServes what intake already stored, and never calls a model (#756). The\nreport's stored outcome (each table checked against its own printed totals)\ngates the answer: with no outcome, or no stored figures, the status is\n``not_verified``; a ``refused`` report returns its reasons and no figures;\notherwise the stored figures are diffed against the Class A distributions\nand enriched pool/reserve/collections of the reconstructed\n``DealStateSeries`` (the same ledger ``/waterfall`` reads), with citations.\n\nThe optional ``period`` query (e.g. ``\"april 2026\"`` or ``\"2026\"``) selects\nwhich monthly investor report to verify; omitted, the report aligned with the\nlatest folded period is used. A deal with no published investor reports\nreturns HTTP 422 naming the gap; an unknown ``deal_id`` returns 404.\n\nThe %-tolerance comparison here is the coarser sibling of the Reconciler's\nto-the-cent proof (#270); it is exposed as the demo break tool, not the\ncanonical reconciliation surface (that is ``/validation``).","operationId":"get_deal_report_verification","parameters":[{"name":"deal_id","in":"path","required":true,"schema":{"type":"string","title":"Deal Id"}},{"name":"period","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Period"}},{"name":"tolerance_pct","in":"query","required":false,"schema":{"type":"number","default":1.0,"title":"Tolerance Pct"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportVerificationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/deals/{deal_id}/rwa":{"get":{"tags":["v1"],"summary":"Capital per tranche: SEC-ERBA and SEC-SA risk weights, each with its cited inputs or what it lacks","description":"Risk weight per tranche, each carrying the inputs it was computed from or the\ninputs it lacks. Pure: nothing a query supplies is stored, and no model is called.","operationId":"get_deal_rwa","parameters":[{"name":"deal_id","in":"path","required":true,"schema":{"type":"string","title":"Deal Id"}},{"name":"k_sa","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Your K_SA (Art 255), a ratio. Used for this request only.","title":"K Sa"},"description":"Your K_SA (Art 255), a ratio. Used for this request only."},{"name":"ecais","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Your nominated ECAIs, comma separated. Default: all four Art 270F lists, labelled assumed.","title":"Ecais"},"description":"Your nominated ECAIs, comma separated. Default: all four Art 270F lists, labelled assumed."},{"name":"as_of","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Calculation date. Default: the later of today and the framework's effective date.","title":"As Of"},"description":"Calculation date. Default: the later of today and the framework's effective date."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RwaResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"BankInputStatus":{"properties":{"name":{"type":"string","title":"Name"},"status":{"type":"string","enum":["supplied","assumed","absent"],"title":"Status"},"value":{"title":"Value"},"note":{"type":"string","title":"Note"}},"type":"object","required":["name","status","note"],"title":"BankInputStatus"},"DealModelResponse":{"properties":{"deal_name":{"type":"string","title":"Deal Name"},"prospectus_url":{"type":"string","title":"Prospectus Url"},"tape_urls":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Tape Urls"},"investor_report_urls":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Investor Report Urls"},"extraction_status":{"type":"string","title":"Extraction Status"},"completeness_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Completeness Score"},"trigger_names":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Trigger Names"},"deal_model":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Deal Model"},"document_model":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Document Model"}},"type":"object","required":["deal_name","prospectus_url","tape_urls","investor_report_urls","extraction_status"],"title":"DealModelResponse","description":"Response body for ``GET /deal/{deal_id}/model``.\n\nCarries the deal *config* (name + document URLs the frontend already uses)\nalongside the *extracted* :class:`~folio.extraction.assembler.DealModel`\nwhen it has been cached. The extracted model (tranches, triggers,\nwaterfalls, completeness, metadata) is the full ``DealModel.model_dump()``\nnested under ``deal_model`` — kept as a free-form dict so the assembler's\nschema is the single source of truth and need not be restated here.\n\nWhen the cache is cold/missing the endpoint does **not** block on a cold\nextraction: it returns the config with ``deal_model=None`` and\n``extraction_status=\"not_cached\"`` so the frontend can render what it has\nand surface the extraction state."},"DealSummary":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"jurisdiction":{"type":"string","title":"Jurisdiction"},"vintage":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Vintage"},"asset_class":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Asset Class"},"originator":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Originator","description":"The deal's collateral manager (CLO) or seller/originator."},"originator_role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Originator Role","description":"The party role ``originator`` was read from."},"closing_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Closing Date","description":"ISO date of the prospectus's closing (issue) date."},"closing_date_qualifier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Closing Date Qualifier","description":"How the prospectus states it: ``exact``, ``expected``, ..."},"size":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Size","description":"Total note issuance: the sum of every note class's principal."},"size_currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Size Currency"},"size_basis":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Size Basis","description":"What ``size`` measures — ``total_note_issuance`` when present."},"coverage_tier":{"anyOf":[{"type":"string","enum":["prospectus_only","reports","tape"]},{"type":"null"}],"title":"Coverage Tier","description":"Recorded coverage tier: prospectus only, + reports, + a published tape."},"coverage_notes":{"items":{"type":"string"},"type":"array","title":"Coverage Notes","description":"Registered tapes the tier does not count, and why (synthetic / derived)."},"latest_report_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Latest Report Date","description":"Newest registered report period, ISO year-month (``YYYY-MM``)."},"unavailable":{"additionalProperties":{"type":"string"},"type":"object","title":"Unavailable","description":"Field name → machine-readable reason it could not be read."}},"type":"object","required":["id","name","jurisdiction","vintage"],"title":"DealSummary","description":"One deal on ``GET /deals`` — id, name and the deal-table columns.\n\n``id``/``name``/``jurisdiction``/``vintage``/``asset_class`` are the\noriginal picker contract (#131, #344, #641) and keep their meaning:\n``jurisdiction`` is the issuer's stated jurisdiction projected by the\nregistry (#669), ``\"Unknown\"`` when none is stated; ``asset_class`` is the\nregistry's own value (the deal's *type*, ``\"CLO\"``/``\"RMBS\"``) or ``None``.\n\nThe remaining fields are the deal table's (#748). Each ``None`` has its\nfield named in ``unavailable`` with the reason it could not be read."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"PeriodValidationModel":{"properties":{"reporting_date":{"type":"string","title":"Reporting Date"},"period_label":{"type":"string","title":"Period Label"},"revenue":{"$ref":"#/components/schemas/WaterfallReconciliationModel"},"redemption":{"$ref":"#/components/schemas/WaterfallReconciliationModel"},"passed":{"type":"boolean","title":"Passed"}},"type":"object","required":["reporting_date","period_label","revenue","redemption","passed"],"title":"PeriodValidationModel","description":"One reporting period's revenue + redemption reconciliation."},"ReportGateResponse":{"properties":{"deal_id":{"type":"string","title":"Deal Id"},"deal_name":{"type":"string","title":"Deal Name"},"available":{"type":"boolean","title":"Available"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"reconciliation_passed":{"type":"boolean","title":"Reconciliation Passed","default":false},"periods_checked":{"type":"integer","title":"Periods Checked","default":0},"reconciled_field_count":{"type":"integer","title":"Reconciled Field Count","default":0},"confidence_threshold":{"type":"number","title":"Confidence Threshold","default":0.0},"review_item_count":{"type":"integer","title":"Review Item Count","default":0},"review_items":{"items":{"$ref":"#/components/schemas/ReportGateReviewItem"},"type":"array","title":"Review Items"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"}},"type":"object","required":["deal_id","deal_name","available"],"title":"ReportGateResponse","description":"Response body for ``GET /deal/{deal_id}/report-gate``.\n\nThe reconciliation-as-gate outcome (#272): the engine recomputed the deal's\npublished distributions and confirmed them to the cent, auto-trusting every\nfield it reconciled and routing ONLY the unreconciled + low-confidence fields\nto human review.\n\n``available`` is ``false`` for a registered deal with no offline gate inputs\n(committed report fixture + extracted model) — the UI then renders an honest\n\"no gate available\" state instead of an error. When ``true``,\n``reconciled_field_count`` is how many report\nfields the engine confirmed to the cent, ``reconciliation_passed`` whether the\nwhole reconciliation tied out, and ``review_items`` the residual fields a human\nmust still check (auto-trusted reconciled fields never appear here)."},"ReportGateReviewItem":{"properties":{"field_path":{"type":"string","title":"Field Path"},"confidence":{"type":"number","title":"Confidence"},"reason":{"type":"string","title":"Reason"}},"type":"object","required":["field_path","confidence","reason"],"title":"ReportGateReviewItem","description":"One report field routed to human review (mirrors ``reconciliation_gate.ReviewItem``).\n\nSurfaced only for fields the engine could NOT confirm AND whose extraction\nconfidence is below the threshold — the residue a human must still check after\nthe engine auto-trusted everything it reconciled to the cent."},"ReportVerificationLineItem":{"properties":{"line_item":{"type":"string","title":"Line Item"},"reported_value":{"type":"number","title":"Reported Value"},"computed_value":{"type":"number","title":"Computed Value"},"delta":{"type":"number","title":"Delta"},"delta_pct":{"type":"number","title":"Delta Pct"},"match":{"type":"boolean","title":"Match"},"tolerance_pct":{"type":"number","title":"Tolerance Pct"}},"type":"object","required":["line_item","reported_value","computed_value","delta","delta_pct","match","tolerance_pct"],"title":"ReportVerificationLineItem","description":"One reconciled line item (mirrors ``report_verifier.ReportedFigure``)."},"ReportVerificationResponse":{"properties":{"deal_id":{"type":"string","title":"Deal Id"},"reporting_period":{"type":"string","title":"Reporting Period"},"investor_report_url":{"type":"string","title":"Investor Report Url"},"status":{"type":"string","enum":["verified","not_verified","refused"],"title":"Status","default":"verified"},"reasons":{"items":{"type":"string"},"type":"array","title":"Reasons","default":[]},"figures_checked":{"type":"integer","title":"Figures Checked"},"figures_matched":{"type":"integer","title":"Figures Matched"},"figures_mismatched":{"type":"integer","title":"Figures Mismatched"},"line_items":{"items":{"$ref":"#/components/schemas/ReportVerificationLineItem"},"type":"array","title":"Line Items"},"overall_match":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Overall Match"},"summary":{"type":"string","title":"Summary"},"confidence":{"type":"number","title":"Confidence"},"citations":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Citations"}},"type":"object","required":["deal_id","reporting_period","investor_report_url","figures_checked","figures_matched","figures_mismatched","line_items","overall_match","summary","confidence","citations"],"title":"ReportVerificationResponse","description":"Response body for ``GET /deal/{deal_id}/report-verification``.\n\nThe per-line-item break report of the deal's investor report for a period\nagainst the engine-computed distributions of the reconstructed ledger."},"ReportedCell":{"properties":{"n":{"type":"integer","title":"N","description":"1-based position in the row: the cell is '<row id>#<n>'."},"raw":{"type":"string","title":"Raw","description":"The value exactly as printed."},"column":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Column"},"line":{"type":"integer","title":"Line","description":"Line on the row's page the value sits on."}},"type":"object","required":["n","raw","line"],"title":"ReportedCell"},"ReportedContent":{"properties":{"group":{"type":"string","title":"Group"},"item":{"type":"string","title":"Item"},"label":{"type":"string","title":"Label","description":"The printed row label."},"role":{"type":"string","title":"Role"},"value":{"type":"number","title":"Value","description":"The number as printed."},"raw":{"type":"string","title":"Raw","description":"The cell exactly as printed."},"pointer":{"type":"string","title":"Pointer","description":"The captured cell the value is read from."},"page":{"type":"integer","title":"Page"},"line":{"type":"integer","title":"Line"},"located_by":{"items":{"type":"string"},"type":"array","title":"Located By","description":"The header check that found the item's column."},"vouched_by":{"items":{"type":"string"},"type":"array","title":"Vouched By","description":"The checks that read the item's own cell and passed."}},"type":"object","required":["group","item","label","role","value","raw","pointer","page","line","located_by","vouched_by"],"title":"ReportedContent","description":"One mapped content item (#759) and the checks that vouch for it."},"ReportedContentRefusal":{"properties":{"group":{"type":"string","title":"Group"},"reason":{"type":"string","title":"Reason"}},"type":"object","required":["group","reason"],"title":"ReportedContentRefusal"},"ReportedItemsResponse":{"properties":{"deal_id":{"type":"string","title":"Deal Id"},"reports":{"items":{"$ref":"#/components/schemas/ReportedReport"},"type":"array","title":"Reports"}},"type":"object","required":["deal_id","reports"],"title":"ReportedItemsResponse"},"ReportedReport":{"properties":{"report":{"type":"string","title":"Report","description":"The committed fixture the report was read from."},"label":{"type":"string","title":"Label"},"status":{"type":"string","enum":["tied_out","read","refused","not_verified","unreadable"],"title":"Status"},"reasons":{"items":{"type":"string"},"type":"array","title":"Reasons"},"checked":{"type":"integer","title":"Checked","description":"Printed totals checked against their addends.","default":0},"unchecked":{"type":"integer","title":"Unchecked","description":"Printed totals nothing could check.","default":0},"unmapped_count":{"type":"integer","title":"Unmapped Count","default":0},"tables":{"items":{"$ref":"#/components/schemas/ReportedTable"},"type":"array","title":"Tables"},"content":{"items":{"$ref":"#/components/schemas/ReportedContent"},"type":"array","title":"Content"},"content_refused":{"items":{"$ref":"#/components/schemas/ReportedContentRefusal"},"type":"array","title":"Content Refused"}},"type":"object","required":["report","label","status"],"title":"ReportedReport"},"ReportedRow":{"properties":{"id":{"type":"string","title":"Id"},"label":{"type":"string","title":"Label"},"page":{"type":"integer","title":"Page","description":"Page every cell of the row is printed on."},"line":{"type":"integer","title":"Line"},"source":{"type":"string","title":"Source","description":"The printed line the row starts on."},"cells":{"items":{"$ref":"#/components/schemas/ReportedCell"},"type":"array","title":"Cells"}},"type":"object","required":["id","label","page","line","source","cells"],"title":"ReportedRow"},"ReportedTable":{"properties":{"id":{"type":"string","title":"Id"},"title":{"type":"string","title":"Title"},"page":{"type":"integer","title":"Page"},"check":{"type":"string","enum":["tied","broken","unchecked"],"title":"Check"},"rows":{"items":{"$ref":"#/components/schemas/ReportedRow"},"type":"array","title":"Rows"}},"type":"object","required":["id","title","page","check","rows"],"title":"ReportedTable"},"RwaCounts":{"properties":{"tranches":{"type":"integer","title":"Tranches"},"sec_erba_computed":{"type":"integer","title":"Sec Erba Computed"},"sec_sa_computed":{"type":"integer","title":"Sec Sa Computed"}},"type":"object","required":["tranches","sec_erba_computed","sec_sa_computed"],"title":"RwaCounts"},"RwaInput":{"properties":{"name":{"type":"string","title":"Name"},"value":{"title":"Value"},"source":{"type":"string","enum":["cited","bank_supplied","assumed","framework","derived"],"title":"Source"},"citations":{"items":{"$ref":"#/components/schemas/SourceCitation"},"type":"array","title":"Citations","default":[]},"framework_citation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Framework Citation"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","required":["name","source"],"title":"RwaInput"},"RwaResponse":{"properties":{"deal_id":{"type":"string","title":"Deal Id"},"deal_name":{"type":"string","title":"Deal Name"},"framework_id":{"type":"string","title":"Framework Id"},"as_of":{"type":"string","format":"date","title":"As Of"},"as_of_basis":{"type":"string","enum":["supplied","default_max_today_effective_from"],"title":"As Of Basis"},"bank_inputs":{"items":{"$ref":"#/components/schemas/BankInputStatus"},"type":"array","title":"Bank Inputs"},"counts":{"$ref":"#/components/schemas/RwaCounts"},"tranches":{"items":{"$ref":"#/components/schemas/TrancheRwa"},"type":"array","title":"Tranches"}},"type":"object","required":["deal_id","deal_name","framework_id","as_of","as_of_basis","bank_inputs","counts","tranches"],"title":"RwaResponse"},"RwaRiskWeight":{"properties":{"approach":{"type":"string","enum":["SEC-SA","SEC-ERBA"],"title":"Approach"},"class_key":{"type":"string","title":"Class Key"},"framework_id":{"type":"string","title":"Framework Id"},"as_of":{"type":"string","format":"date","title":"As Of"},"as_of_basis":{"type":"string","enum":["supplied","default_max_today_effective_from"],"title":"As Of Basis","default":"supplied"},"risk_weight":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Risk Weight"},"rwea":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rwea"},"inputs":{"items":{"$ref":"#/components/schemas/RwaInput"},"type":"array","title":"Inputs","default":[]},"labels":{"items":{"type":"string"},"type":"array","title":"Labels","default":[]},"missing":{"items":{"type":"string"},"type":"array","title":"Missing","default":[]},"refusal":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Refusal"},"status":{"type":"string","enum":["computed","refused"],"title":"Status"},"assumptions":{"items":{"type":"string"},"type":"array","title":"Assumptions","default":[]}},"type":"object","required":["approach","class_key","framework_id","as_of","status"],"title":"RwaRiskWeight","description":"A #835 risk weight whose inputs also carry the ``assumed`` label."},"SourceCitation":{"properties":{"document":{"type":"string","title":"Document"},"page_or_row":{"type":"integer","title":"Page Or Row"},"excerpt":{"type":"string","title":"Excerpt"},"section":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Section"}},"type":"object","required":["document","page_or_row","excerpt"],"title":"SourceCitation","description":"A :class:`~folio.primitives.base.Citation` tightened for the model.\n\n``document`` is a :attr:`DocumentRef.id`, ``page_or_row`` the 1-based pypdf\npage and ``excerpt`` verbatim after :func:`normalise_text`."},"StepReconciliationModel":{"properties":{"priority":{"type":"string","title":"Priority"},"recipient":{"type":"string","title":"Recipient"},"engine_amount":{"type":"number","title":"Engine Amount"},"report_amount":{"type":"number","title":"Report Amount"},"delta":{"type":"number","title":"Delta"},"source":{"type":"string","title":"Source"},"passed":{"type":"boolean","title":"Passed"}},"type":"object","required":["priority","recipient","engine_amount","report_amount","delta","source","passed"],"title":"StepReconciliationModel","description":"One reconciled priority step (mirrors ``StepReconciliation``).\n\n``source`` is the honesty label: ``\"engine\"`` (computed by the interpreter\nfrom the extracted model with no report input — the independent proof),\n``\"report-supplied\"`` (amount taken from the report; the engine only routes\nit), or ``\"residual\"`` (a terminal sweep of the remaining pot)."},"TrancheDistributionModel":{"properties":{"tranche":{"type":"string","title":"Tranche"},"interest_received":{"type":"number","title":"Interest Received"},"principal_received":{"type":"number","title":"Principal Received"},"total_received":{"type":"number","title":"Total Received"},"opening_balance":{"type":"number","title":"Opening Balance"},"closing_balance":{"type":"number","title":"Closing Balance"},"unattributed_interest_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unattributed Interest Reason"}},"type":"object","required":["tranche","interest_received","principal_received","total_received","opening_balance","closing_balance"],"title":"TrancheDistributionModel","description":"Per-class distribution summary (mirrors ``TrancheDistribution``).\n\n``tranche`` names a **class**, not a strip: a class sold in two — Cairn's\nClass B-1 floating and B-2 fixed — is one row whose balances are the sum of\nboth strips, because that is the unit the cascade pays and the prospectus\nreports.\n\n``unattributed_interest_reason`` is ``None`` on every row whose\n``interest_received`` is the cascade's own figure for that class. When it is\nset, ``interest_received`` is ``0.0`` because the amount could not be\nattributed — **not** because the class was paid nothing; see\n:data:`_UNATTRIBUTED_INTEREST_REASON`. A reader that renders the number must\nrender this beside it."},"TrancheRwa":{"properties":{"class_key":{"type":"string","title":"Class Key"},"sec_erba":{"$ref":"#/components/schemas/RwaRiskWeight"},"sec_sa":{"$ref":"#/components/schemas/RwaRiskWeight"}},"type":"object","required":["class_key","sec_erba","sec_sa"],"title":"TrancheRwa"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"ValidationResponse":{"properties":{"deal_id":{"type":"string","title":"Deal Id"},"deal_name":{"type":"string","title":"Deal Name"},"available":{"type":"boolean","title":"Available"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"passed":{"type":"boolean","title":"Passed","default":false},"periods_checked":{"type":"integer","title":"Periods Checked","default":0},"periods_passed":{"type":"integer","title":"Periods Passed","default":0},"tolerance_eur":{"type":"number","title":"Tolerance Eur","default":0.0},"source_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Note"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"periods":{"items":{"$ref":"#/components/schemas/PeriodValidationModel"},"type":"array","title":"Periods"}},"type":"object","required":["deal_id","deal_name","available"],"title":"ValidationResponse","description":"Response body for ``GET /deal/{deal_id}/validation``.\n\n``available`` is ``false`` for a registered deal that has no committed\nvalidation fixture — the UI then renders an honest \"no published proof\"\nstate instead of an error. When ``true``, the per-period reconciliation is\nthe V4 engine-validation report: each step compared to the deal's own\npublished Notes & Cash PoP, to the cent, with per-step ``source`` labels."},"WaterfallReconciliationModel":{"properties":{"waterfall_type":{"type":"string","title":"Waterfall Type"},"steps":{"items":{"$ref":"#/components/schemas/StepReconciliationModel"},"type":"array","title":"Steps"},"engine_total":{"type":"number","title":"Engine Total"},"report_total":{"type":"number","title":"Report Total"},"available_funds":{"type":"number","title":"Available Funds"},"unapplied_rounding":{"type":"number","title":"Unapplied Rounding"},"steps_passed":{"type":"integer","title":"Steps Passed"},"passed":{"type":"boolean","title":"Passed"}},"type":"object","required":["waterfall_type","steps","engine_total","report_total","available_funds","unapplied_rounding","steps_passed","passed"],"title":"WaterfallReconciliationModel","description":"One waterfall's per-step reconciliation (mirrors ``WaterfallReconciliation``)."},"WaterfallResponse":{"properties":{"deal_id":{"type":"string","title":"Deal Id"},"reporting_period":{"type":"string","title":"Reporting Period"},"available_revenue_funds":{"type":"number","title":"Available Revenue Funds"},"available_principal_funds":{"type":"number","title":"Available Principal Funds"},"revenue_waterfall":{"items":{"$ref":"#/components/schemas/WaterfallStepModel"},"type":"array","title":"Revenue Waterfall"},"tranche_distributions":{"items":{"$ref":"#/components/schemas/TrancheDistributionModel"},"type":"array","title":"Tranche Distributions"},"total_distributed":{"type":"number","title":"Total Distributed"},"shortfall":{"type":"number","title":"Shortfall"},"periods":{"items":{"type":"string"},"type":"array","title":"Periods"}},"type":"object","required":["deal_id","reporting_period","available_revenue_funds","available_principal_funds","revenue_waterfall","tranche_distributions","total_distributed","shortfall"],"title":"WaterfallResponse","description":"Response body for ``GET /deal/{deal_id}/waterfall``.\n\nCarries the Revenue Priority of Payments cascade and the per-class\ndistributions — one row per class the deal's own stack has — for the\nlatest reported period,\nplus the Available Revenue / Principal Funds the waterfall ran on."},"WaterfallStepModel":{"properties":{"priority":{"type":"string","title":"Priority"},"recipient":{"type":"string","title":"Recipient"},"amount_available":{"type":"number","title":"Amount Available"},"amount_distributed":{"type":"number","title":"Amount Distributed"},"shortfall":{"type":"number","title":"Shortfall"},"condition":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Condition"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"citation":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Citation"}},"type":"object","required":["priority","recipient","amount_available","amount_distributed","shortfall"],"title":"WaterfallStepModel","description":"One priority step in the revenue cascade (mirrors ``WaterfallStep``)."}}}}