Looking at Beta for company 07064445
It appears you’re confusing:
SEFOLLI, Gledis (08/1988)
with
SEFOLLI, Alex (11/1979)
SEFOLLI, Alex appears after SEFOLLI, Gledis. (Won’t make a difference to your code but he’s also marked as having resigned).
You might want to check the documentation for the Company Officers resource and also look at a few examples on CH Beta - I find this is informative.
I’ve no idea what language you’re coding in (and you didn’t say) and I’m not going to fix it but the problem seems to be at the line:
officer_appointment_url = officer_list[‘items’][0][‘links’][‘officer’][‘appointments’]
-
It looks like you’re only checking the first item in the list. Of course there can be any number of officers, depending on the company (3 here). The API lists this in the “total_results” field.
-
You may only get back a fraction of results at a time without using the “paging” mechanism. (My highest total was in the thousands, for a LP). You’ll need to check the “total_results” field (or count your items!) and check if it’s larger than “items_per_page”. If so you’ll need to iterate this call using the “start_index” parameter to set the position. This starts from 0 not 1 if I recall correctly.
Company 05922904 that you mentioned also has two officers but maybe the one you’re interested in appears first in the list?
Also, is there any way to fetch the information under “Conduct” field in Disqualified Director Details through API call?
Outside the scope of this forum I think, I’ve no idea but you should probably investigate / contact the Insolvency Service - that’s a different part of government to Companies House I believe.