I am using the get_lists API from the latest version with revision: 2024-02-15, and wondering why there is no option to limit the no of results I want in the API response. I nowhere found in documentation about how many results it will return by default.
Ideally, the users should be allowed to put the batch size as per their requirement (under a max-batch size).
Looking forward to hear back on this.
Thanks.
How can I limit the number of results in API response?
Best answer by DavidV
Hi
Welcome to the Klaviyo community!
The GET Lists API will return a maximum of 10 results, and the API supports pagination:
curl --request GET \
--url 'https://a.klaviyo.com/api/lists/?page[cursor]=XXXXXXXXX' \
--header 'Authorization: Klaviyo-API-Key your-private-api-key' \
--header 'accept: application/json' \
--header 'revision: 2024-02-15'
You are also able to use filters.
I hope that helps!
Thanks
David
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.