Filing History available but no documents returned

I was trying to download latest financial documents for some companies using the API but unfortunately for some of them I received information: filing-history-available with the total count 0:

Examples:
995767
{‘items_per_page’: 25, ‘start_index’: 0, ‘filing_history_status’: ‘filing-history-available’, ‘total_count’: 0, ‘items’: []}
1300615
{‘items’: [], ‘start_index’: 0, ‘total_count’: 0, ‘filing_history_status’: ‘filing-history-available’, ‘items_per_page’: 25}
647407
{‘items’: [], ‘filing_history_status’: ‘filing-history-available’, ‘total_count’: 0, ‘start_index’: 0, ‘items_per_page’: 25}
1026167
{‘filing_history_status’: ‘filing-history-available’, ‘items’: [], ‘start_index’: 0, ‘total_count’: 0, ‘items_per_page’: 25}

I could find an information on the forum that it can happen for companies dissolved 6 years ago - but I believe it is not a case. Can you please help?

2 Likes

Does anyone know the solution to this? I am also searching CH for filing history on companies which have history. Here is example of a script I am running:

function myFunction() {

var apiKey = ‘MYNUMBER’;
var url = ‘https://api.companieshouse.gov.uk/company/5574861/filing-history’;
var options = {
headers: {
Authorization: 'Basic ’ + Utilities.base64Encode(apiKey + ‘:’)
}
};

var response = UrlFetchApp.fetch(url, options);
var data = JSON.parse(response.getContentText());
Logger.log(data);

// Process the filing history data
var filings = data.items.map(function(item) {
return {
date: item.date,
type: item.type,
description: item.description,
documentUrl: item.links.document
};
});
}

No matter what company number (that is a valid company number with filing history) I put in I return - {start_index=0.0, filing_history_status=filing-history-available, total_count=0.0, items=[], items_per_page=25.0}

I’m not sure on this, but my guess would be that you need to use the full 8 character company number. You can see a similar effect here:

https://find-and-update.company-information.service.gov.uk/company/5574861/filing-history

While some sectors usually strip the leading zeroes (you know who you are) CH almost always includes them. Likewise for any companies with a prefix, these need to be padded out to 8 charcters between the prefix and number, so SC1234 would become SC001234.

1 Like

@ash - you are a genius. 8 characters was the solution!!

Where do I send the :tropical_drink: ?

ash@hasworkedwithalotoflawyerswhoalwaysdroptheleadingzero.com should do it :wink: Glad I could help.

1 Like