# Batch reading by unique properties (not id)

**URL:** <https://community.hubspot.com/t/batch-reading-by-unique-properties-not-id/97088>\
**Category:** APIs & Integrations\
**Tags:** companies\
**Created:** [January 4, 2024, 10:40am UTC](https://community.hubspot.com/t/batch-reading-by-unique-properties-not-id/97088 "2024-01-04T10:40:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![PDenning](https://avatars.discourse-cdn.com/v4/letter/p/82dd89/32.png) [@PDenning](https://community.hubspot.com/u/PDenning)\
**Post date:** [January 4, 2024, 10:40am UTC](https://community.hubspot.com/t/batch-reading-by-unique-properties-not-id/97088/1 "2024-01-04T10:40:54Z")

</div>

Hello all,  
I’m trying to do a batch read where i don’t have access to the internal hubspot id of the records i want to read, but i do have access to their `domain` value. It looks like it should be possible to do this (i.e. do a batch read based on a unique property other than the id, such as domain). [Accounts Dashboard | HubSpot](https://developers.hubspot.com/docs/api/crm/companies)  
But whenever i try to call the interface without the id, like so:  
api\_client.crm.companies.batch\_api.read(batch\_read\_input\_simple\_public\_object\_id=BatchReadInputSimplePublicObjectId(id\_property=“domain”, inputs=[{“domain”:\<domain\_value\>}]))  
I get the error:

HTTP response body: {“status”:“error”,“message”:“Invalid input JSON on line 1, column 61. Some required fields were not set: [id]”,“correlationId”:“13311a7b-2829-4f88-a587-452d8560ee28”,“category”:“VALIDATION\_ERROR”}  
Can anyone help me understand how to do a batch read without the internal id (using another unique property) If this is possible?

---

<div class="post-metadata">

**Author:** ![zach\_threadint](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/zach_threadint/32/46318_2.png) [@zach\_threadint](https://community.hubspot.com/u/zach_threadint)\
**Post date:** [January 11, 2024, 4:37am UTC](https://community.hubspot.com/t/batch-reading-by-unique-properties-not-id/97088/2 "2024-01-11T04:37:58Z")

</div>

Hi @PDenning 👋

I don’t think this is possible using the Company property “domain”, as per this related HubSpot Community post: [https://community.hubspot.com/t5/APIs-Integrations/Retrieve-company-by-domain/td-p/752039](https://community.hubspot.com/t5/APIs-Integrations/Retrieve-company-by-domain/td-p/752039)

What you might consider doing is (as suggested in the post linked above):

1. Use the CRM Search API (search for Company where domain equals _insert.relevant.domain_), or
2. Considering using a workflow (or similar automated process) to copy Company domain name to a custom property where “hasUniqueValue” has been set to “true”.

I hope this proves useful. Please let me know if you have any follow-up questions.
