POSTMAN Setup

A Step-by-Step Guide to Setting Up Postman for Companies House Data Retrieval


If you’re a developer looking to harness the power of the Companies House API for streamlined access to business information, this step-by-step guide will walk you through the process of setting up Postman with basic authentication using your API key. By the end, you’ll be proficient in crafting API requests to search for company information effortlessly.

In this Tutorial, we will set up our POSTMAN using keys obtained from Companies House API portal and search for a company name.

Prerequisites:

  • Postman installed on your machine.

Step 1: Obtain Your Companies House API Key

First things first, you need to obtain your API key from the Companies House website. Head to their developer portal and create an account if you haven’t already. Once logged in, generate your API key.

Step 2: Set Up Postman Environment

  1. Open Postman and create a new environment.
  2. Add a variable named CompaniesHouseAPIKey and set its value to your API key.

Step 3: Create a New Request

  1. Create a new request in Postman.
  2. Set the request type to GET.
  3. Enter the Companies House API URL: https://api.company-information.service.gov.uk/search/companies.

Step 4: Add Basic Authentication

  1. Go to the Authorization tab.
  2. Choose Basic Auth as the type.
  3. In the Username field, enter CompaniesHouseAPIKey.
  4. Leave the Password field blank.

Step 5: Customize Your Search

In this step we are actually going to supply the text parameter – a sample company name against which we are going to search. This can be done in any of the following two ways:

  1. Through Parameters Tab
    • Go to the Params tab.
    • Add a key-value pair for your search, for example, q for the company name.
  2. Through Query String
    • simply add “q=sampleCompanyName” after the URL so that the GET URL now becomes: https://api.company-information.service.gov.uk/search/companies?q=sampleCompanyName

Step 6: Send the Request

Hit the “Send” button, and Postman will make the request to the Companies House API with the provided parameters.

Step 7: Review the Response

In the “Body” section of the response, you’ll find the data returned by the Companies House API based on your search query.

Congratulations! You’ve successfully set up Postman with basic authentication using your Companies House API key and retrieved company information. Feel free to explore additional API endpoints and parameters to further tailor your requests.

{Include screenshots at each step for visual guidance}

By following these steps, you’ll be well-equipped to integrate Companies House data seamlessly into your applications and projects. Happy coding!

Leave A Comment

Your email address will not be published. Required fields are marked *