2 min read
Fetch and cache by key
def get_copy(key):
cached = cache.get(f'cms:{key}')
resp = requests.get(f'{BASE}/cms/pages/{key}', timeout=10).json()
if not cached or cached['updated_at'] != resp['updated_at']:
cache.set(f'cms:{key}', resp)
return resp['body']
Why this matters for compliance
A representative example or risk warning that drifts out of date is a compliance problem. Pulling it by key means a change we make propagates to your page automatically, with an audit trail via updated_at.
Frequently asked questions
Which keys can I fetch?
The keys documented in the reference for public content items. An unknown key returns a 404.
How do I know when copy changed?
Compare the updated_at you have cached with the latest response. If it changed, the copy changed — refresh your cache.
Related reading

Quickstart: fetch published CMS content by key
GET /public/v1/cms/pages/{key} serves published Credicorp content by a stable key. Use it to pull canonical…
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: handle Credicorp API error responses
Every Credicorp API error uses the same envelope: { error: { type, code, message, request_id } }. Branch on…
Read →
Quickstart: read public pricing configuration
GET /public/v1/config/pricing exposes the representative pricing parameters behind the public quote. Use it…
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.