Quickstart

Quickstart: read live API status programmatically

GET /public/v1/status gives your integration a machine-readable view of API health. Read it to gracefully degrade a non-critical feature when a component is impaired — for example hiding a live quote widget during a partial outage rather than showing the reader an error.

2 min read

GET/public/v1/status
componentsPer-component health
degradeGate features gracefully

Read the status

curl -s https://api.credicorp.co.uk/public/v1/status -H 'Accept: application/json'

The response summarises overall health and lists component states. Branch on the overall indicator to decide whether to show a live-API feature or fall back to cached data.

Degrade, don't fail

const { status } = await (await fetch(`${BASE}/status`)).json();
if (status !== 'operational') {
  showCachedProducts();   // fall back, don't error
} else {
  showLiveQuoteWidget();
}

Read the component breakdown

Beyond the overall indicator, the response lists individual components so you can gate precisely. If only the quote component is degraded, keep the product catalogue live and hide just the live-quote widget, rather than blanking the whole page:

const { status, components } = await (await fetch(`${BASE}/status`)).json();
const quoteOk = (components ?? []).find(c => c.name === 'quote')?.status === 'operational';
if (!quoteOk) hideLiveQuote();

Don't rebuild the status page

Use this endpoint to make your own integration resilient, not to reconstruct a public dashboard. For incident history and human-readable updates, link users to the official status page, which is the source of truth for outages and maintenance windows. Poll on a modest schedule, cache the result, and gate features off the cached value so a status check never sits in your request hot path.

Frequently asked questions

How is this different from healthz?

healthz is a bare liveness probe (200 or not). status is a richer, per-component summary intended for feature gating and dashboards.

Should I poll it on every request?

No. Poll it on a modest schedule and cache the result; gate features off the cached value to avoid adding a dependency to your hot path.

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.