Appointments id rarely included in officersStream resource

I am consuming the Officers streaming API and have noticed that despite ‘links.officer.appointments’ not being listed as an optional field in the documentation, this field is very rarely present in the messages published to the stream. Is there a reason for this? I am currently working on a project which requires me to have the appointments id for each officer that I process so this field being excluded in the stream poses a big problem for me. Can anyone shed any light on this?

Example messages:

{“resource_kind”:“company-officers”,“resource_uri”:"/company/08314130/appointments/6pa-Y4neUHkESSGTC20iBKDXg9I",“resource_id”:“6pa-Y4neUHkESSGTC20iBKDXg9I”,“data”:{“address”:{“address_line_1”:“Verulam Road”,“locality”:“Stafford”,“postal_code”:“ST16 3EA”,“premises”:“Common Road Industrial Estate”},“appointed_on”:“2017-05-31”,“country_of_residence”:“England”,“date_of_birth”:{“month”:6,“year”:1971},“links”:{“self”:"/company/08314130/appointments/6pa-Y4neUHkESSGTC20iBKDXg9I"},“name”:“GATES, Roberta Susan”,“nationality”:“British”,“occupation”:“Company Director”,“officer_role”:“director”},“event”:{“timepoint”:10723763,“published_at”:“2023-07-12T12:41:04”,“type”:“changed”}}

{“resource_kind”:“company-officers”,“resource_uri”:"/company/14998459/appointments/csSNM3Hew8uPaAeapFjvIcMwsYA",“resource_id”:“csSNM3Hew8uPaAeapFjvIcMwsYA”,“data”:{“address”:{“address_line_1”:“Main Street”,“address_line_2”:“Burley In Wharfedale”,“country”:“England”,“locality”:“Ilkley”,“postal_code”:“LS29 7JN”,“premises”:“113”},“appointed_on”:“2023-07-12”,“country_of_residence”:“United Kingdom”,“date_of_birth”:{“month”:5,“year”:1981},“links”:{“self”:"/company/14998459/appointments/csSNM3Hew8uPaAeapFjvIcMwsYA"},“name”:“VARGHESE, Elizabeth Anila, Dr”,“nationality”:“British”,“occupation”:“Doctor”,“officer_role”:“director”},“event”:{“timepoint”:10723774,“published_at”:“2023-07-12T12:41:22”,“type”:“changed”}}

{“resource_kind”:“company-officers”,“resource_uri”:"/company/14998478/appointments/wNTRxqpd0WA1tuUQ6vV56_FmAk4",“resource_id”:“wNTRxqpd0WA1tuUQ6vV56_FmAk4”,“data”:{“address”:{“address_line_1”:“Burnham Road”,“country”:“England”,“locality”:“Dagenham”,“postal_code”:“RM9 4RB”,“premises”:“7”},“appointed_on”:“2023-07-12”,“country_of_residence”:“England”,“date_of_birth”:{“month”:3,“year”:1982},“links”:{“self”:"/company/14998478/appointments/wNTRxqpd0WA1tuUQ6vV56_FmAk4"},“name”:“RAYMOND, Timiebi”,“nationality”:“British”,“occupation”:“Nurse”,“officer_role”:“director”},“event”:{“timepoint”:10723882,“published_at”:“2023-07-12T12:45:39”,“type”:“changed”}}

{“resource_kind”:“company-officers”,“resource_uri”:"/company/14998472/appointments/QlxdkULgm8csIBwWNTEYLwxtE7A",“resource_id”:“QlxdkULgm8csIBwWNTEYLwxtE7A”,“data”:{“address”:{“address_line_1”:“Ackroyd Street”,“address_line_2”:“Morley”,“country”:“United Kingdom”,“locality”:“Leeds”,“postal_code”:“LS27 8PZ”,“premises”:“Treat Your Feet”},“appointed_on”:“2023-07-12”,“country_of_residence”:“England”,“date_of_birth”:{“month”:10,“year”:1991},“links”:{“self”:"/company/14998472/appointments/QlxdkULgm8csIBwWNTEYLwxtE7A"},“name”:“HIGGINS, Daniel”,“nationality”:“English”,“occupation”:“Director”,“officer_role”:“director”},“event”:{“timepoint”:10723883,“published_at”:“2023-07-12T12:45:54”,“type”:“changed”}}

