#alecpope

1 messages · Page 1 of 1 (latest)

gray belfryBOT
safe moon
edgy girder
#

Sure:
Request when searching for the first subscription: req_7G6YtthoDqzKkV
Second request: req_cRs4RgR3Yo6oqO

safe moon
#

Thanks, was these two subsciptions created recently?

gray belfryBOT
edgy girder
#

One of them, yes. The other one no. But they have the same creation time, because I appended a test clock to the customer

rotund shoal
edgy girder
#

Didn't know about this :D
But can I use it in my use case? I have an endpoint to list subscriptions of a user. I want to paginate the subscriptions. When looking on auto pagination, I don't think this can be applied to an API request, or?

rotund shoal
#

it works if you list subscriptions for a user using our SDK to retrieve the list of subscriptions

edgy girder
#

Then I currently don't know how? I use subscription.Search(&params) to pass in the query, page, etc.

rotund shoal
#

the page that i provided has examples in the relevant language, maybe try modifying it accordingly and see if it works?

edgy girder
#

The problem is that the auto pagination resets, when sending a new request. So when the user wants the first 10 subscriptions and then sends a new request to receive the next 10 subscriptions, the user still receives the first 10

safe moon
#

@edgy girder What do you mean by auto pagination resets?

edgy girder
#

It starts at the first subscription again

#

I mean, I also create a new list request, when the user sends a new request

safe moon
edgy girder
#

Yeah that could work. When listing subscriptions, are they sorted by creation date?

But why is the pagination with page not working? Is it a bug? Am I using it wrong?

safe moon
#

Under normal operating conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up to an hour behind during outages. Search functionality is not available to merchants in India.

Search API has its limitation

edgy girder
#

Hmm, okay. How can I list subscriptions and filter by metadata?

safe moon
#

Listing API doesn't accept metadata, only Search API does. So you need to consider the limitation when using the Search API

edgy girder
#

Okay, thanks! So when listing subscriptions: I use the id of the last subscription from the list to pass it as starting_after in the next request?

safe moon
#

Yes you are right

edgy girder
#

Okay, it works. Great, thanks!