Concepts
Pagination
List endpoints use limit and offset
Reference
List endpoints return a pagination object with total, limit, offset, and has_more. Merchant list endpoints use limit and offset.
| Parameter | Default | Maximum |
|---|---|---|
limit | 20 | 100 |
offset | 0 | - |
Usage
Increase offset by the returned limit until has_more is false.
curl -G https://api.halfin.xyz/api/v1/invoices \
-H "X-API-Key: $HALFIN_API_KEY" \
--data-urlencode "limit=20" \
--data-urlencode "offset=0"import { createHalfin, listInvoices } from '@halfin/sdk-merchant';
const client = createHalfin({ apiKey: process.env.HALFIN_API_KEY });
const { data, meta } = await listInvoices({
client,
query: { limit: 20, offset: 0 },
});# Python SDK coming soon. Use the cURL example for now.Pitfalls
- Do not assume a list response contains every historical row.
- Keep filters stable while paginating.
Troubleshooting
Missing rows between pages usually means the filter or sort window changed while you were paginating. Restart the scan with the same filters.