Tracking appointments between two dates and finding the officer id

Hi Community!

I would like keep check on any customers that appoint new PSCs or where PSC is no longer valid.

I’ve tried the following api, passing the registration number to return a list of officers…
GET https://api.company-information.service.gov.uk/company/{company_number}/officers

But the returned list of officers does not appear to contain the PSC_ID

There is a “person_number” but this number appears to be unique to the appointment and not unique to the officer.

And therefore I cannot use this value in the following api

GET https://api.company-information.service.gov.uk/company/{company_number}/persons-with-significant-control/individual/{psc_id}

Does anyone know if the CH api can be used to get PSC changes for passed registration numbers or if there is another way (without using a different paid-for service)

Thanks in advance!

Short: the PSC dataset and the Officers datasets are (as far as I know) completely independent - with no links between. No relationship (that we punters can find out) between an Officer ID and a PSC ID. (Again as far as I know this is because Companies House - by law - just record what people submit to them, and the forms don’t have an explicit link between officers and PSCs).

You can list all PSCs for a given company using the PSC list / PSC statements lists. (Note that even these sometimes - albeit rarely - have multiple entries for “the same” individual / entity - search this forum for info on that.)

It sounds like you might be better using the PSC feed from the Streaming API if you’re tracking changes. Depending on how many you want to follow you might populate your initial data by getting the PSC bulk data dump, then use the streaming API to keep that up-to-date.

The main (Public Data) API basically mirrors the flow of the Companies House search website.

1 Like

Thanks for the response. I will look at the daily dump and work from that. Thanks for pointing out the hurdles too.

In the Streaming API i can’t see how to retrieve data that has changed. I don’t have a ‘timepoint’ to enter. If I run the call without a timepoint, I eventually just see a 504 gateway timeout.

I’ve started without any historic data (ie not imported the data dump) because ultimately I’m only interested in changes to PSCs going forward. I would like to enter a date range (e.g. all changes to PSCs between the last KYC check date (e.g. 1.1.24) and today.

And within the result set hopefully the company registration is available for each PSC so that I can then lookup the company (customer) and keep a record of important PSC changes.

Does nyone have any thoughts on the best approach here?

I can lookup by company registration number however with over 5000 customers, running this type of query is consuming a lot of calls for it to only return one or two results.

Thanks!

I don’t use the Streaming API but I would recommend the following unofficial guide:

https://chguide.co.uk/streams/

The same user has a live demo of a “stream monitor” (with source code) here:

https://companies.stream/

There are also many posts on how to get started / timepoints eg.:

Good luck.

Hi simon3

As voracitymail commented, the PSC dataset and Officers datasets are completely independent.
However, it is relatively easy to fetch PSC changes (PSC name, appointment date, temination date, company number etc) realtime from the Companies House API. One way to do this is to:

  1. Fetch the data using the streaming API “https://stream.companieshouse.gov.uk/filings
  2. Store the data in the database. This should include::
    date, category, description, type, timepoint, URI, datestamp, published_at, PSC_name, appointment_date, and termination_date
  3. Extract the company number from the URI using a regular expression or similar method and use it to fetch the company name if necessary
  4. Display and manipulate the data as desired.

I estimate that the whole process should take less than 5 minutes.

Good luck!