Batch read returns alternative email

Hi,
I’m using the ‘POST/crm/v3/objects/contacts/batch/read’ endpoint to retrieve a batch of users by their email address.
Most of the time it works find, I pass a string array of email addresses as Inputs, and get back the properties I requested for each user. However since deploying to live I’ve found a number of our contacts have more than one contact record and I’m getting back the alternative contact record, with another email address.
e.g.
A user has two contacts:
Company A and email first@companyA.com
Company B and email another@acme.com
None of the properties I can see match between both records, other than first/last name.
Both have unique id’s, email domain and company.
Yet, when I run the call for first@companyA.com, I get back the record of another@acme.com
This only happens on users that genuinely have a link between the two accounts but I can’t establish where that link is made.
Thanks

Hey @rgilham

Thank you for reaching out, I think we can get some thoughts from our experts here.

Hey @hilton22 @PCarlson @MichaelC do you have any recommendations for @rgilham ?

Thanks

Sharon

Sharon, Thanks for responding.
I’ve not found the solution yet but think I’ve discovered more about my issue.
I hadn’t realised a contact can have multiple email addresses with the one being marked as primary being returned by the api.
My query is requesting by one of the contacts other email addresses, so I’m given back their primary.
I still can’t find how to access those other email addresses from the API as yet. It wasn’t clear on any API docs or here, HubSpot's default contact properties.
Any help with how to request all a contacts email addresses would be greatly apprecieated.

Seems I stumbled across a known issue here. I just found this disscusion on it. Hoping this feature might appear soon.
https://community.hubspot.com/t5/HubSpot-Ideas/Add-Edit-Remove-Non-Primary-Emails-from-Contact-API/idc-p/452909#M86474

@rgilham

Have you looked at the hs_additional_emails property?

Doesn’t look like it is on that kb that you linked, but if you hit the properties endpoint, you will get all available properties in the portal (default and custom)

Thanks, Just the name I needed. I did look through a dump of the properties api but missed the hs_additional_emails property.