Is there a way to retrieve associations in a Batch Read. For example, when retrieving a single contact, I can request for associations via the GET API as follows
% Total% Received % XferdAverage Speed TimeTime TimeCurrent
DloadUpload Total SpentLeftSpeed
100 4320 4320 03520 --:--:--0:00:01 --:--:-- 357
{
"archived" : false,
"associations" : {
"notes" : {
"results" : [
{
"id" : "19668463257",
"type" : "contact_to_note"
},
{
"id" : "19793682071",
"type" : "contact_to_note"
}
]
}
},
"createdAt" : "2022-03-03T09:23:21.321Z",
"id" : "251",
"properties" : {
"createdate" : "2022-03-03T09:23:21.321Z",
"email" : "bcooper@biglytics.net",
"firstname" : "Bryan",
"hs_object_id" : "251",
"lastmodifieddate" : "2022-03-04T03:08:28.978Z",
"lastname" : "Cooper"
},
"updatedAt" : "2022-03-04T03:08:28.978Z"
}
But when trying to use batch operations is there a way to retrieve associations in the response. I tried the following but did not work. From API there seems to be no way to achieve this. Is there any other way to do this?
Have you explored the CRM search api? You can return associations with that
HubSpot’s AI-powered customer agent resolves up to 50% of customer queries instantly, with some customers reaching up to 90% resolution rates. Learn More.
Have you explored the CRM search api? You can return associations with that
HubSpot’s AI-powered customer agent resolves up to 50% of customer queries instantly, with some customers reaching up to 90% resolution rates. Learn More.
I dont think we can get associations via the search API. As a result I had to do this in a sub optimal convoluted way 😞
1) Execute a search query
2) For all returned records, call the batch association API to get the list of associations
3) The returned association is in turn sparse, it does not have the name of the contact, company or deal. So make further batch requests to get these information
This is definitely not ideal. I'm not sure why assocaitions is not exposed in search while its exposed in list API