Pagination & rate limits
Cursor pagination
Section titled “Cursor pagination”List endpoints return:
{ "data": [ … ], "nextCursor": "eyJpZCI6ImJ0eF8wMUpEN…" }limit: 1–100 (default 25).- Send
cursor=<nextCursor>for the next page.nextCursor: null= done. - Newest first; records created while you page through never cause duplicates or gaps.
let cursor = nulldo { const url = new URL('https://api.hensa.example/v1/bank_transactions') url.searchParams.set('limit', '100') if (cursor) url.searchParams.set('cursor', cursor) const page = await (await fetch(url, { headers: { Authorization: `Bearer ${process.env.HENSA_API_KEY}` } })).json() for (const tx of page.data) handle(tx) cursor = page.nextCursor} while (cursor)Rate limits
Section titled “Rate limits”Hensa limits requests per API key and per store. Going over → 429 rate_limited with a Retry-After header (seconds). Wait that long, then retry.
Tip: use webhooks instead of polling to learn about incoming money – faster and free of rate limits.