Extend Custom Object Association with Deals

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: Accounts Dashboard | HubSpot.
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:

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

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?

Ciao Phil,

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

Many thanks

E