Skip to main content
Contributor I
Dec 15, 2021 12:53 PM UTC
Solved

Pagination

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.
    Klaviyo Employee
    Dec 17, 2021 2:45 PM UTC

    @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
    Dec 15, 2021 1:45 PM UTC

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

    gurdeepAuthor
    Contributor I
    Dec 16, 2021 9:39 AM UTC

    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
    Dec 16, 2021 9:40 AM UTC

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

    Klaviyo Employee
    Dec 16, 2021 2:32 PM UTC

    @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
    Dec 17, 2021 6:49 AM UTC

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

    Klaviyo Employee
    Dec 17, 2021 2:45 PM UTC

    @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
    Dec 18, 2021 2:28 PM UTC

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