Pagination

You don't want 400,000 items all at once? Paginate!

All our Building Blocks have support for bulk fetches via “list” API methods, e.g. you can list Orders, Users, Payments, Subscriptions, etc. They all share a common structure, taking at least two parameters: size and page.

We use pagination based on a page size and current page. With these parameters, you can retrieve the data the way you want and display it using your own pagination scheme. The return of a response header contains the total count, e.g.: X-Pagination-Total: 212.

Example request using size and page:

GET /orders?size=10&page=1 HTTP/1.1
Content-Type: application/json
Authorization: Bearer <jwt>
X-Builton-Api-Key: <builton-api-key>
Host: api.builton.dev

You can find an example on using pagination with the Core SDK and the Node SDK here.

The more items you fetch at once, the slowest the response will be.

Last updated