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:| Parameter | Description | Default |
|---|---|---|
per_page | Number of items to return per page | 15 |
page | Page number to retrieve | 1 |
Requesting Paginated Data
To request paginated data, simply include the pagination parameters in your query string: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:| Field | Description |
|---|---|
current_page | The current page number |
from | The index of the first item on the current page |
last_page | The total number of pages |
path | The base URL for the paginated resource |
per_page | The number of items per page |
to | The index of the last item on the current page |
total | The total number of items across all pages |
Navigation Links
The response also includes helpful navigation links:| Link | Description |
|---|---|
first | URL to the first page |
last | URL to the last page |
prev | URL to the previous page (null if on first page) |
next | URL to the next page (null if on last page) |
Handling Pagination in Your Application
When working with paginated resources, your application should:- Make the initial request to the API endpoint
- Process the current page of results
- Check if there are more pages by looking at the
nextlink - If there are more pages and you need them, follow the
nextlink to retrieve the next page

