I can only get customers on page 1 by default. I am using PHP and Laravel.
But I have more than one pages and I want to retrieve all customers on these pages dynamically.
I know I can get customers on next page e.g. page 2 like GET /admin/customers.json?page=2, but I want this to be dynamically done.
can anybody please help me with this?
So far I am here.
$url = "https://" . $this->api_key . ":" . $this->password . "@" . $this->shop;
$client = new Client();
$response = $client->request('GET', $url . "/admin/customers.json");
$body = $response->getBody();
$content = $body->getContents();
$customers= json_decode($content, true);
echo '<pre>'; print_r($customers); echo '</pre>';