Skip to main content

Pagination

Many endpoints in the Blinksale API return collections of resources, such as lists of clients, invoices, or estimates. To make these responses more manageable, the API uses pagination to split the results into smaller chunks.

How Pagination Works

For endpoints that support pagination, the following parameters can be used:

Requesting Paginated Data

To request paginated data, simply include the pagination parameters in your query string:
This request would retrieve the second page of clients, with 10 clients per page.

Pagination Response Structure

Paginated responses include metadata about the pagination state alongside the requested data. Here’s an example response structure:

Pagination Metadata

The pagination metadata includes: The response also includes helpful navigation links:

Handling Pagination in Your Application

When working with paginated resources, your application should:
  1. Make the initial request to the API endpoint
  2. Process the current page of results
  3. Check if there are more pages by looking at the next link
  4. If there are more pages and you need them, follow the next link to retrieve the next page
This approach allows you to efficiently navigate through large collections of data without overwhelming your application or the API server.