Skip to main content
Contributor I
December 15, 2021
Solved

Pagination

  • December 15, 2021
  • 7 replies
  • 1094 views

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.

    This topic has been closed for replies.
    Best answer by klaviyojad

    @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.

    7 replies

    Klaviyo Employee
    December 15, 2021

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

    gurdeepAuthor
    Contributor I
    December 16, 2021

    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.

    gurdeepAuthor
    Contributor I
    December 16, 2021

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

    Klaviyo Employee
    December 16, 2021

    @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?

    gurdeepAuthor
    Contributor I
    December 17, 2021

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

    Klaviyo Employee
    December 17, 2021

    @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.

    gurdeepAuthor
    Contributor I
    December 18, 2021

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