My problem is that i get unwanted association when associating contact to company. As it can be seen below i create associations for two contacts to same customer, but the result is that they both get two type of association, eventhough I only have specified one.
I am posting following json on {{baseUrl}}/crm/v4/associations/contacts/companies/batch/create
{
"inputs": [
{
"from": "11751",
"to": "9314823150",
"types": [
{
"associationCategory": "HUBSPOT_DEFINED",
"associationTypeId": "1"
}
]
},
{
"from": "11752",
"to": "9314823150",
"types": [
{
"associationCategory": "HUBSPOT_DEFINED",
"associationTypeId": "279"
}
]
}
]
}
"associationTypeId": "1" is company_to_contact "associationTypeId": "279" is company_to_contact_unlabeled
when I get the company on {{baseUrl}}/crm/v3/objects/companies/9314823150?associations=contacts is there assosiations not specified in my create association request;
{
"id": "9314823150",
"properties": {
"createdate": "2023-12-18T15:53:21.146Z",
"domain": null,
"hs_lastmodifieddate": "2024-01-03T08:04:04.525Z",
"hs_object_id": "9314823150",
"name": "KBJ Miljø ApS"
},
"createdAt": "2023-12-18T15:53:21.146Z",
"updatedAt": "2024-01-03T08:04:04.525Z",
"archived": false,
"associations": {
"contacts": {
"results": [
{
"id": "11751",
"type": "company_to_contact"
},
{
"id": "11752",
"type": "company_to_contact"
},
{
"id": "11751",
"type": "company_to_contact_unlabeled"
},
{
"id": "11752",
"type": "company_to_contact_unlabeled"
}
]
}
}
}
How to avoid the association not specified in the create association request?
I know what the problem is now. When creating firsts association for contact to company will the association always be the contacts primary connection to a company. By bad was that is saw the association as the company primary contact and not as the contacts primary association to a company.