Pagination

In Ordering API there are requests that bring large amounts of data such as businesses, products, orders or users that can be an array of thousands or millions of objects that make the request heavy and consequently slow. For this our team has added that the data can be bounded with two simple parameters:

  • limit: This parameter is an integer, it serves to mark up to where you want to obtain data, that is, this limit that is set for the data that we want to obtain. For example, if the request in order, is placed limit: 100 all the orders will be obtained from the beginning until the order number 100.

  • offset: This parameter is an integer, it serves to mark a lower limit, that is, from where the data is wanted until the last existing data. example: suppose we have 200 orders and we make the request with offset: 100 then the answer will come from order 101 to order 200.

  • start: This parameter is an integer, it serves to mark a lower limit, that is, from where the data is wanted until the last existing data. example: suppose we have 200 orders and we make the request with offset: 100 then the answer will come from order 100 to order 200.

By combining these two parameters you can create pagination or lazy loading to obtain data by blocks, thus making the response of requests faster and lighter.

📘

As the main function of Ordering is Make an order, this makes the orders are the largest data, so to paginate we have a special resource that is Orders Dashboard