function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Maneesh Gupta 11Maneesh Gupta 11 

Loading into ExactTarget (SFMC) Data Extension

Hi All,

I am facing error using dataevents REST API call.. My dataextension's external key is 'dataextn1'.. It has just 3 fields - Cust_Id, FirstName, LastName .. Cust_Id is the primary key and is linked with the subscriber key also

In the API call (through postman), what is data extension customer key ?? Is that the external key of the data extension which is defined while creating it?

I am facing the below error - 
Status 400 Bad Request 
{
  "message": "Parameter {guid} is invalid.", 
  "errorcode": 10001, 
  "documentation": ""
}

POST /hub/v1/dataevents/dataextn1/rowset HTTP/1.1 
Host: www.exacttargetapis.com
Authorization: Bearer "My access Token" 
Content-Type: application/json 
Cache-Control: no-cache 
Postman-Token: 2df4a6db-a0be-338b-53f3-9298a4683d04 
[
 { 
  "keys":{ 
               "Cust_Id": "59188038" 
             }, 
"values":{ 
               "FirstName": "RestFirst", 
               "LastName": "RestLast" 
             } 
  } 
]

Please help
Andy BoettcherAndy Boettcher
Looks like you need to generate a unique GUID (subscriber key) to identify unique clients - read this link:  https://help.exacttarget.com/en-US/technical_library/web_service_guide/technical_articles/creating_a_data_extension_using_web_service_api/

Looks like you can just generate a GUID within your application natively and set it in the object.
Átila CastroÁtila Castro
I was facing the same problem and I solved adding the "key:" on my URL request. See:

POST /hub/v1/dataevents/key:dataextn1/rowset
or
POST https://www.exacttargetapis.com/hub/v1/dataevents/key:dataextn1/rowset

I guess if you don't assign a external key for your Data Extension the string "key:" isn't necessary. So Marketing Cloud give a GUID as a external key for your Data Extension. But if you give a value for it, you must insert "key:" and the name you gave for DE.