Hubspot CRM Retrieve Batch API facing issue with ID property

Hi,

I am using Read Batch API from CRM for objects -Contacts,Companies, Products Deals & Line items.

Reference link: Accounts Dashboard | HubSpot

When values added in ID property it throws error like "

OBJECT_NOT_FOUND".

Error:

Details:

API: https://api.hubapi.com/crm/v3/objects/companies/batch/read

Sample Request Payload:
{
“idProperty”: “name”,
“properties”: [
“name”
],
“inputs”: [
{
“id”: “PrTest”
}
]
}

Same issue for other objects -Companies,Deals and Lineitems

Whereas for Contacts & Products- onlye one property supported - email and hsku

Can you please provide us the supported list of Id property for each of these objects.

Hello @Iffbld01
To read a batch of contacts by their email addresses, you would use the following request.

https://api.hubapi.com/crm/v3/objects/contacts/batch/read

{
 "idProperty": "email",
 "properties": [
 "name"
 ],
 "inputs": [
 {
 "email": "john.doe@example.com"
 },
 {
 "email": "jane.doe@example.com"
 }
 ]
}

For a Custom property first create the property using the HubSpot CRM Properties API. Then you can use it in the Read Batch API by specifying its name in the idProperty parameter.

for this use the following request.

https://api.hubapi.com/crm/v3/objects/contacts/batch/read

{
 "idProperty": "system_a_unique",
 "properties": [
 "name"
 ],
 "inputs": [
 {
 "system_a_unique": "1234567890"
 },
 {
 "system_a_unique": "9876543210"
 }
 ]
}