Sorry, long response again. Summary (4 points!):
- From the original post:
I don’t know. All the rest of my waffle was saying “something seems to be inconsistent e.g. as per your 2nd post - no officer details returned and yet there’s PSC information - that’s strange”.
Answered, 1st reply.
No. As I’d asked about http errors and you’d not mentioned one, and also said you got an array “[ ]
” back, I was saying that that combination was one I hadn’t seen before!
Are you sure you’ve got the correct company numbers when you’re using the API (and e.g. the code isn’t clipping / scrambling them) and that they’re the same as you tried in CH Beta?
Reason: I can replicate most of what you describe with a bogus company number.
Also you’ve sown the seed of doubt with “I didn’t run the original …”!
That CH Beta says ‘no officers’ but shows PSCs (for anything) - that’s still odd. I don’t say it’s impossible…
Full detail:
Ah, the missing information (some of it):
Well 404 = “not found” and in most cases IIRC if you ask Companies House for something they don’t have you’ll get exactly that: http status 404 and an empty JSON object (*1).
As you say, CH response is consistent: e.g. they don’t advertise any officers in the links section and then give you a normal (for CH) “nothing to see here” response when you ask for the officers. ( *2)
I can get a 404 + { } - if I provide a non-existent company number e.g. /company/BG932839/officers"
For others where CH doesn’t hold the information I get the company list, but with nothing in it e.g.
“/company/SP0001WS/officers”:
Response:
{
“active_count” : 0, “kind” : “officer-list”, “start_index” : 0, “items”: , “total_results” : 0, “etag” : “”, “links” : {}, “items_per_page” : 35, “resigned_count” : 0
}
In the last part of that do you mean:
- “if I paste my company number into the CH Beta URL I get ‘this page cannot be found’ e.g. if I go to https://beta.companieshouse.gov.uk/company/BG038273/persons-with-significant-control” (I’ve used an example non-existent company number). That sounds normal and consistent with above.
- "if browse I go to CH Beta site, search for the company number, then click on ‘People’, then ‘Persons with significant control’ I get a 404 error / ‘this page cannot be found’ ". That would look like CH have a problem with their data for these companies (and their code)!
(Summary)
No need to message me, just post 'em up on the forum. An example is a thousand words at cross-purposes.
Digressions:
*1
This is general but not universal across CH API e.g.:
- If no such company exists when requesting company profile, you get an error 404 and an error object. E.g. “/company/BG932839”
- Filing history may give you http 200 success and a filing history object but a member within it stating there isn’t any. E.g. “/company/SP0001WS/filing-history”
*2
I wouldn’t treat something being missing from the links section as a guarantee it doesn’t exist. Sorry, can’t remember any examples offhand.