But if you have a custom object type, you substitute that type identifier and Object ID for one or both of these inserted value pairs. Clearly the ID in question is the HubSpot object ID for whatever type of object - however you have obtained that value previously. It could be hard coded or a value from another property - its just a digit string.
Is it possible to associate an object using a custom property?
SOLVE
@RAraujo0 - perhaps i'm misunderstanding your question, but using that API any hard coded value or property value can be used to pass the hubspot id value for the two objects you are trying to associate, Just make sure that the association ID is defined for the relationship between the objects.
Is it possible to associate an object using a custom property?
SOLVE
My question is: to associate a contact to a company for example, can I use a custom property as the ID or it always need to be the main ID from contact?
/crm/v4/objects/contacts/{mainID or custom property as ID?}/associations/default/companies/{mainID or custom property as ID?}
But if you have a custom object type, you substitute that type identifier and Object ID for one or both of these inserted value pairs. Clearly the ID in question is the HubSpot object ID for whatever type of object - however you have obtained that value previously. It could be hard coded or a value from another property - its just a digit string.