Companies house UK opens up #API as #Beta
https://itunes.apple.com/gb/app/company-check/id866565534?mt=8
Our Company Check App, version 1.8 for iOS just got a cool new feature (which is currently pending app store review), you can now click on a companies’ filings, and get PDF downloads for documents that they have filed with the Companies House in the UK. These include Annual returns, shareholder agreements, and so forth.
This was thanks to the Companies’ house opening up their document API as a beta. Which is a REST based JSON service. You need to register with them, provide some fixed IPs, and you get an authentication token back. This is passed bia basic authentication over HTTPS to their service.
I used c# to integrate with them, using the following code:
Response.ContentType = strMime;
var wc = new WebClient();
const string un = “**Token goes here***”;
var credentials = Convert.ToBase64String(Encoding.ASCII.GetBytes(un + “:”));
wc.Headers[HttpRequestHeader.Authorization] = “Basic ” + credentials;
var bData = wc.DownloadData(strUrl);
Response.BinaryWrite(bData);
When the mime type is set to application/pdf, then the page will display a PDF, relayed from the Companies House.