{“resource_kind”:“company-officers”,“resource_uri”:"/company/10660712/appointments/HfL3UPJwhwwOItBVIQQlqayMnmQ",“resource_id”:“HfL3UPJwhwwOItBVIQQlqayMnmQ”,“data”:{“address”:{“address_line_1”:“24 King William Street”,“country”:“United Kingdom”,“locality”:“London”,“postal_code”:“EC4R 9AT”,“premises”:“7th & 8th Floors”},“appointed_on”:“2017-03-09”,“country_of_residence”:“United Kingdom”,“date_of_birth”:{“month”:3,“year”:1979},“links”:{“self”:"/company/10660712/appointments/HfL3UPJwhwwOItBVIQQlqayMnmQ"},“name”:“BRISCOE, Neil Andrew”,“nationality”:“British”,“occupation”:“Director”,“officer_role”:“director”},“event”:{“timepoint”:10723909,“published_at”:“2023-07-12T12:46:08”,“type”:“changed”}}

{“resource_kind”:“company-officers”,“resource_uri”:"/company/14998480/appointments/jvHzuYqiUw0wrJMRZRPCb1BO9OI",“resource_id”:“jvHzuYqiUw0wrJMRZRPCb1BO9OI”,“data”:{“address”:{“address_line_1”:“St. Omer Road”,“country”:“England”,“locality”:“Guildford”,“postal_code”:“GU1 2DB”,“premises”:“20”},“appointed_on”:“2023-07-12”,“country_of_residence”:“England”,“date_of_birth”:{“month”:7,“year”:1995},“links”:{“self”:"/company/14998480/appointments/jvHzuYqiUw0wrJMRZRPCb1BO9OI"},“name”:“GILROY, Oscar Edward”,“nationality”:“British”,“occupation”:“Civil Servant”,“officer_role”:“director”},“event”:{“timepoint”:10723912,“published_at”:“2023-07-12T12:46:35”,“type”:“changed”}}

{“resource_kind”:“company-officers”,“resource_uri”:"/company/08130508/appointments/-xJqeL5Pwymzb4o-GbFkgl7Zh_U",“resource_id”:"-xJqeL5Pwymzb4o-GbFkgl7Zh_U",“data”:{“address”:{“address_line_1”:“Fifth Cross Road”,“locality”:“Twickenham”,“postal_code”:“TW2 5LH”,“premises”:“Waldegrave School”},“appointed_on”:“2020-01-20”,“country_of_residence”:“England”,“date_of_birth”:{“month”:11,“year”:1966},“links”:{“self”:"/company/08130508/appointments/-xJqeL5Pwymzb4o-GbFkgl7Zh_U"},“name”:“DAVIS, Caroline Anne”,“nationality”:“British,American”,“occupation”:“N/A”,“officer_role”:“director”},“event”:{“timepoint”:10723923,“published_at”:“2023-07-12T12:47:04”,“type”:“changed”}}

{“resource_kind”:“company-officers”,“resource_uri”:"/company/14998481/appointments/GKAPiAfsd_uRKHGjPBxuIR7C0ZE",“resource_id”:“GKAPiAfsd_uRKHGjPBxuIR7C0ZE”,“data”:{“address”:{“address_line_1”:“Leicester Road”,“country”:“United Kingdom”,“locality”:“Oadby”,“postal_code”:“LE2 5BD”,“premises”:“11a”,“region”:“Leicester”},“appointed_on”:“2023-07-12”,“country_of_residence”:“United Kingdom”,“date_of_birth”:{“month”:1,“year”:1988},“links”:{“self”:"/company/14998481/appointments/GKAPiAfsd_uRKHGjPBxuIR7C0ZE"},“name”:“TAYUB, Sahnieya”,“nationality”:“British”,“occupation”:“Pharmacist”,“officer_role”:“director”},“event”:{“timepoint”:10723929,“published_at”:“2023-07-12T12:47:07”,“type”:“changed”}}

{“resource_kind”:“company-officers”,“resource_uri”:"/company/14998507/appointments/A1YXd13hzKkA7KimSNl2irm0Cos",“resource_id”:“A1YXd13hzKkA7KimSNl2irm0Cos”,“data”:{“address”:{“address_line_1”:“Nethercroft Road”,“address_line_2”:“Timperley”,“country”:“England”,“locality”:“Altrincham”,“postal_code”:“WA15 7HR”,“premises”:“20”},“appointed_on”:“2023-07-12”,“country_of_residence”:“England”,“date_of_birth”:{“month”:1,“year”:1974},“links”:{“self”:"/company/14998507/appointments/A1YXd13hzKkA7KimSNl2irm0Cos"},“name”:“UDDIN, Saif”,“nationality”:“British”,“occupation”:“Director”,“officer_role”:“director”},“event”:{“timepoint”:10724060,“published_at”:“2023-07-12T12:54:58”,“type”:“changed”}}

