APIs & Integrations

Iffbld01
Member

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: https://developers.hubspot.com/docs/api/crm/companies

 

When values added in ID property it throws error like "

OBJECT_NOT_FOUND".
Iffbld01_0-1686206232861.png

Error:

Iffbld01_1-1686206525314.png

 

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.
0 Upvotes
1 Reply 1
himanshurauthan
Thought Leader | Elite Partner
Thought Leader | Elite Partner

Hubspot CRM Retrieve Batch API facing issue with ID property

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"
    }
  ]
}




Digital Marketing & Inbound Expert In Growth Hacking Technology