1

When I am try to insert data into a data extension using REST API I'm getting an error.

Api Doc: https://developer.salesforce.com/docs/atlas.en-us.noversion.mc-apis.meta/mc-apis/putDataExtensionRowByKey.htm

Put Url : https://www.exacttargetapis.com/hub/v1/dataeventsasync/key:4D58A264-3B49-44C4-A350-14D2D0A7D39B/rows/CustomerID:123

Post Data:

{
    "values":{
            "Interest":"1et.com"
             }
}

In the Header I provide AccessToken.

Response is:

{
    "message": "Primary key 'CustomerID' does not exist.",
    "errorcode": 10000,
    "documentation": ""
}

But I have CustomerID as a Primary Key on that Data Extension

enter image description here

Total Records In DE: enter image description here

  • Comments are not for extended discussion; this conversation has been moved to chat. – Adrian Larson May 30 '18 at 14:43
  • Hi, were you able to resolve the error? – user36778 Dec 7 '18 at 15:41
0

It looks like there are no value "123" (from your request) in the Column "CustomerID". According to documentation this is "Upsert" operations which means like "update and insert". Can you try to do Asynchronous Insert Operation - https://developer.salesforce.com/docs/atlas.en-us.noversion.mc-apis.meta/mc-apis/insertDataExtensionIDAsync.htm I hope it helps you in the issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.