APIs & Integrations

eugenio_rossi
Contributor | Platinum Partner
Contributor | Platinum Partner

Extend Custom Object Association with Deals

SOLVE

Hi there,

I'm just new to Custom Object and I found it a great feature.

I successfully created one Custom Object following the API documentation: https://developers.hubspot.com/docs/api/crm/crm-custom-objects.
I managed to create an Object 'House' and the associated Object was set, as default, to CONTACT:

 

"associatedObjects": [
"CONTACT"
],

 

Now, I'd like to extend it to DEALS but I'm having some issues in doing so. 

More specifically, it is not clear, to me, how to fill the fields asked to create a new association:

eugenio_rossi_0-1614590782825.png

It is ok for Object type ID, and I guess that toObjectTypeID has to be deal, but how should I manage the objectType field? Is it the correct way to extend a custom object to Deals?

 

Thx

 

1 Accepted solution
Phil_Vallender
Solution
Most Valuable Member | Diamond Partner
Most Valuable Member | Diamond Partner

Extend Custom Object Association with Deals

SOLVE

Hi @eugenio_rossi 

 

You are almost there with the API request. What you need to do next is use the get schemas endpoint to pull back info on all your existing objects and find the rather odd objectTypeID of your custom object house object. When I did this last the format was something like 'pxxxxxxx-house' - it took some looking but I found it eventually in the response.  Oh and change the association name too.

 

Hope this helps?

Phil Vallender | HubSpot Website Agency

View solution in original post

2 Replies 2
Phil_Vallender
Solution
Most Valuable Member | Diamond Partner
Most Valuable Member | Diamond Partner

Extend Custom Object Association with Deals

SOLVE

Hi @eugenio_rossi 

 

You are almost there with the API request. What you need to do next is use the get schemas endpoint to pull back info on all your existing objects and find the rather odd objectTypeID of your custom object house object. When I did this last the format was something like 'pxxxxxxx-house' - it took some looking but I found it eventually in the response.  Oh and change the association name too.

 

Hope this helps?

Phil Vallender | HubSpot Website Agency
eugenio_rossi
Contributor | Platinum Partner
Contributor | Platinum Partner

Extend Custom Object Association with Deals

SOLVE

Ciao Phil,

 

Thanks for your answer. Brilliant: it works just fine.

 

Many thanks

 

E