Quickstart

Quickstart: call the Credit Corp public API from shell + jq

Here is the idiomatic shell + jq way to make your first Credit Corp public API call. List the live products from GET /public/v1/products, set a timeout, and turn the documented error envelope into an error you can handle — the pattern every other public-ring call reuses.

2 min read

shell + jqFirst call
timeoutBound every request
data[]Unwrap the envelope

List products

curl -s https://api.credicorp.co.uk/public/v1/products \
  -H 'Accept: application/json' \
| jq -r '.data[] | "\(.name): up to \(.max_amount)"'

For scripts and CI, pipe curl into jq to extract exactly the fields you need. Add --fail-with-body to curl so a non-2xx exits non-zero and surfaces the error envelope.

Use the sandbox in development

Point the base host at https://sandbox.credicorp.co.uk/public/v1 in development and CI, and at https://api.credicorp.co.uk/public/v1 in production, driven by one environment variable. See choosing a base URL.

Next steps

From here, request a quote, submit an enquiry, and send applicants to apply. Handle errors with the shared error envelope.

Frequently asked questions

How do I fail a script on an API error?

Use curl --fail-with-body so a 4xx/5xx returns a non-zero exit code while still printing the error envelope for jq to read.

How do I handle errors in shell + jq?

Check the status code and read the error object from the body — error.code is the stable machine string to branch on. The pattern is identical across every endpoint.

Funding for UK limited companies

Credit Corp lends to your company, not to you personally — short-term working capital with no personal guarantee. See what your business could access.