Fetch records asynchronously

Hi there,
I am building an integration using custom coded action, and in one I need to fetch all product ids to check whether the records should be inserted or updated, for this I can fetch all records using the paging parameter:

{'next': {'after': '31481613535',
 'link': 'https://api.hubapi.com/crm/v3/objects/products?limit=100&properties=ts_product_id&archived=False&after=31481613535'}}
{'next': {'after': '31481615555',
 'link': 'https://api.hubapi.com/crm/v3/objects/products?archived=False&limit=100&after=31481615555&properties=ts_product_id'}}
{'next': {'after': '31485213942',
 'link': 'https://api.hubapi.com/crm/v3/objects/products?archived=False&limit=100&after=31485213942&properties=ts_product_id'}}

However, I would like to call the records asynchronously, but there does not seem to be a reliable method to determine beforehand what the ‘after’ parameter should be, making this seemingly impossible.
Is there a way to make list call in an asynchronous fashion?

hi @JVermunt ,

Here’s the curl you can use that will give you products list with ID’s

curl --request GET \
 --url 'https://api.hubapi.com/crm/v3/objects/products?limit=10&archived=false' \
 --header 'authorization: Bearer YOUR_ACCESS_TOKEN'

for reference you can check =Accounts Dashboard | HubSpot
you can define the after parameter also in this reaquest . It will be the last product id you recieved.
and also limit as well to set number of records to be fetched .
If it helps you. Then mark it as a solution so that it can help other comunity members .

I want make the calls asynchronously, this does not answer my question.