Hello,
Please help me elucidate my confusion when retrieving the associations between 2 objects (A and B).
Let’s suppose
A = contact and B = company
RecA = 123 (this is a contact id)
RecB = 789 (this is a company id)
Using the following 2 endpoints for retrieval:
1. https://api.hubspot.com/crm/v4/objects/contact/123?associations=company
AND
2. https://api.hubspot.com/crm/v4/objects/company/789?associations=company
I obtain the following:
“associations”: {
“companies”: {
“results”: [
{
“id”: “789”,
“type”: “contact_to_company”
},
{
“id”: “789”,
“type”: “contact_to_company_unlabeled”
}
]
}
}
“associations”: {
“contacts”: {
“results”: [
{
“id”: “123”,
“type”: “company_to_contact”
},
{
“id”: “123”,
“type”: “company_to_contact_unlabeled”
}
]
}
}
What I understand is that I receive the same set of associations everytime I retrieve them from the perspective of both object A and object B (regardless the object type: contact, company, customobject..)
So if I want to persist them in a storage I would have a sort of duplicate associations.
Am I thinking on the right direction or is there any other aspect which is not coverd in the documentation?
I appreciate any help and please redirect me if this is a duplicate post.
Regards,
Andrei