Using Cursor-Based Pagination
Our API uses cursor-based pagination to handle large collections of data efficiently for alpha index endpoints.
How It Works
Each paginated response includes the results and pagination metadata:
{
"items": [...],
"has_more": true,
"next_cursor": "eyJpZCI6MTAwfQ=="
}
Making Requests
Initial Request
Make your first request without a cursor:
GET /api/external/v2/customer_invoices
You can specify the number of results per page using the limit parameter:
GET /api/external/v2/customer_invoices?limit=50
Note: The default limit is 20. Maximum limit varies by endpoint - refer to the specific endpoint documentation.
Subsequent Pages
To get the next page, use the next_cursor value from the previous response:
GET /api/external/v2/customer_invoices?cursor=eyJpZCI6MTAwfQ==&limit=50
Understanding the Response
items
: Contains the current page of resultshas_more
: Indicates if more results are availablenext_cursor
: Used to retrieve the next page- Present and non-empty when more results exist
- Empty string ("") when you've reached the end
Important Notes
- Cursors are temporary and should not be stored for long-term use
- Invalid cursors will result in a 400 Bad Request response
- Using a consistent
limit
value across requests is recommended - Check each endpoint's documentation for its specific maximum limit
Updated 1 day ago