Solved

Pagination

  • 15 December 2021
  • 7 replies
  • 51 views

Badge

Hello, how can I paginate through the multiple pages in my response. I got that we need to use the “next” field but I’m not sure which parameter is used for it. I’m unable to find documentation related to the same. Thank You.

icon

Best answer by klaviyojad 17 December 2021, 15:45

View original

7 replies

Userlevel 2
Badge +4

@gurdeep happy to help you.  Could you please clarify which api call you have tried?

Badge

Hi Jad, I was calling the Fulfilled Order metric and it’s more than 1000 entries. I get the “next” field within the response but I’m not sure which parameter it goes with.

Badge

Also I’m trying to get the events for this Fulfilled Order metric.

Userlevel 2
Badge +4

@gurdeep I presume you are referring to https://developers.klaviyo.com/en/reference/metric-timeline are you passing a query param of “since” with the value of the “next” field?

Badge

Hi @klaviyojad , I’m not sure what parameter to pass it (“next”) to. Please help me.

Userlevel 2
Badge +4

@gurdeep for the JSON output of the first call did you notice a “next” field with a value?  You use that for the subsequent call for since.

Badge

Okay, Thank you for the help. Appreciate it. @klaviyojad 

Reply