Skip to navigation

Pagination

Working with paginated list endpoints

List endpoints (GET /receipts, GET /audit/log, GET /billing/trusted-events) return paginated results. The SDKs expose auto-paginating iterators so you don’t need to manage page tokens manually.

Python — iterate all results

# Iterates all pages automatically
for receipt in client.receipts.list():
print(receipt.receipt_id)

Python — page-by-page

pager = client.receipts.list(per_page=50)
for page in pager.iter_pages():
print(f"Page has {len(list(page))} receipts")

TypeScript — async iterator

const pager = await client.receipts.list({ per_page: 50 });
for await (const receipt of pager) {
console.log(receipt.receipt_id);
}

TypeScript — page-by-page

const pager = await client.receipts.list();
for await (const page of pager.iterPages()) {
console.log(page.items);
}

Filtering

All list endpoints accept page and per_page query parameters. GET /receipts also supports filtering by compliance_verdict, date ranges, agent_id, and tenant_id — see the API Reference for the full parameter list.