Welcome. It is not clear what you are trying to do here. It sounds like:
- You have a valid API key / application (“I seem to have got it working by posting and adapting the example curl request into postman as a raw text import”)
- … but then you say “I have tried using postman or sending from extensions in Visual Studio code, but none work.”
Did you ever successfully manage to get a response with data from the Companies House server or not?
When you say “Is it possible for someone to set out in relatively simple terms the steps to send a REST request?” - REST just means this style of communication. So - if you’re accessing e.g. the Companies House Public Data API you are using a REST-style API however you make the requests, whether from curl, Postman, Visual studio code extensions etc.
As always I recommend starting with curl itself. This is because it’s installed on or available for most systems, it is very simple and doesn’t hide things from you and indeed you can turn on verbose mode to see extra information. That will at least allow you to ensure that:
a) You actually have a valid API key.
b) You’ve correctly understood that the API key actually goes in the “username” position when performing http basic authorization (a design choice by Companies House which apparently catches lots of people out).
c) You can see what data / http response code you get back.
You say you have looked at related questions on this forum. I’m pretty sure people have managed to use things like Postman successfully so it may just be a matter of working through all those posts again to find the bit you’re missing.
As for “simple instructions” - I’m sure all the necessary information is out there somewhere, not necessarily in a single document. I wonder if ChatGPT might even be able to help these days (I have not tried it personally but lots of people seem to be using it for technical queries)?
If after all that you are totally stuck then for others on this forum to be able to help you it might be useful to provide some extra information:
What endpoint in which API you are trying to access? Example: "I am trying to get the Company Profile resource via the Companies House public data API using the Company Profile endpoint.
As much detail as you can about what you’re actually sending to Companies House. If you’re having authorization issues then the key is what exactly you’re sending in the “Authorization” http header. Don’t post your actual API key though. You could even manually encode a “dummy” username and password (or in Companies House terms your API key plus the “:” character) to show the process you’re following.
an example of a URL you’re requesting e.g.
“I make a GET request to https://api.company-information.service.gov.uk/company/00445790”
both the http response code (e.g. 400, 401 etc.) AND any http body you receive e.g. like the JSON error you posted.