When we are trying to get the details of officers for a company we get the following
Access to XMLHttpRequest at 'https://api.company-information.service.gov.uk/company/.../officers' from origin '...' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
The ‘companies’ request is returning as expected, but the ‘officers’ call is continually returning the above.
Have there been any changes to the API recently that would affect this? From what we can see there doesn’t appear to be any Access-Control-Allow-Origin response header on the ‘officers’ request.
We have also been having this issue from at least April 14th. Companies House have suggested that this may have been triggered by another Change they had implemented on the Officers API but we have not had any further update since.
@MArkWilliams is there any update on this issue as of yet please?
I’m also getting the following from the /company endpoint:
Access to XMLHttpRequest at 'https://api.companieshouse.gov.uk/company/07206291' from origin '...' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
I get this via javascript in-browser (Chrome and Firefox tested so far). The preflight request returns 403 Forbidden.
When I run the same via cURL however, it works as expected. e.g.
@MArkWilliams We are also experiencing the same issues, this is preventing us from using the API altogether as it cannot pull back any company information.
@MArkWilliams This issue has now broken my service entirely, first the /officers endpoint starting 4 months ago (!) and now /company. Can you please confirm when you will be releasing a fix?
Did you get this fixed, We are having exactly the same problem, work in Postman but not from website, and has been working for years up until 3 weeks ago.
I’m not seeing any help for Companies House team at all!
Confirming this is still an issue on our end as well, rendering our engineers incapable of using the API locally for months. @MArkWilliams can you share any ETA with us as to when we can expect this issue to be resolved?
@MArkWilliams Months go by and we hear nothing. Two months ago you said you had found the issue and were looking at a fix. Are you still working on implementing that fix? Please give us some information.
A fix has now gone in for this issue.
If you are making CORS requests you will need to ensure the api key that you are using has your site in the js_domains array.