Discrepency in information recieved through api and from "https://www.insolvencydirect.bis.gov.uk/IESdatabase/viewdirectorsummary-new-sub.asp" for few companies

This is regarding Company Name “VECONSTRUCTION LIMITED” (Company Number = ‘07064445’ ). . While I am searching for this company in “https://www.insolvencydirect.bis.gov.uk/IESdatabase/viewdirectorsummary-new-sub.asp” , on clicking on “Click here to review”, I can see the date of birth = “5 / 11 / 1979”. While fetching the same from API, I am getting the date of birth as : {‘month’ 8, ‘year’ 1988}
Could you please look into this issue?
Following code I am using to get the data through API :

"
import json
import requests
import os
import pandas as pd

api_token = os.environ[‘COMPANIES_HOUSE_API_KEY’]
api_url_base = ‘https://api.companieshouse.gov.uk/

def get_officer_list(comp_number, number_of_results=2):
“”“Returns the list of officers for the specified company”""
query_url = ‘{}company/{}/officers’.format(api_url_base, comp_number)
parameters = {‘items_per_page’: number_of_results}
response = requests.get(query_url, params=parameters, auth=(api_token, ‘’))
if response.status_code == 200:
return json.loads(response.content.decode(‘utf-8’))
else:
return None

def get_natural_officer_disqualification(natural_officer_id):
“”“Returns the natural officer disqualification details using officer id”""
query_url = ‘{}disqualified-officers/corporate/{}’.format(api_url_base,natural_officer_id)
response = requests.get(query_url, auth=(api_token, ‘’))
if response.status_code == 200:
return json.loads(response.content.decode(‘utf-8’))
else:
return None

def get_corporate_officer_disqualification(corporate_officer_id):
“”“Returns the corporate officer disqualification details using officer id”""
query_url = ‘{}disqualified-officers/corporate/{}’.format(api_url_base,corporate_officer_id)
response = requests.get(query_url, auth=(api_token, ‘’))
if response.status_code == 200:
return json.loads(response.content.decode(‘utf-8’))
else:
return None

company_number = [‘07064445’, ‘05922904’]
result_natural = []
result_corporate = []

for num in company_number:
officer_list = get_officer_list(num)
print(‘Officer List:’, officer_list) #
‘’‘Get the officer appointment URL for the first officer in the officer list’’’
if officer_list is None:
natural_officers_disqualifications = None
corporate_officers_disqualifications1 = None
else:
try:
officer_appointment_url = officer_list[‘items’][0][‘links’][‘officer’][‘appointments’]
print(officer_appointment_url)
officer_id = officer_appointment_url.split(’/’)[2]
‘’‘Use appointment URL to get the officer appointment list.The number of results restricted to
2 which is customisable’’’
print(“officer id is” + officer_id)
natural_officers_disqualifications = get_natural_officer_disqualification(officer_id)
print(‘natural:’, natural_officers_disqualifications)
corporate_officers_disqualifications1 = get_corporate_officer_disqualification(officer_id)
print(‘corporate’, corporate_officers_disqualifications1)
except:
natural_officers_disqualifications = None
corporate_officers_disqualifications1 = None
print(num)
print(‘Officer appointment list:’, natural_officers_disqualifications)
result_natural.append(natural_officers_disqualifications)
result_corporate.append(corporate_officers_disqualifications1)"

For example for company number “07064445” the date of birth and address returned from API is different from what is there on “https://www.insolvencydirect.bis.gov.uk/IESdatabase/viewdirectorsummary-new-sub.asp” . Whereas for “05922904”, the date of birth and address returned from API is the same.

Could you please look into this issue ?

Also, is there any way to fetch the information under “Conduct” field in https://www.insolvencydirect.bis.gov.uk/IESdatabase/viewdisqualdetail.asp?courtnumber=09363251 through API call?

Thanks.

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’]

  1. 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.

  2. 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 https://www.insolvencydirect.bis.gov.uk/IESdatabase/viewdisqualdetail.asp?courtnumber=09363251 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.