Solved

Unable to update properties through Identify API

  • 13 December 2020
  • 5 replies
  • 528 views

Badge +2

I am able to call the Identify API to create new profiles with custom properties and update the standard properties.

However, when I make a call to the Identify API web service to update any of my custom properties, the call simply returns a 0 and the profile is not updated.

Is it possible to make updates to these properties through the Identify API after initial insert?  If so, could you please provide an example?

If updates are not possible, what API can I use to update properties using the email as key.

 

icon

Best answer by caroline 17 December 2020, 02:20

View original

5 replies

Userlevel 4
Badge +6

Hi there, thanks for contributing to the Community! 

 

You should be able to leverage the Identity API to update existing profile’s custom properties. If you don’t mind could you send me the request you are currently using that is returning the 0? Additionally for your reference this is our documentation on the Track and Identity API. 

 

Thanks so much!
 

Kelsey 

Badge +2

Hi Kelsey 

 

I am facing same issues

 

My request url  is https://a.klaviyo.com/api/identify?data=eyJ0b2tlbiI6IlVzNHl0bSIsInByb3BlcnRpZXMiOnsiJGV2ZW50X2lkIjpudWxsLCJpdGVtcyI6W119fQ==}

 

I want to post First name , last name , email , phone no ,city , state , zip code and country field

 

Thanks so much!

 

Ramesh

Userlevel 5
Badge +8

Hi Ramesh,

 

When I decode the payload you’re attempting to send in your API call, I get the following:

{"token":"Us4ytm","properties":{"$event_id":null,"items":[]}}

 

To use the Identify API, you must identify the person by their email address ($email). For example, a valid payload would be:

{
"token" : "WtKVQ4",
"properties" : {
"$email" : "thomas.jefferson@klaviyo.com",
"$first_name" : "Thomas",
"$last_name" : "Jefferson",
"Plan" : "Premium",
"SignUpDate" : "2016-05-01 10:10:00"
}
}

 

Our API documentation provides additional information.

 

Hope this helps!

 

Best,

 

Caroline

Badge +2

Hi Caroline

 

Thank you very much for prompt useful response

API is working now

 

 

HI everyone:

I’m having this same problem trying to save the utm_id from the referring URL using _learnq.push in an EventListener for a Submit button on a Klaviyo embedded form. _learnq is populated correctly in the debugger and returns 1.

_learnq.push([‘indentify’, { 

  '$email' : e.detail.metaData["$email"],
   '$first_name' : e.detail.metaData["$first_name"],
   'Campaign ID' : utm_id
}]);

Campaign ID is not coming through to the profile, even though _learnq.push is returning 1. 

Can anyone on this thread help me?

Thanks!

Roy

Reply