Which companies are you looking up?
Companies with the “uk-establishments” endpoint are “foreign companies” - they have their own special company numbers e.g. they start with “FC”. In fact Companies House will have one “FC” and then a number of entries for the actual “UK establishment” starting with “BR”. The documentation shows what to expect back. Here’s an example I just requested via curl (I’ve cut some data for clarity):
curl -u OUR_API_KEY: "https://api.company-information.service.gov.uk/company/FC022268"
{
"registered_office_address" : { ... "country" : "United States" },
"company_number" : "FC022268",
"type" : "oversea-company",
"company_name" : "PRINCETON UNIVERSITY PRESS",
"links" : {
"uk_establishments" : "/company/FC022268/uk-establishments",
...
},
"foreign_company_details" : { ... },
"external_registration_number":"EIN 21-0634483",
....
}
Now look at the links.uk_establishments:
curl -u OUR_API_KEY: "https://api.company-information.service.gov.uk/company/FC022268/uk-establishments"
{
"items": [
{
"company_number" : "BR011501",
"company_name":"PRINCETON UNIVERSITY PRESS",
"company_status":"open",
"links": { "company" : "/company/BR011501" }
}
],
"kind":"related-companies",
...
}
As you can see it’s possible to have one or more (I think actually zero or more) “UK establishments”.
You can of course request the company profile of any of those:
curl -u OUR_API_KEY: "https://api.company-information.service.gov.uk/company/BR011501
So it may simply be that you don’t have any company numbers of the form FCnnnnnn that you’re calling this on!
If you are stuck try searching for some well-know international companies (banks, airlines and car firms are good ones) on https://find-and-update.company-information.service.gov.uk/
A couple of examples:
FC004087 - BR001160
FC003821 - BR011768
FC003748 - BR003028
Aside - I’m not sure why you’ve needed to wrap the response text in array brackets:
Set JSON = ParseJson("[" & http.responseText & "]")
… the server responds with JSON so unless VB is doing something odd or the ParseJson call is you shouldn’t need that. However I haven’t used these functions in VB myself.