How to integrate Companies House into a decision engine - Decisimo
Published on: 2024-08-10 18:48:28
Companies House in the UK offers an API service that allows you to check the status of registered businesses. This information is particularly useful for assessing the creditworthiness of micro-businesses and SMEs when considering them for loans.
Get an account API key from Companies House
- You will need to head to Companies House and sing into your account or register.
https://find-and-update.company-information.service.gov.uk/ - Once you have your account, you will need to head to Developer Hub. In the Developer hub - Application overview, you need to create an application.
- After creating your special application, click on it and go for “Keys for this application”. There you need to hit Create new key, to get the API key. In the form, fill in Key name, Key description, select REST. Leave the fields for Restricted IPs and JavaScript empty.
- Make sure that the Key Type the key you have just created states “REST API Key”. Copy the API key and keep it for definition within decision engine.
Create a data source in Decisimo Portal
- Go into Data sources and hit new and create from template.
- In the definition of data source, switch HTTP Authentication to “YES” and fill in authentication details. Into “Authentication Username” paste the API Key obtained from Companies House. Leave HTTP Password empty.
- Companies House needs the company number as an input parameter. When you use the Companies House data source template, it will include the definition necessary.
Add Companies House data source to your decision flow
- If you already have a decision step for data sources, you can add the call to Companies House within the same step. The decision engine will call all the sources in the same step in parallel. Parallel calls ensure the fastest execution time.
- If you do not have a decision flow step for external data, add one. Connect your decision flow step and by double-clicking, open the definition window. Define in the step the attributes from your data object to be sent to Companies House API.
Run the decision making
- Release your decision flow, deploy to an endpoint and make decisions using data from Companies House.