Solved

Unable to retrieve List using V2 api

  • 30 July 2021
  • 3 replies
  • 258 views

Badge

Does anyone know why using the v2 api to retrieve a particular list return a “List not Found Error” but using the v1 api returns the list in question?
Example Curls 

V2 curl does not work

curl --request GET \     --url 'https://a.klaviyo.com/api/v2/list/LIST_ID?api_key=PRIVATE_KEY' \     --header 'Accept: application/json'V1 curl works
curl --request GET \     --url 'https://a.klaviyo.com/api/v1/list/LIST_ID?api_key=PRIVATE_KEY' \     --header 'Accept: application/json'
icon

Best answer by David To 2 August 2021, 18:15

View original

3 replies

Userlevel 7
Badge +49

Hello @devQuestions,

Thanks for sharing your question with the Klaviyo Community!

When trying to retrieve this particular list, I would confirm the list ID and private API key used are correctly formatted without any trailing spaces and that the IDs and keys are in the correct cases. I would also ensure that the list is actually present within the account you are working on along with using a private API key that is generated within that same account. I’ve seen experiences where inconsistencies such as users switching accounts or using the incorrect private API key of a different Klaviyo account would cause these errors. 

In addition, when retrieving and using a GET request to hit the list v1 or list v2 endpoints; the data returned should be the same.

I hope this helps!

David

Badge

Thanks for the reply @david.to 

I  tried both curls above, the only change between them is  v1/v2. Everything else is the same. 

Userlevel 7
Badge +49

Hey @devQuestions,

Can you confirm that you are using the the ID of an actual static list within your calls as opposed to an ID of a segment? 

While Klaviyo’s list v1 endpoint will return the details of the segment such as the name of the segment, when it was created, etc, using a segment’s ID when hitting the v2 endpoint would return the “List not Found Error” error. Klaviyo’s list v2 endpoint will only work with static lists. 

David

Reply