APIs & Integrations

GDennis
Member

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 Upvotes
2 Replies 2
Jaycee_Lewis
Community Manager
Community Manager

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


Join us on March 27th at 12 PM for the Digital Essentials Lab, an interactive session designed to redefine your digital strategy!
Engage with expert Jourdan Guyton to gain actionable insights, participate in live Q&A, and learn strategies to boost your business success.
Don't miss this opportunity to connect and grow—reserve your spot today!


Did you know that the Community is available in other languages?
Join regional conversations by changing your language settings !
0 Upvotes
GDennis
Member

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 Upvotes