Skip to main content

Overview

All list endpoints return paginated results. The Anton API uses cursor-based pagination with limit and cursor query parameters.

Parameters

ParameterTypeDefaultMaxDescription
limitinteger20100Number of items to return
cursorstringOpaque cursor from a previous response. Omit to start from the beginning.

Response format

Every list response includes a has_more boolean. When has_more is true, a next_cursor string is also present:
{
  "data": [
    { "id": "pay_abc123", "status": "completed", "amount": "500.00" },
    { "id": "pay_def456", "status": "processing", "amount": "1200.00" }
  ],
  "has_more": true,
  "next_cursor": "pay_def456"
}
FieldDescription
dataArray of results for this page
has_moretrue if more results exist beyond this page
next_cursorCursor to pass in the next request. Only present when has_more is true.
When you reach the last page, has_more is false and next_cursor is not included:
{
  "data": [
    { "id": "pay_xyz789", "status": "completed", "amount": "300.00" }
  ],
  "has_more": false
}

Iterating through pages

Pass the next_cursor value from each response as the cursor parameter in the next request:
# First page
curl "https://api.antonpayments.dev/v1/payouts?limit=20" \
  -H "Authorization: Bearer ak_test_..."

# Next page (using next_cursor from previous response)
curl "https://api.antonpayments.dev/v1/payouts?limit=20&cursor=pay_def456" \
  -H "Authorization: Bearer ak_test_..."

Tips

Set limit=100 to minimize the number of API calls when fetching all items.
The has_more field tells you whether another page exists. When it is false, you have reached the end of the result set.
Treat cursor values as opaque strings. Do not parse, modify, or construct them. Always use the exact next_cursor value returned by the API.
Cursor values remain valid indefinitely. You can store a cursor and resume pagination later.