APIs & Integrations

GDennis
Membro

Bad Request: this import is missing association ID columns for object types

I'm trying to import (via the API) multiple association labels along with my data.  I have set up multiple association labels (many to many) between jobs (a custom object) and contacts, and I have my jobs file set up to include columns for each association type.  If a particular association should be made from a job to a contact, then that contact's ID will appear in the relevant association column.

```csv

job_id,applied,passed
1234,abc,,
1234,xyz,,
6789,,abc

```

 

In my json, i'm setting up the association according to other associations (e.g. job to company, or contact to company) that are currently working:

 

```json

{

  "toColumnObjectTypeId": "0-1", // contact object id

  "propertyName": null,

  "foreignKeyType": {

    "associationCategory": "USER_DEFINED",

    "associationTypeId": 33 // from association API properties

  }

}

```

 

And then I include one of these for each association column.

 

But I'm getting a bad request (400) when attempting to upload this.  The error is: 

```

this import is missing association ID columns for object types: [ObjectTypeId{legacyObjectType=CONTACT}] (from foreign key columns: [AssociationSpec{associationCategory=USER_DEFINED, associationTypeId=46}, AssociationSpec{associationCategory=USER_DEFINED, associationTypeId=33}, AssociationSpec{associationCategory=USER_DEFINED, associationTypeId=48}, AssociationSpec{associationCategory=USER_DEFINED, associationTypeId=44}])

```


Also, is this aspect of the import API documented anywhere?  I can't find anything on what's supported in this object and what each property is for.  The best example I've seen is https://developers.hubspot.com/docs/guides/api/crm/imports#import-multiple-files, but it doesn't explain anything.

 

0 Avaliação positiva
3 Respostas 3
Anya23
Colaborador(a)

Bad Request: this import is missing association ID columns for object types

We were getting the same error and it turned out we had the files in the same object.  Instead of a separate json object for each file.

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

Bad Request: this import is missing association ID columns for object types

Hi, @GDennis 👋 Thanks for your question. I appreciate you including your code example. Hey, @SteveHTM @HunorSZ, do you have any import troubleshooting tips for @GDennis?

 

Thank you very much for taking a look! — Jaycee


HubSpot’s AI-powered customer agent resolves up to 50% of customer queries instantly, with some customers reaching up to 90% resolution rates.
Learn More.


Did you know that the Community is available in other languages?
Join regional conversations by changing your language settings !
0 Avaliação positiva
GDennis
Membro

Bad Request: this import is missing association ID columns for object types

Any chance I could get a response here?  This is a blocker for my business.

0 Avaliação positiva