I am attempting to do an insert of thousands of record using the Bulk-API, which is in itself is not complicated. The thing that I am having trouble with is insert both Record and Child. For example, I am trying to insert a new Account record and insert the new Contact its linked to at the same time. The REST API allows for that using sObject Tree however that request structure gives me the following error:
[ {"success" : false, "created" : false, "id" : null, "errors" : [ { "message" : "Account: bad field names on insert/update call: Contacts", "fields" : [ "Contacts" ], "statusCode" : "INVALID_FIELD_FOR_INSERT_UPDATE", "extendedErrorDetails" : null } ]} ]
So is there a different way of approaching this? Is it even possible to do with the BULK - API? and if so what is the proper JSON syntax?
My understanding is that the BULK - API is based on the REST API but apparently not that piece.