Skip to Content
Core ConceptsPagination

Pagination

All list endpoints return paginated results using offset-based pagination.

Query parameters

ParameterTypeDefaultDescription
pagenumber1Page number (1-indexed)
limitnumber20Items per page (max 100)
sortBystringvariesField to sort by
sortOrderstringDESCASC or DESC

Response format

Paginated responses include a pagination object in the meta envelope:

{ "meta": { "statusCode": 200, "success": true, "errors": [], "message": "Success", "pagination": { "total": 150, "page": 1, "pageSize": 20, "totalPages": 8, "hasNext": true, "hasPrevious": false }, "timestamp": "2026-04-30T10:00:00.000Z" }, "data": [] }
FieldTypeDescription
totalnumberTotal items across all pages
pagenumberCurrent page number
pageSizenumberItems per page
totalPagesnumberTotal number of pages
hasNextbooleanWhether a next page exists
hasPreviousbooleanWhether a previous page exists

REST example

bash
curl "https://gp.useyona.com/i/v1/invoices?page=2&limit=10&sortBy=createdAt&sortOrder=DESC" \
  -H "Authorization: Bearer sk_test_your_key_here"

Iterating all pages

Read meta.pagination.hasNext and increase page until it is false. Use the largest limit the endpoint allows, 100, to keep the number of requests down.

Endpoints that support pagination

All list endpoints across the API use the same pagination format: invoices, sellers, buyers, webhooks, webhook deliveries, API keys, users, invitations, roles, payment history, credit transactions, and subscription history.