Solved

POST api/v2/list/list_id/get-members not returning person data

  • 5 October 2021
  • 2 replies
  • 202 views

Badge +2

I’m working on moving our requests from v1 to v2 and I see that our requests to https://apidocs.klaviyo.com/reference/lists-segments#get-list-members aren’t being returned with the ‘person’ data. In fact, the shape of the response is:

[{"id"=>"123", "created"=>"2021-09-26T20:33:47Z", "email"=>"mail@mail.com"}]

Can anyone help?

icon

Best answer by David To 6 October 2021, 19:58

View original

2 replies

Userlevel 7
Badge +60

Hello @cmuller,

Thanks for sharing your question with the Klaviyo Community!

The request you seem to be making to Klaviyo’s List v2 endpoint appears to be one used for checking to see if a profile is within a list. With that in mind the return response is actually expected and seems to be functioning correctly. This specific request you are highlighting is meant to check to see if one or more email, phone number, or push token are in a given list. No distinction is made between a person not being in a given list, and not being present in Klaviyo at all.

Instead, you’ll actually want to make a Get Profile API call such as https://a.klaviyo.com/api/v1/person/person_id to return all the profile properties and data pertaining to a specific profile. You can learn more about using this endpoint from the Profiles section of the API Documentation

I understand that your goal was migrate from using Klaviyo’s V1 endpoints to V2, however some API requests will still need to be made to the V1 endpoint as opposed to V2.

I hope this helps!

David

Badge +2

Hey David, thanks for the quick response. I’ve stuck with the V1 endpoint, but might I suggest updating the docs for this endpoint to accurately reflect the shape of the response? It’s currently not accurate. Thanks!

Reply