Solved

List Specific data range

  • 23 February 2023
  • 5 replies
  • 103 views

Badge +1

Hi  team,
 

 I’m getting ALL List and it seems the filtering doesn’t work…?

 

Please someone suggest  to me for  edit to my HTTP request Or any filter any parameter for specific date. 

 

https://a.klaviyo.com/api/v2/lists?filter=greater-than(datetime,2023-02-22T11:30:00Z),less-or-equal(datetime,2023-02-21T11:30:00Z)

icon

Best answer by Brian Turcotte 10 March 2023, 21:02

View original

5 replies

Userlevel 7
Badge +36

Hi @shalukumari!

 

Have you given any thought on upgrading to our new V3 APIs? The Get Lists endpoint has more robust filtering that may suit your use case better:

Per the documentation, you could use this endpoint in combination with the “created” or “updated” : “greater-than” operators to target a time range. Since (per the documentation) the v2 Get Lists endpoint do not offer these filters and will eventually be depreciated, this would be my recommended course of action.

 

I hope this helps to clarify!

- Brian

 

 

Badge +1

Hi @Brian Turcotte ,

https://a.klaviyo.com/api/lists/{list_id}/profiles/?page[size]=100

https://a.klaviyo.com/api/lists/{list_Id}/profiles?page[size]=100&page[cursor]=bmV4dDo6MDFHU1lOUkhLNERBMzlORkpZVkRYTkY4WUY

When I’m using to get all profiles in specific list than getting default =20 and through pagination = 100 .
Next iteration I’m getting next url for pagination method 

any other way to get all the records at single api request.
Thanks

Userlevel 7
Badge +36

Hi @shalukumari,

 

I don’t believe it’s possible, but let me reach out to Engineering to see if there’s any way to surpass that limit and retrieve all records within one call.

 

I’ll update the thread shortly. 

 

Thanks,

- Brian

Badge +1

Thanks  for reply ,
I’m waiting for your update because we need to fetch 3 lakh data in specific list that’s why we need retrieve all records within certain limit .
Please help out me this issue.

 

Userlevel 7
Badge +36

Hi @shalukumari,

 

The max records per call is indeed 100, so you would have to paginate in order to retrieve all records - in other words, there’s no way to receive all records in one call without automating the pagination:

 

Best,

Brian

Reply