Skip to main content

Overview

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

Parameters

ParameterTypeDefaultMaxDescription
limitinteger20100Number of items per page
offsetinteger0Number of items to skip

Response format

Every list response includes a pagination object:
{
  "data": [
    { "id": "pay_abc123", "status": "completed", "amount": "500.00" },
    { "id": "pay_def456", "status": "processing", "amount": "1200.00" }
  ],
  "pagination": {
    "total": 142,
    "limit": 20,
    "offset": 0
  }
}
FieldDescription
totalTotal number of items matching your query
limitItems per page (echoes your request)
offsetCurrent offset (echoes your request)

Iterating through pages

To get the next page, increment offset by limit:
# Page 1
curl "https://api.antonpayments.com/v1/payouts?limit=20&offset=0" \
  -H "Authorization: Bearer ak_test_..."

# Page 2
curl "https://api.antonpayments.com/v1/payouts?limit=20&offset=20" \
  -H "Authorization: Bearer ak_test_..."

# Page 3
curl "https://api.antonpayments.com/v1/payouts?limit=20&offset=40" \
  -H "Authorization: Bearer ak_test_..."

Tips

Set limit=100 to minimize the number of API calls when fetching all items.
The total field tells you how many pages you’ll need. Use it to display progress or estimate completion time.
Stop when offset + limit >= total. Requesting an offset beyond the total returns an empty data array.