List customer limit

I use the following code to list customers but it only shows me 25 results
$customersApi = new DwollaSwagger\CustomersApi($apiClient);
$myCusties = $customersApi->_list()->_embedded->customers;

Then I tested and changed the 2nd line to:
$myCusties = $customersApi->_list(200)->_embedded->customers;
However when I change _list(200) to _list(201) or a number greater than 201 it gives error.

I wonder if Dwolla is limited to 200 results when using the above code to call the customer list? If my list has more than 200, specifically if there are about 300 customers in the list. So how can I call all them in php?

Hi @devrentaraj , You can find more information on pagination in our docs here with the use of limit and offset query parameters. Essentially you’d want to loop through the entire list using limit and offset.


Given: 300 results. You can define: offset and limit. max limit is 200 results but I’d recommend doing a smaller limit (limit=25) to increase performance of that endpoint.

You’ll need multiple API calls, because you can only get 200 results at a time. This is how you could solve it:

Call 1:

Offset: 0
Limit: 25
// Returns results 0 to 25.

Call 2:

Offset: 25
Limit: [OPTIONAL] 25
// Returns results 25 to 50. 

You would continue to iterate through the entire list until the response returns 0 results.

Hi @spencer. Thanks for your support. Unfortunately it can’t call all in one API call, but it’s a good solution for me. Thank you very much!

Best regards,