Klaviyo POST API command data is required error
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
Solved! Go to Solution.
- Labels:
- API
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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",
".........
}
{
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@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!
