{
"data": [{ "id": "…" }, { "id": "…" }],
"nextCursor": "0199ed2a-6b1e-7c40-9a3f-1d2e8b4c7a10"
}limit: items per page, 1 to 100. Each endpoint has its own default (10 to 50).cursor: thenextCursorof the previous page. Leave it out for the first page.nextCursorisnullon the last page.
Treat cursors as opaque strings: their format differs per endpoint and may change.
# First page
curl "https://api.malla.fun/customers?limit=100" -H "Authorization: Bearer $MALLA_API_KEY"
# Next page
curl "https://api.malla.fun/customers?limit=100&cursor=NEXT_CURSOR" -H "Authorization: Bearer $MALLA_API_KEY"let cursor: string | undefined
do {
const page = await malla.customers.list({ limit: 100, cursor })
for (const customer of page.data)
console.log(customer.name)
cursor = page.nextCursor ?? undefined
} while (cursor)Auto-pagination
The SDK's iterate() methods fetch pages as your loop consumes them, so you can stop early without loading everything:
for await (const order of malla.orders.iterate({ status: 'paid', limit: 100 })) {
if (order.createdAt < '2026-01-01')
break
await exportOrder(order)
}