Skip to main content

Pagination

List endpoints in the ConsentForge API use cursor-based pagination. This ensures stable, consistent results even when new records are added while you're paginating.

Request parameters

ParameterTypeDefaultDescription
limitinteger50Number of results per page (max 500)
cursorstringCursor from the previous response's next_cursor field

Response format

All list endpoints return a consistent envelope:

{
"data": [...],
"meta": {
"total": 12483,
"limit": 50,
"next_cursor": "cur_eyJpZCI6InJlY18wMTkzIn0",
"has_more": true
}
}
FieldDescription
dataArray of results for this page
meta.totalTotal matching records (approximate for large sets)
meta.limitThe limit applied to this page
meta.next_cursorOpaque cursor — pass as cursor on the next request
meta.has_moretrue if more pages exist

When has_more is false, you have reached the last page.

Example: paginating receipts

GET /api/v1/receipts?property_id=prop_abc&limit=100
Authorization: Bearer cf_api_live_YOUR_TOKEN

Response:

{
"data": [
{
"id": "rec_0001",
"property_id": "prop_abc",
"timestamp": "2026-03-09T12:00:00Z",
"choices": { "analytics": true, "marketing": false },
"policy_version": 3
}
],
"meta": {
"total": 8201,
"limit": 100,
"next_cursor": "cur_eyJpZCI6InJlY18wMTAwIn0",
"has_more": true
}
}

Fetch the next page:

GET /api/v1/receipts?property_id=prop_abc&limit=100&cursor=cur_eyJpZCI6InJlY18wMTAwIn0
Authorization: Bearer cf_api_live_YOUR_TOKEN

Code example: fetch all pages

async function fetchAllReceipts(propertyId, apiKey) {
const results = [];
let cursor = null;

do {
const params = new URLSearchParams({ property_id: propertyId, limit: '500' });
if (cursor) params.set('cursor', cursor);

const res = await fetch(`https://api.consentforge.com/api/v1/receipts?${params}`, {
headers: { Authorization: `Bearer ${apiKey}` }
});
const page = await res.json();

results.push(...page.data);
cursor = page.meta.has_more ? page.meta.next_cursor : null;
} while (cursor);

return results;
}

Paginated endpoints

EndpointDefault limitMax limit
GET /api/v1/receipts50500
GET /api/v1/properties50100
GET /api/v1/vendors100500
GET /api/v1/webhooks50100
GET /api/v1/scan-findings100500

Filtering

Most list endpoints support filtering. Filters combine with pagination:

GET /api/v1/receipts?property_id=prop_abc&from=2026-01-01T00:00:00Z&to=2026-02-01T00:00:00Z&limit=100

Common filter parameters:

ParameterTypeDescription
fromISO 8601Filter records after this timestamp
toISO 8601Filter records before this timestamp
property_idstringScope to a specific property
user_idstringScope to a specific user hash
eventstringFilter by event type (webhooks)