What is the difference between the three association categories?

Hello,

Could you tell me what is the difference between the three association categories (“HUBSPOT_DEFINED”, “USER_DEFINED”, and “INTEGRATOR_DEFINED”)?
I tried adding a contact with an association, but it works only with the “HUBSPOT_DEFINED” association category. I make the following request:

curl --location 'https://api.hubapi.com/crm/v3/objects/contacts' \
--header 'authorization: Bearer {token}' \
--header 'content-type: application/json' \
--data '{
 "associations": [
 {
 "types": [
 {
 "associationCategory": "HUBSPOT_DEFINED",
 "associationTypeId": 1
 }
 ],
 "to": {
 "id": "{companyId}"
 }
 }
 ],
 "properties": {
 "lastname": "John",
 "firstname": "Doe"
 }
}'

If I change the category to “INTEGRATOR_DEFINED” the API returns the following error:
“Cannot get definitions for unsupported categories: [INTEGRATOR_DEFINED]”

And if I change the category to “USER_DEFINED” the API returns another error:

“Invalid association spec: AssociationSpec{associationCategory=USER_DEFINED, associationTypeId=1}”

I’m a bit confused about how the categories are used. I can’t find information about them in the documentation, so I would be grateful if someone could explain the difference between the three categories and why, in my case, it only works with “HUBSPOT_DEFINED”.

Thanks in advance!

Best,

Rosen Ivanov

Hey, @RIvanov :waving_hand: The Associations API documentation added a list of HubSpot created associations. So that helps simplify things a bit — Association type ID values. Other things of note:

  • Associations are omnidirectional, so Deal > Contact will be different from Contact > Deal, etc

  • Custom associations and associations from Custom Objects to default objects like Contacts, Deals, Tickets, etc. need to be queried using this endpoint and make a GET request to

    /crm/v4/associations/{fromObjectType}/{toObjectType}/labels

For the third option, INTEGRATOR_DEFINED, do you have a specific use case or example? Although the API example page exposes this option, the documentation doesn’t provide an example.

Best,

Jaycee

Hey, Jaycee,

Thanks for the quick reply,

But my question was about the categories, not the association type ID values or the associations themselves.

I would like to know how to decide which of the three categories to use. And why, in the example above, does it only work with the “HUBSPOT_DEFINED” category?

Best,

Rosen

@Jaycee_Lewis, do you have a chance to look into my question?