I am trying to make bulk REST API call to import data to Eloqua. I am able to make call to GET, But POST gives me "400- There was a Serialization Error".
This is first step to get response for creating import definition from Eloqua Bulk REST.
URL: /api/bulk/2.0/contacts/imports
Headers:
Authorization: valid oAuth2 token
Content-Type: application/json
Body:
{
"name": "AppSource Test",
"fields": {
"firstName": "{{Contact.Field(C_FirstName)}}",
"lastName": "{{Contact.Field(C_LastName)}}",
"emailAddress": "{{Contact.Field(C_EmailAddress)}}"
},
"identifierFieldName": "emailAddress"
}
Documentation also doesn't have details about this.
Am I missing something?
Change Body content type to "raw"
Explanation: Eloqua expects the data it receives be in "raw" format. Although Header says Content type json, Setting Body as "raw" works.