Hmm… I guess your code is slightly schematic as I’m surprised it worked at all as listed (although I’m not an expert on jQuery ajax function!). I think all you need in the settings object is:
var settings = { "async": true,
"crossDomain": true,
"url": "https://api.companieshouse.gov.uk/company/06715377",
"method": "GET",
"headers": {
"Authorization": "Basic " + btoa( "****my key*****" + ":" ),
},
}
That last part is showing that you’re using http “basic” authentication with a base-64 encoded username:password string (e.g. empty password as CH only supply username) as per:
( atob() function documented at Base64 - MDN Web Docs Glossary: Definitions of Web-related terms | MDN)
Chris