# Appointments id rarely included in officersStream resource

**URL:** <http://forum.companieshouse.gov.uk/t/appointments-id-rarely-included-in-officersstream-resource/6622>\
**Category:** API Question\
**Created:** [July 27, 2023, 2:11pm UTC](http://forum.companieshouse.gov.uk/t/appointments-id-rarely-included-in-officersstream-resource/6622 "2023-07-27T14:11:07Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![tyreseba](http://forum.companieshouse.gov.uk/letter_avatar_proxy/v4/letter/t/f08c70/32.png) [@tyreseba](http://forum.companieshouse.gov.uk/u/tyreseba)\
**Post date:** [July 27, 2023, 2:11pm UTC](http://forum.companieshouse.gov.uk/t/appointments-id-rarely-included-in-officersstream-resource/6622/1 "2023-07-27T14:11:07Z")

</div>

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”}}

---

<div class="post-metadata">

**Author:** ![ebrian101](http://forum.companieshouse.gov.uk/user_avatar/forum.companieshouse.gov.uk/ebrian101/32/1145_2.png) [@ebrian101](http://forum.companieshouse.gov.uk/u/ebrian101)\
**Post date:** [July 29, 2023, 1:46pm UTC](http://forum.companieshouse.gov.uk/t/appointments-id-rarely-included-in-officersstream-resource/6622/2 "2023-07-29T13:46:05Z")

</div>

I did a quick examination of the last 10,000 events on the officers stream (available from [Sample events from Companies House Streaming API](https://companies.stream/samples)) 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:

```auto
[
  `{"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?

---

<div class="post-metadata">

**Author:** ![tyreseba](http://forum.companieshouse.gov.uk/letter_avatar_proxy/v4/letter/t/f08c70/32.png) [@tyreseba](http://forum.companieshouse.gov.uk/u/tyreseba)\
**Post date:** [August 2, 2023, 8:58am UTC](http://forum.companieshouse.gov.uk/t/appointments-id-rarely-included-in-officersstream-resource/6622/3 "2023-08-02T08:58:03Z")

</div>

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`

---

<div class="post-metadata">

**Author:** ![ebrian101](http://forum.companieshouse.gov.uk/user_avatar/forum.companieshouse.gov.uk/ebrian101/32/1145_2.png) [@ebrian101](http://forum.companieshouse.gov.uk/u/ebrian101)\
**Post date:** [August 2, 2023, 10:20am UTC](http://forum.companieshouse.gov.uk/t/appointments-id-rarely-included-in-officersstream-resource/6622/4 "2023-08-02T10:20:55Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![tyreseba](http://forum.companieshouse.gov.uk/letter_avatar_proxy/v4/letter/t/f08c70/32.png) [@tyreseba](http://forum.companieshouse.gov.uk/u/tyreseba)\
**Post date:** [August 2, 2023, 12:59pm UTC](http://forum.companieshouse.gov.uk/t/appointments-id-rarely-included-in-officersstream-resource/6622/5 "2023-08-02T12:59:00Z")

</div>

@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

---

<div class="post-metadata">

**Author:** ![tyreseba](http://forum.companieshouse.gov.uk/letter_avatar_proxy/v4/letter/t/f08c70/32.png) [@tyreseba](http://forum.companieshouse.gov.uk/u/tyreseba)\
**Post date:** [August 2, 2023, 1:00pm UTC](http://forum.companieshouse.gov.uk/t/appointments-id-rarely-included-in-officersstream-resource/6622/6 "2023-08-02T13:00:01Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![MArkWilliams](http://forum.companieshouse.gov.uk/user_avatar/forum.companieshouse.gov.uk/markwilliams/32/194_2.png) [@MArkWilliams](http://forum.companieshouse.gov.uk/u/MArkWilliams)\
**Post date:** [August 8, 2023, 3:49pm UTC](http://forum.companieshouse.gov.uk/t/appointments-id-rarely-included-in-officersstream-resource/6622/7 "2023-08-08T15:49:42Z")

</div>

I have forwarded on your query.

---

<div class="post-metadata">

**Author:** ![MArkWilliams](http://forum.companieshouse.gov.uk/user_avatar/forum.companieshouse.gov.uk/markwilliams/32/194_2.png) [@MArkWilliams](http://forum.companieshouse.gov.uk/u/MArkWilliams)\
**Post date:** [August 14, 2023, 7:26am UTC](http://forum.companieshouse.gov.uk/t/appointments-id-rarely-included-in-officersstream-resource/6622/8 "2023-08-14T07:26:10Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![tyreseba](http://forum.companieshouse.gov.uk/letter_avatar_proxy/v4/letter/t/f08c70/32.png) [@tyreseba](http://forum.companieshouse.gov.uk/u/tyreseba)\
**Post date:** [August 18, 2023, 9:10am UTC](http://forum.companieshouse.gov.uk/t/appointments-id-rarely-included-in-officersstream-resource/6622/9 "2023-08-18T09:10:21Z")

</div>

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