#zeroth

1 messages · Page 1 of 1 (latest)

polar whaleBOT
smoky needle
#

Hello! If you don't keep any state that means you need the total number of Subscriptions, and that means you would need to get all of them from the API every time to get the total count. That's not really something I would recommend, but it's possible.

glacial linden
#

i can do expand=total_count and limit=1 to make the api call pretty minimal, though i don't think splitting by product would be possible as that isn't a supported query param

smoky needle
#

Yep, that's correct, that's why you would need to grab all of them and fitler for the ones you want on your end to determine the count.

#

The workaround would be to set metadata on the Subscriptions and search based on that.

glacial linden
#

yea ok, thanks for the help. I might do something in between with on startup the list is fetched but on webhook the deltas are applied based on the webhook event

smoky needle
#

Don't know if that's practical for your use case or not though.

glacial linden
#

yea good idea with metadata

#

ok cool, i've got some ideas. thanks for the speedy help