I did a quick examination of the last 10,000 events on the officers stream (available from Sample events from Companies House Streaming API) and found a pattern of when this link is included.
When event.type = changed, it is not included. When event.type = deleted, it is included.
All the examples you gave are of changed events, see these three examples of deleted events:

[
  `{"resource_kind":"company-officers","resource_uri":"/company/14490381/appointments/hOZQagA9kgXTets4MuZJ8YajhbU","resource_id":"hOZQagA9kgXTets4MuZJ8YajhbU","data":{"address":{"address_line_1":"Vul. Turgenievs'Ka 52-58","address_line_2":"Ap. 17","country":"Ukraine","locality":"Kyiv","postal_code":"04053","premises":"Residential"},"appointed_on":"2022-11-17","country_of_residence":"Ukraine","date_of_birth":{"month":2,"year":1961},"etag":"5052f05555b2a4dc81ccb022d16168f848e64ab1","links":{"officer":{"appointments":"/officers/QFtLN7RUviWLRgfM4H5S4knevn4/appointments"},"self":"/company/14490381/appointments/hOZQagA9kgXTets4MuZJ8YajhbU"},"name":"SMITYUKH, Grigoriy, Mr.","nationality":"Ukrainian","occupation":"Commercial Director","officer_role":"director"},"event":{"timepoint":10933958,"published_at":"2023-07-28T15:12:03","type":"deleted"}}`,
  '{"resource_kind":"company-officers","resource_uri":"/company/14830789/appointments/wCDHwq0-g36IPc6V6FpbATH2ZDU","resource_id":"wCDHwq0-g36IPc6V6FpbATH2ZDU","data":{"address":{"address_line_1":"135 Charles Street","country":"England","locality":"Leicester","postal_code":"LE1 1GS","premises":"Flat 18 Charlesworth House"},"appointed_on":"2023-04-27","country_of_residence":"England","date_of_birth":{"month":6,"year":1956},"etag":"aa86d0361bdebd6368f6b1967285be04447748b4","links":{"officer":{"appointments":"/officers/O7618AguSX7MM10JiLcQu-7-Qk4/appointments"},"self":"/company/14830789/appointments/wCDHwq0-g36IPc6V6FpbATH2ZDU"},"name":"WESTON, Lorraine","nationality":"British","occupation":"General Manager","officer_role":"director"},"event":{"timepoint":10929324,"published_at":"2023-07-28T11:58:05","type":"deleted"}}',
  '{"resource_kind":"company-officers","resource_uri":"/company/14646104/appointments/Cbo5VDypG-vF-On-2fp5rNg0fLI","resource_id":"Cbo5VDypG-vF-On-2fp5rNg0fLI","data":{"address":{"address_line_1":"Bramhall Lane","country":"England","locality":"Stockport","postal_code":"SK2 6JA","premises":"193a"},"appointed_on":"2023-02-07","country_of_residence":"England","date_of_birth":{"month":4,"year":1981},"etag":"90c403d13a170163a22b539c68c48db60d0b72b5","links":{"officer":{"appointments":"/officers/pO1FGTJggK80nKydjr_VxsATOtk/appointments"},"self":"/company/14646104/appointments/Cbo5VDypG-vF-On-2fp5rNg0fLI"},"name":"DEANS, Amanda","nationality":"British","occupation":"Managing Director","officer_role":"director"},"event":{"timepoint":10929123,"published_at":"2023-07-28T11:50:09","type":"deleted"}}'
]

They all contain the data.links.officer.appointments field.

I’m not sure if this is intentional behaviour and if its always been this way?

1 Like

Thanks for the response @ebrian101

I feel like it doesn’t make sense for only messages relating to deletion events to contain the data.links.officer.appointments field because then we are never being provided with the appointments id for new officers… I conducted a short experiment of my own to investigate whether an appointments id exists for newly appointed officers by checking the companies house website and navigating to the appointments page for new officers via the page of the company they were appointed at. I found that this appointments id does, in fact, exist for new officers, even if this new appointment is their first. I’m really unsure as to why this field is not being included in messages where event.type = deleted

Have you checked the rest API for those officers to see if the links.officer.appointments is returned on the REST endpoints?

@ebrian101 yes, I’ve just checked the REST API for a newly created officer and the links.officer.appointments fiel is returned on the REST endpoints - this could work as a fallback option for retrieving the appointments id, however, it seems wrong to have to query the REST API every time a message is published to the stream

@MArkWilliams is there any chance you might be able to shed some light on this?

I have forwarded on your query.

Yes, we are aware of this issue and are working on a fix. I do not have a timeline for this.

Hi, we’ve noticed that this issue seems to be resolved now, thank you for your help!