Quickstart

Quickstart: call the Credit Corp public API from PowerShell

Here is the idiomatic PowerShell 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

PowerShellFirst call
timeoutBound every request
data[]Unwrap the envelope

List products

$res = Invoke-RestMethod `
  -Uri 'https://api.credicorp.co.uk/public/v1/products' `
  -Headers @{ Accept = 'application/json' } `
  -TimeoutSec 10
$res.data | ForEach-Object { "$($_.name): up to $($_.max_amount)" }

Invoke-RestMethod parses JSON into objects automatically, so you can pipe straight into ForEach-Object. Use it for Windows automation and cross-platform PowerShell scripts.

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

Invoke-RestMethod or Invoke-WebRequest?

Invoke-RestMethod — it deserialises JSON into objects for you. Invoke-WebRequest returns the raw response, which you would then parse by hand.

How do I handle errors in PowerShell?

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.