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.
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}])
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 !