Skip to Content
Core ConceptsPagination

Pagination

A paged list takes page and limit and answers one page, with meta.pagination saying where it sits. The default limit, the largest, and how the list sorts differ from list to list; the table below gives them, and each operation in the API Reference lists its own parameters.

Query parameters

ParameterTypeDefaultDescription
pagenumber1Page number, from 1
limitnumberPer list, belowItems per page; at most 100 unless the table says less

Only the invoice list takes sortBy and sortOrder. Three lists take a single sort, with a leading - for descending. The other lists have a fixed order.

ListDefault limit (largest)Sort
GET /i/v1/invoices20 (100)sortBy: createdAt (default), invoiceDate, invoiceNumber, payableMinor, dueDate, taxMinor; sortOrder: DESC (default) or ASC
GET /i/v1/items20 (100)sort: -useCount (default), name, -lastUsedAt
GET /i/v1/inbound-invoices25 (100)sort: -receivedAt (default), receivedAt, issueDate, -issueDate, amount, -amount
GET /i/v1/inbound-invoices/history-runs10 (50)Fixed
GET /i/v1/buyers, GET /i/v1/sellers, GET /i/v1/invoices/hsn-codes20 (100)Fixed
GET /n/v1/webhook-events, GET /n/v1/webhook-deliveries20 (100)Fixed
GET /b/v1/transactions, GET /b/v1/sandbox/transactions, GET /b/v1/payments/history, GET /b/v1/subscriptions/history, GET /b/v1/subscriptions/renewals50 (100)Fixed
GET /a/v1/organizations/me/children, GET /a/v1/organizations/me/children/readiness100 (100)Fixed
For signed-in users: an organization’s API keys, members and invitations20 (100)Fixed

Three searches take limit but no page: GET /i/v1/buyers/search and GET /i/v1/sellers/search (10 by default, at most 20) and GET /i/v1/invoices/codes/used (20 by default, at most 100).

These lists are not paged and answer everything at once: GET /n/v1/webhook-endpoints, GET /n/v1/webhook-event-types, an organization’s roles, an invoice’s share links (GET /i/v1/invoices/{id}/share-links), the code lists (GET /i/v1/invoices/resources), GET /i/v1/invoices/hsn-codes/categories and GET /i/v1/tax-connection/children.

Response format

A paged response includes a pagination object in the meta envelope:

{ "meta": { "statusCode": 200, "success": true, "message": "Success", "errors": [], "pagination": { "total": 150, "page": 1, "pageSize": 20, "totalPages": 8, "hasNext": true, "hasPrevious": false }, "timestamp": "2026-10-01T10:00:00.000Z", "requestId": "01K6P3Z0X7Q4N2M8R9V1T5B3Y7" }, "data": [] }
FieldTypeDescription
totalnumberTotal items across all pages
pagenumberCurrent page number
pageSizenumberItems per page (the limit you sent, or the list’s default)
totalPagesnumberTotal number of pages; 0 when the list is empty
hasNextbooleanWhether a next page exists
hasPreviousbooleanWhether a previous page exists

data is the page’s array, except on the received-invoice lists: GET /i/v1/inbound-invoices answers an object with the page in data.items beside taxpayer and sync, and GET /i/v1/inbound-invoices/history-runs one with the page in data.items beside the active retrieval.

The schema also names nextPage, previousPage and currentPage. They are reserved for links, and no list sends them: page with page and hasNext.

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 list allows, usually 100, to keep the number of requests down.