Read the associations of a deals ids batch

I’m looking for an endpoint that reads the associations of a deals ids batch, for exemple: I have a list of deal ids anda I want all associations of each id.

I’m trynig this post endpoint:

/crm/v3/objects/deals/batch/read?associations=contacts&associations=company

with this JSON body:

{

“inputs”: [

{

“id”: “123”

},

{

“id”: “456”

}

]

}

and my response is like this, but no associations informations:

{

“status”: “COMPLETE”,

“results”: [

{

“id”: “123”,

“properties”: {

“amount”: “1500.00”,

“closedate”: “2019-12-07T16:50:06.678Z”,

“createdate”: “2019-10-30T03:30:17.883Z”,

“dealname”: “Custom data integrations”,

“dealstage”: “presentationscheduled”,

“hs_lastmodifieddate”: “2019-12-07T16:50:06.678Z”,

“hubspot_owner_id”: “910901”,

“pipeline”: “default”

},

“createdAt”: “2019-10-30T03:30:17.883Z”,

“updatedAt”: “2019-12-07T16:50:06.678Z”,

“archived”: false

},

{

“id”: “456”,

“properties”: {

“amount”: “1500.00”,

“closedate”: “2019-12-07T16:50:06.678Z”,

“createdate”: “2019-10-30T03:30:17.883Z”,

“dealname”: “Custom data integrations”,

“dealstage”: “presentationscheduled”,

“hs_lastmodifieddate”: “2019-12-07T16:50:06.678Z”,

“hubspot_owner_id”: “910901”,

“pipeline”: “default”

},

“createdAt”: “2019-10-30T03:30:17.883Z”,

“updatedAt”: “2019-12-07T16:50:06.678Z”,

“archived”: false

}

],

“requestedAt”: “2023-08-30T14:18:21.677Z”,

“startedAt”: “2023-08-30T14:18:21.677Z”,

“completedAt”: “2023-08-30T14:18:21.677Z”,

“links”: {

“additionalProp1”: “string”,

“additionalProp2”: “string”,

“additionalProp3”: “string”

}

}

Does anyone knows how to do this?

Hi @denilsonluizm

As far as I know you can only get one association ata time using the Associations API e.g. Deals to Contacts OR Deals to Companies.

So I assume you’ll need to make two requests.

Have fun

Mike

Here to learn more about HubSpot and share my HubSpot Knowledge. I’m the founder of Webalite a HubSpot Partner Agency based in Wellington, New Zealand and the founder of Portal-iQ the world’s first automated HubSpot Portal Audit that helps you work smarter with HubSpot.

So