Pagination
How to paginate through list endpoints in the Nevuto API.
All list endpoints return paginated results using cursor-based pagination.
Request Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
limit | integer | 20 | Number of items per page (max 100) |
cursor | string | — | Cursor for the next page |
Response
{
"data": [ ... ],
"meta": {
"hasMore": true,
"nextCursor": "cur_abc123"
}
}
Example
let cursor = undefined
let allProducts = []
do {
const response = await client.products.list({
storeId: 'store_abc123',
limit: 50,
cursor,
})
allProducts.push(...response.data)
cursor = response.meta.hasMore ? response.meta.nextCursor : undefined
} while (cursor)