2 min read
Fetch behind a flag
Add the live catalogue fetch behind a feature flag so you can enable it for a fraction of traffic and watch for issues before a full cut-over.
Diff against your static table
const live = (await fetch(`${BASE}/products`).then(r => r.json())).data;
const drift = live.filter(l => static[l.id]?.max_amount !== l.max_amount);
if (drift.length) console.warn('price table was stale:', drift);The diff usually reveals your static table had drifted — which is exactly why you are moving to live data.
Keep the static copy as a fallback
Retain the old table as the fallback when the fetch fails, so a transient API issue never leaves the reader with no figures at all.
Frequently asked questions
Is it risky to go live?
Not if you flag it, diff against your existing values first, and keep the static table as a fallback. You cut over only once the live data checks out.
Why keep the static values?
As a fallback for transient failures. Live data is the source of truth, but a cached or static copy prevents an empty table during an outage.
Related reading

Quickstart: list Credicorp business-finance products
GET /public/v1/products returns the live catalogue of Credicorp business-finance products. Each item carries…
Read →
Quickstart: Cache the product catalogue correctly
The catalogue changes rarely, so caching it removes the API from your hot path and keeps you well under the…
Read →
Quickstart: Gate features on live API status
Read the status endpoint on a schedule and gate live-API features off the cached result, so an outage…
Read →
Quickstart: Build a product comparison table
Rendering a comparison table straight from GET /public/v1/products gives readers an always-current view of…
Read →Funding for UK limited companies
Credicorp lends to your company, not to you personally — short-term working capital with no personal guarantee. See what your business could access.