Skip to main content

Pagination

All list endpoints return paginated results. The Sunset API supports both page-based and cursor-based pagination.

Page-Based Pagination

The default pagination method. Use query parameters to control the page, page size, and sort order.

Query Parameters

Example Request

Cursor-Based Pagination

For high-volume resources (transactions, balance history, phone calls), cursor-based pagination is recommended. It provides consistent results even when new records are added between requests.

How It Works

  1. Make your first request without a cursor:
  1. Use the cursor parameter for subsequent requests:

Cursor-Based (Python)

Filtering

Many list endpoints support additional query parameters for filtering. Check each endpoint’s documentation for available filters. Filters can be combined: