@d_e_golubev
The issues raised in the subsequent post are not issues with the service and/or data and is behaving as expected. The issue is relating to the company number and the endpoints being used.
If we take the first example SC48434, this is not a valid company number. Company numbers are currently 8 characters in length and if prefixed with 2 characters then, if referencing as a specific resource, must be upper case.
If you search for the company, as you are doing using the web site URL SC48434 - Find and update company information - GOV.UK
then the search algorithms match the company number provided to the most appropriate match, in this case, company number SC048434 (NB the additional 0 after the SC).
Therefore when you call the https://api.companieshouse.gov.uk/company endpoint with company number SC48434 the company doesn’t exist and so you receive the error. If you call https://api.companieshouse.gov.uk/company/SC048434 then this will return the company in question.
With the other examples as you have indicated the sc needs to be upper case to return the data.
It maybe more appropriate to use the search endpoint to search for the company number and then use the “self” link to navigate to the company profile. The search is documented
https://developer.companieshouse.gov.uk/api/docs/search/companies/companysearch.html
For example if you call (with appropriate credentials):
https://api.companieshouse.gov.uk/search/companies?q=SC48434
this returns:
{
“page_number”: 1,
“kind”: “search#companies”,
“items_per_page”: 20,
“items”: [
{
“kind”: “searchresults#company”,
“address_snippet”: “45 Auchenkeld Avenue, Heathhall, Dumfries, DG1 3QY”,
“date_of_creation”: “1971-02-19”,
“description”: “SC048434 - Incorporated on 19 February 1971”,
“address”: {
“address_line_2”: “Heathhall”,
“postal_code”: “DG1 3QY”,
“address_line_1”: “Auchenkeld Avenue”,
“premises”: "45 ",
“locality”: “Dumfries”
},
“description_identifier”: [
“incorporated-on”
],
“company_type”: “ltd”,
“title”: “W.L.& W. PEACOCK (TRUCK SERVICES) LIMITED”,
“company_number”: “SC048434”,
“links”: {
“self”: “/company/SC048434”
},
“company_status”: “active”
}
],
“total_results”: 1,
“start_index”: 0
}
You can then follow the self link to return the profile data.
Hope this helps
Thanks
@mfairhurst