Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Klaviyo POST API command data is required error

ryanns
5 - Atom

Hi! I'm trying to use Alteryx to run a POST API command to update attributes on a profile in Klaviyo (email provider). I've successful ran a GET API command (Get Profiles (klaviyo.com) with my key, but keep getting an error message when I try the POST command (Create or Update Profile (klaviyo.com))

 

The error is: "An object with data is required". I have data selected in the payload so I think my syntax is incorrect but I'm not sure how to fix this. Below are screen shots of the POST command to update the organization for a profile.

 

 

 

 

8c01850d-e55c-485a-b571-836df4d1e09c.png6b19ce12-2ea1-46ec-9017-e7125ea39e53.png

17801fda-24b4-46b8-ae20-16df5f5fe0da.pngunnamed.png

 

 

279e69eb-b40c-4e80-af2a-692a910c9bfb.png

   

 

 

 

 

 

4 REPLIES 4
usmanbashir
11 - Bolide

@ryanns 

I'm not sure if this is the issue, but can you try wrapping your data within below? Per error, it needs data object. 

{
"data": {

    "type": "profile",

    ".........

 

  }

{

 

 

apathetichell
19 - Altair

Points to both of you - first for including the API specs - second for the great recommendation. I'd try ' {
"data":'+[data] +'}'

 

and then feeding it in.

ryanns
5 - Atom

Hi thanks for the feedback! That worked. My updated data format is

 

{
"data": {
    "type": "profile",
    "id": "[id]",
    "attributes": {
      "email": "[email]",
      "organization ": "ํ[organization name]"
    }
  }
}

 

I also had to change the payload to 'Take Query String/ Body from Field' in the Download tool.

usmanbashir
11 - Bolide

@ryanns - That's great to hear! If you don't mind, can you mark the answers as solutions? You're able to mark more than one response as a solution. Thanks again!

Labels
Top Solution Authors