1

I am trying to upsert a row into a triggered send data extension with a synchronous call, but I am receiving the following error message:

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

My api call is as follows:

Host: https://my_sub_domain.rest.marketingcloudapis.com 
POST /hub/v1/dataevents/DE_external_key/rowset 
Content-Type: application/json 
Authorization: Bearer my_access_token
[
    {
        "keys":{
                "Email": "[email protected]"
                },
        "values":{
                "Language": "en",
                "Country": "NL"
                }
    }
]

DE attributes are:

PK? yes - Name: Email - type: Email - length: 254 - Nullable? No
PK? No - Name: Language - type: text - Length: 50 - Nullable? No
PK? No - Name: Country - type: text - Length: 50 - Nullable? No

I find it strange that my error code says that thee Primary Key 'Email' does not exist. Anyone who has a solution perhaps?

Thanks

2
  • Is the External Key of your target data extension really DE_external_key? Commented Oct 2, 2019 at 12:00
  • Hi Adam, no it's not - I just put DE_external_key as a placeholder. Commented Oct 2, 2019 at 12:07

1 Answer 1

7

In the POST you're missing key: before your DE's External Key, so it should be like this :

POST /hub/v1/dataevents/key:DE_external_key/rowset 
1
  • Thanks Zak, this solved the problem indeed. Commented Oct 2, 2019 at 12:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .