Feb 2, 2023 10:47 AM
Hello!
It would seem that the end-point for batch archival/deletion of associations, doesn't care for the label type, e.g. when I have the follwing associations in contact:
"associations": {
"companies": {
"results": [
{
"id": "60000000",
"type": "contact_to_company"
},
{
"id": "60000000",
"type": "contact_to_company_unlabeled"
},
{
"id": "60000000",
"type": "custom_label"
}
]
}
}
Trying to archive the last label, with the following:
HubSpot.crm.associations.batchApi.archive("contacts", "companies",
{
inputs:[
{
_from: { id: "1000000" },
to: { id: "60000000" },
type: "custom_label",
}
],
});
Will in fact delete all three labels, and not just the `custom_label`, is this the expected behaviour? If so, is there a way to remove just the label?
Feb 3, 2023 12:54 PM
Hi, @lepeshinskii 👋 Thanks for the question. From the endpoints tab — CRM | Associations v4, which endpoint are you using? I'd like to reproduce the issue and don't want to guess.
Is it:
…/crm/v4/associations/{fromObjectType}/{toObjectType}/batch/archive
from the Associations Schema tab?Thanks! — Jaycee
Feb 3, 2023 1:15 PM
Hi @Jaycee_Lewis!
I believe it's `POST .../crm/v3/associations/{fromObjectType}/{toObjectType}/batch/archive` called using the latest nodejs sdk v8.4.2.