Retrieving API data in a paginated API

Hi,

I have been successful retrieving data from the following API but just single pages.

Here are the api docs
https://wherefour-api-docs.herokuapp.com/openapi#

The specific URL I am pulling from is:

https://sandbox.wherefour.com/api/v1/inventory

The issue that I have is that the data is paginated and I do not know how to create a query for paginated data with an unknown number of pages. I tried chatgpt to create it but I kept getting token errors.

Thank you