I am trying to make a GET call to the Magento 2 REST API to get all the sales orders. What is the recommended page size I should be using? Is there any upper limit on the page size?

  • "Is there any upper limit on the page size" i don't think so. but use minimal to speed up process. – Minesh Patel Feb 1 '16 at 10:31
  • It really depends on your app... pick a lower number to start with (eg. 20). if you need to just increase it later.. you could also provide a dropdown where the user can select the preferred amount. – Mackelito Aug 19 '16 at 11:34

Page size is not limited by Magento. However, at some Page sizes your Magento instance will start running out of memory and will not be able to process the request. The limit obviously depends on your hardware.

There are two options:

  1. Implement proper pagination on your application with configurable
    page size
  2. Try "Infinite scroll". This approach may not work
    perfectly on instances with frequently created orders, because
    Magento REST API does not support cursor-based pagination (which is designed for such scenarios)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.