APIs & Integrations

DParshenkov
Member

How often do the AssociationTypeIDs that were created by Hubspot change?

How often do the AssociationTypeIDs with category HUBSPOT_DEFINED

change? I wanna hardcode this AssociationTypeIDs, but i don't really sure about changings of this IDs.

0 Upvotes
3 Replies 3
LMeert
Guide | Platinum Partner
Guide | Platinum Partner

How often do the AssociationTypeIDs that were created by Hubspot change?

Hi @DParshenkov,

I think you should switch to the more recent associations v3 API instead of the legacy one.
From the V3 and onwards, you don't need to rely on the old associationTypeID.

Instead you use : fromObjectType, toObjectType in the endpoint URL as well as the "type" in the body.
You can hardcode these parameters as the native objects surely won't have their type change in the future.

 

Hope this helps, and if it does, please consider marking this as a solution

 

Have a good day,

Ludwig

Agence Mi4 - Data DrivenCTO @ Mi4
Hubspot Platinum Partner and Integration Expert

Passionate human, very curious about everything data and automation.

Any problem with Hubspot you need help solving ?

Let me know !

0 Upvotes
DParshenkov
Member

How often do the AssociationTypeIDs that were created by Hubspot change?

Hi! I don't wanna create an association as entity Hubspot, i wanna create an association between call and companies or contact. 
To do this, I need to pass:
CallId 
ObjectId 
associationTypeId, <---- Can i hardcode this param? Now i use 194 for call_to_contact and 182 for call_to_companie
ObjectType

0 Upvotes
LMeert
Guide | Platinum Partner
Guide | Platinum Partner

How often do the AssociationTypeIDs that were created by Hubspot change?

Hi @DParshenkov,

If you want to associate a call to a company or contact, you can still do it using the V3 of the API, so you won't need to rely on the type ID.

LMeert_0-1649176450715.png

 

Associating a call to a contact would be made using a POST call to this endpoint :
/crm/v3/associations/Calls/Contacts/batch/create

And the body would look like this :

{
    "inputs": [
        {
            "from": {
                "id" : [id of your call]
            },
            "to" : {
                "id" : [id of your contact]
            },
            "type": "call_to_contact"
        }
    ]
}

 

And you would not use the deprecated endpoint relying on the objectTypeID.

Hope this helps,

Ludwig

Agence Mi4 - Data DrivenCTO @ Mi4
Hubspot Platinum Partner and Integration Expert

Passionate human, very curious about everything data and automation.

Any problem with Hubspot you need help solving ?

Let me know !

0 Upvotes