Logic for populating count elements - OfficerDetail

In XMLGateway, below elements are being delivered :

  1. “NumCurrentAppt”
  2. “NumDissolvedAppt”
  3. “NumResignedAppt”

But in REST API same data are not available. We would like to populate values for these elements but need the logic that companies house uses to populate them.

Sample logic :

if(isCompanyActive && !isResigned) {
   currentAppointmentCount++;
}
if(isResigned) {
   resignedAppointmentCount++;
} else if(isCompanyDissolved) {
   disolvedAppointmentCount++;
}

Above logic does not cover cases where company status is like ”liquidation” as we don’t know under which count Companies House adds them.

I don’t think it’s properly documented in the resource, but the officerList API call returns

total_results, active_count and resigned_count

They’re towards end of the returned data. I’m not 100% sure about the logic, but I think that unresigned officers in dissolved companies are still regarded as “active” in the system. I’m not sure if there is a distinction between current/dissolved appointments other than being defined by the status of the company. If the company is in liquidation any unrsigned officers, should, in theory, still be active.

Again, I’m not certain about the second part of the answer!

@ash @mfairhurst

I think that unresigned officers in dissolved companies are still regarded as “active” in the system

So if the officer is resigned in dissolved company, then that appointment comes under dissolved appointments ?

Thanks