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)
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.
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.
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:
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
Extract the company number from the URI using a regular expression or similar method and use it to fetch the company name if necessary
Display and manipulate the data as desired.
I estimate that the whole process should take less than 5 minutes.