APIs & Integrations

lepeshinskii
Membro

Batch archival of associations doesn't account for labels

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?

0 Avaliação positiva
2 Respostas 2
Jaycee_Lewis
Gerente da Comunidade
Gerente da Comunidade

Batch archival of associations doesn't account for labels

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:

  • Delete — DELETE POST/crm/v4/associations/{fromObjectType}/{toObjectType}/batch/archive from the Associations Schema tab?

Thanks! — Jaycee

linkedin

Jaycee Lewis

Developer Community Manager

Community | HubSpot

0 Avaliação positiva
lepeshinskii
Membro

Batch archival of associations doesn't account for labels

Hi @Jaycee_Lewis!

I believe it's `POST .../crm/v3/associations/{fromObjectType}/{toObjectType}/batch/archive` called using the latest nodejs sdk v8.4.2.

0 Avaliação positiva