APIs & Integrations

ArnaudStephan
Participant

Get all engagement properties in V3 API

SOLVE

Hello,

 

I'm trying to fetch our engagements (calls, emails, notes, etc.) using this endpoint :

 
The problem is that it is very long to finish the initial import, even though I am aware that when it is done I can use the endpoint to get the most recent engagements.
 
I would like to use the V3 API to get specific engagements, using this endpoint :
 
 
But the problem is that the response does not contain the association details like in the V1 : how can I know the deal, the company, the contact, associated with a specific call ?
0 Upvotes
1 Accepted solution
coldrickjack
Solution
Guide

Get all engagement properties in V3 API

SOLVE

Hi @ArnaudStephan.

 

You can do this by appending "associations={objectType}" to your request. For instance if I wanted to get associated contacts I can use "associations=contacts" as shown below:

 

GET https://api.hubapi.com/crm/v3/objects/calls?associations=contact
RESPONSE

{
    "results": [
        {
            "id": "31320117455",
            "properties": {
                "hs_createdate": "2024-08-08T15:34:39.546Z",
                "hs_lastmodifieddate": "2024-08-08T15:34:47.250Z",
                "hs_object_id": "31320117455"
            },
            "createdAt": "2024-08-08T15:34:39.546Z",
            "updatedAt": "2024-08-08T15:34:47.250Z",
            "archived": false,
            "associations": {
                "contacts": {
                    "results": [
                        {
                            "id": "28333023942",
                            "type": "call_to_contact"
                        }
                    ]
                }
            }
        }
    ]
}

 

I hope this helps!

Jack

 

View solution in original post

0 Upvotes
2 Replies 2
coldrickjack
Solution
Guide

Get all engagement properties in V3 API

SOLVE

Hi @ArnaudStephan.

 

You can do this by appending "associations={objectType}" to your request. For instance if I wanted to get associated contacts I can use "associations=contacts" as shown below:

 

GET https://api.hubapi.com/crm/v3/objects/calls?associations=contact
RESPONSE

{
    "results": [
        {
            "id": "31320117455",
            "properties": {
                "hs_createdate": "2024-08-08T15:34:39.546Z",
                "hs_lastmodifieddate": "2024-08-08T15:34:47.250Z",
                "hs_object_id": "31320117455"
            },
            "createdAt": "2024-08-08T15:34:39.546Z",
            "updatedAt": "2024-08-08T15:34:47.250Z",
            "archived": false,
            "associations": {
                "contacts": {
                    "results": [
                        {
                            "id": "28333023942",
                            "type": "call_to_contact"
                        }
                    ]
                }
            }
        }
    ]
}

 

I hope this helps!

Jack

 

0 Upvotes
ArnaudStephan
Participant

Get all engagement properties in V3 API

SOLVE

Hey @coldrickjack , thanks a lot for your answer ! This was right in the documentation, I don't know how I managed not to see it 🙂