We've successfully migrated our v2 QBO to v3 and after that on the production we got an issue from one of our customers. They have over 100 their customers in QBO account. And they want to copy them into our application. We implemented an import like this:
DataService service = getDataService(owner); // obtain DataService via Access Keys
List<com.intuit.ipp.data.Customer> customers =
service.findAll(new com.intuit.ipp.data.Customer());
for (com.intuit.ipp.data.Customer customer : customers) {
createCustomer(customer, owner); // this is our internal method to create
}
As mentioned in Class Library Reference - method findAll is a
Method to retrieve all records for the given entity.
But our customer is getting only first 100 entities (Customer's) from his QBO v3 account. And if he do the same import operation - he will get the same first 100 entities again. This method doesn't allow any pagination options.
So the question is, how to get all of the entities?
To fetch all of customers for a specified business, first you need to get their count, and then, as mentioned at the previous answer, get the customers by "take" method:
You should use Query endpoint with page filters.
The following query gets customers 1 - 10:
Output -
SELECT * FROM Customer STARTPOSITION 1 MAXRESULTS 10
The following query gets customers 21 - 25:
Ref - https://developer.intuit.com/docs/0025_quickbooksapi/0055_devkits/0201_ipp_java_devkit_3.0/0011_query_filters#Pagination
finally
Thanks