For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Get API key
HomeAPI Reference
HomeAPI Reference
  • Get started
    • Lucanto API
    • Quickstart
    • Authentication
    • Pagination
    • Idempotency
    • Errors
    • MCP server
  • Changelog
    • Changelog
Get API key
LogoLogo
On this page
  • Walking the pages
  • Parameters
  • Filtering
Get started

Pagination

Cursor-based paging on list endpoints

||View as Markdown|
Was this page helpful?
Edit this page
Previous

Authentication

Next

Idempotency

Built with

Every list endpoint returns a cursor-paginated envelope:

1{
2 "data": [ /* ... */ ],
3 "next_cursor": "eyJpZCI6MTIzfQ==",
4 "has_more": true
5}
  • data — the page of records.
  • next_cursor — an opaque base64 cursor for the next page (null on the last page).
  • has_more — true when more pages exist after this one.

Walking the pages

Call without a cursor to start, then pass the previous response’s next_cursor as the cursor query parameter until has_more is false:

$# First page
$curl "https://app.lucanto.eu/api/v1/accounts/{account_id}/invoices?limit=25" \
> -H "Authorization: Bearer lct_pat_xxx"
$
$# Next page
$curl "https://app.lucanto.eu/api/v1/accounts/{account_id}/invoices?limit=25&cursor=eyJpZCI6MTIzfQ==" \
> -H "Authorization: Bearer lct_pat_xxx"

Parameters

ParamDefaultMaxNotes
limit25100Items per page
cursor——Opaque; pass the previous next_cursor verbatim

Cursors are keyset-based (stable under inserts), so paging never skips or duplicates rows the way offset paging can. Treat the cursor as opaque — don’t decode or construct it yourself.

Filtering

Some list endpoints accept filters that compose with pagination, e.g. GET /contacts?q=acme (name search) and GET /expenses?extraction_status=completed.