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
curl --request GET --url [https://api.hubapi.com/crm/v3/objects/contacts/251/\\](https://api.hubapi.com/crm/v3/objects/contacts/251/\)?associations\=notes --header ‘authorization: Bearer <token>’ | json_pp
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 432 0 432 0 0 352 0 --:--:-- 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?
curl --request POST \
--url https://api.hubapi.com/crm/v3/objects/contacts/batch/read \
--header ‘authorization: Bearer <token>’ \
--header ‘content-type: application/json’ \
--data '{
“inputs”: [
{
"id": "251"
}
],
“associations”: [
"notes"
]
}’ | json_pp
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 501 0 415 100 86 335 69 0:00:01 0:00:01 --:--:-- 408
{
“completedAt” : “2022-03-08T06:27:11.024Z”,
“results” : [
{
"archived" : false,
"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"
}
],
“startedAt” : “2022-03-08T06:27:10.999Z”,
“status” : “COMPLETE”
}