Developers
Pagination
Lists that can grow large use cursor pagination. Cursors stay correct while new records are added, unlike page numbers.
How it works
- Request the first page, optionally with
limit. - The response contains the records and a
nextCursor. - Pass
nextCursoras thecursorquery parameter to get the next page. Keep every other filter the same. - When
nextCursorisnull, you have reached the last page.
Treat cursors as opaque strings: don’t build or change them yourself.
curl "https://api.credchek.com/v1/products?limit=100" -H "X-Api-Key: $CREDCHECK_API_KEY"
# { "data": [ … ], "nextCursor": "3f1c…" }
curl "https://api.credchek.com/v1/products?limit=100&cursor=3f1c…" -H "X-Api-Key: $CREDCHECK_API_KEY"
# { "data": [ … ], "nextCursor": null }Paginated lists
| Endpoint | Records field | Default limit | Maximum limit |
|---|---|---|---|
GET /v1/products | data | 24 | 100 |
GET /v1/codes | data | 50 | 100 |
GET /v1/analytics/events | data | 50 | 100 |
GET /v1/fraud/alerts | items | 50 | 100 |
GET /v1/reports | items | 50 | 100 |
Short lists, such as a product’s batches and recent generation jobs, return { "data": [ … ] } without a cursor.
With the SDK
iterate() fetches pages as you loop, so you never handle cursors yourself:
for await (const product of cc.products.iterate()) {
console.log(product.sku, product.name);
}Mind your plan’s rate limit when iterating very large lists.