Skip to main content

Pagination

All list endpoints in the Smartbills API return paginated results. The SDK provides a consistent SBListResponse<T> wrapper that includes both the data and pagination metadata.

Response structure

Basic usage

Pagination parameters

All list methods accept the following pagination parameters:

Example with sorting

Iterating through all pages

Manual pagination

Generic paginated iterator

Create a reusable helper for fetching all pages:

Async generator pattern

For memory-efficient processing of large datasets:

Checking for more pages

Pagination with filters

Filters and pagination work together. The pagination metadata reflects the filtered result set: