From 20d968d78475274945b14b040582388018b55363 Mon Sep 17 00:00:00 2001 From: hmansour-codat Date: Wed, 5 Aug 2026 15:39:09 +0100 Subject: [PATCH 1/2] docs(lending): add CBS report retention policy to Supported Outputs Documents the two-layer retention behaviour for categorized bank statement reports: ~90-day window for all report types, plus count-based retention for CBS (only the latest report kept). Includes guidance to use the /latest endpoint and expected 404 behaviour on superseded reportIds. Authored by @hmansour-codat in #1848; recreated as an in-repo branch so CI secrets are available (fork PRs cannot access them). Refs: MED-814 Co-Authored-By: Claude Fable 5 --- docs/lending/features/excel-download-overview.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docs/lending/features/excel-download-overview.md b/docs/lending/features/excel-download-overview.md index fd71ef73e..2f8472c02 100644 --- a/docs/lending/features/excel-download-overview.md +++ b/docs/lending/features/excel-download-overview.md @@ -216,6 +216,21 @@ You can also generate and download a report in an Excel format via the [Portal]( You can also generate and download the **data export** report by clicking the **Export data** button on any of the Lending screens of the Portal. +#### Report retention + +Lending reports are subject to two layers of retention: + +- **Time-based:** all reports are retained for approximately 90 days from generation, after which they are automatically removed. +- **Count-based (categorized bank statements only):** only the most recent report is retained. When a new report is generated, the previous report is immediately deleted, even if it is still within the 90-day window. + +Because categorized bank statements are cumulative — each report contains all transactions from connected accounts to date — the latest report always includes all data from prior reports. We recommend fetching the most recent report using the [`/latest` endpoint](/lending-api#/operations/get-categorized-bank-statement) rather than storing and re-requesting a specific `reportId`. + +:::note 404 on older report IDs + +Requesting a superseded `reportId` via `GET /reports/{reportId}` returns a **404** response. This is expected — the report has been removed by the retention policy, not due to an error. Always use `/latest` to reliably retrieve the current report. + +::: + --- ## Read next From 66f377722eefb561c81df0c21ef1525c4dfa0005 Mon Sep 17 00:00:00 2001 From: pmckinney-codat Date: Wed, 5 Aug 2026 15:55:16 +0100 Subject: [PATCH 2/2] Fix dead Swagger UI links on Plaid environments page The old /swagger/ui/index[.html] URLs 404 and were failing the PR link check. The Swagger UI now lives at /swagger/index.html; anchors follow the generated operation-id pattern used elsewhere in the docs. Co-Authored-By: Claude Fable 5 --- .../banking/plaid/switching-between-plaid-environments.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/integrations/banking/plaid/switching-between-plaid-environments.md b/docs/integrations/banking/plaid/switching-between-plaid-environments.md index c4fa0c286..eae0307d4 100644 --- a/docs/integrations/banking/plaid/switching-between-plaid-environments.md +++ b/docs/integrations/banking/plaid/switching-between-plaid-environments.md @@ -42,7 +42,7 @@ The following example shows how to switch Codat to point to Plaid Development in Get your existing environment credentials. -1. Open the `GET /integrations/credentials/{platformKey}` endpoint. +1. Open the `GET /integrations/credentials/{platformKey}` endpoint. 2. Replace `{platformKey}` with `plaid` and send your request to return your current credentials. Save the JSON, you'll need it later. ```json @@ -60,7 +60,7 @@ Find the secret for Plaid's development environment. Update your environment credentials. -1. Open the +1. Open the `PUT /integrations/credentials/{platformKey}` endpoint. 2. Replace `{platformKey}` with `plaid` and send the following details: - The existing environment credentials you fetched earlier, replacing the original **clientSecret** with the secret for the development environment.