2 min read
Generate the client
# TypeScript, using openapi-typescript
npx openapi-typescript \
https://dev.credicorp.co.uk/openapi.json \
--output src/credicorp.d.tsPoint your generator (openapi-typescript, openapi-generator, oapi-codegen for Go, and so on) at the published description to produce models and a client that match the API exactly.
Keep it fresh in CI
Regenerate on a schedule or on a contract-changed signal and fail the build if the generated output changes unexpectedly — that diff is your early warning that the API contract moved.
Frequently asked questions
Where is the OpenAPI description?
Published on the developer portal alongside the reference. Point your codegen tool at it to produce a typed client.
Hand-write or generate?
Generate once you consume several endpoints — it removes an entire class of drift bugs. Hand-writing is fine for one or two calls.
Related reading

Quickstart: Write a typed client in TypeScript
A handful of interfaces gives you end-to-end type safety over the public API — products, quotes and 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: use the Credicorp public API in Spring Boot
Here is the idiomatic way to call the Credicorp public API from Spring Boot. Fetch the product catalogue,…
Read →
Quickstart: list Credicorp business-finance products
GET /public/v1/products returns the live catalogue of Credicorp business-finance products. Each item carries…
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.