This bug applies to both the website and the API.
If an officer is a secretary then their DOB does not need to be on companies house however if they are both a secretary and a director then their DOB is blank when using “officer search”.
This also happens when you search for an officer on the website. The data is definitely there as if you can find it by getting a company’s officer list (and the effected person’s DOB is shown in their director position) however it is very inconvenient to build a work around for this.