Welcome - in this case the first company - 12334486 - has no PSC statements. The second one - 12173467 - has statements. I have linked to the online Companies House site so you can see that.
So if you request the URL ending persons-with-significant-control-statements
(the Statements Endpoint) as the documentation says you get a http 404 response code (not found) and no data (http response body).
If you want to find out whether there are statements or not you can either call this endpoint and trap any errors OR if you examine the Company profile - e.g. request:
https://api.companieshouse.gov.uk/company/12334486
… and examine the links
member of the response (a CompanyProfile resource) for a persons_with_significant_control_statements
member there. If there are PSCs you should find a persons_with_significant_control member
in links
.
Note you can have both statement(s) and a list of PSCs in some cases. Here is an “Overseas Entity” example (linked to the online site):
https://api.companieshouse.gov.uk/company/OE001282/persons-with-significant-control
Here’s the company profile resource from your second example - I have formatted it and removed some of the fields for clarity (indicated with a “…”)
{
"company_number": "12334486",
"links": {
"self": "/company/12334486",
"filing_history": "/company/12334486/filing-history",
"persons_with_significant_control": "/company/12334486/persons-with-significant-control",
"officers": "/company/12334486/officers"
},
...
}
Hope this helps.