By default, all "List" endpoints will return 50 objects (subscriptions, buyers, payment transactions, etc.) per page. It will always return the first page with the most recent results and also a meta object with the current page information and total pages.
Every paginated response includes a meta object that describes the state of the collection: current is the page number you just received, pages is the total number of pages available for the current query, per_page is the number of records per page (always 50), and total_count is the total number of records matching your filters across all pages. To iterate the full result set, request successive pages until current equals pages, or until the returned data array is empty.
An example below:
https://api.staging.zafepay.com/api/v1/integration/buyers
{
"data": [
{
"id": "b7808fdb-11bb-4cf5-9da8-a0a33d16687a",
"created_at": "2024-01-30T19:25:22",
"email": "[email protected]",
"external_id": "8892811641119",
"name": "Blythe Woodard",
"updated_at": "2024-01-30T19:25:55"
},
...
{
"id": "6787bbf7-653f-48c1-a573-7cbbd1ca8bd3",
"created_at": "2024-01-07T16:08:37",
"email": "[email protected]",
"external_id": null,
"name": "Chase Rios",
"updated_at": "2024-01-07T16:08:37"
}
],
"meta": {
"current": 1,
"pages": 40,
"per_page": 50,
"total_count": 2000,
"next_page": 2,
"prev_page": null
}
}
An example using pagination:
https://api.staging.zafepay.com/api/v1/integration/buyers?page=2
{
"data": [
{
"id": "a70fdd5f-ec27-4345-b20f-05c92f4e7d46",
"created_at": "2024-01-30T18:38:57",
"email": "[email protected]",
"external_id": "8892666446111",
"name": "Lee Sherman",
"updated_at": "2024-01-30T18:41:09"
},
...
{
"id": "97c502c2-1da6-492b-a768-a978bb07adae",
"created_at": "2024-01-30T14:01:12",
"email": "[email protected]",
"external_id": "8891651064095",
"name": "Iliana Morrison",
"updated_at": "2024-01-30T14:02:48"
}
],
"meta": {
"current": 2,
"pages": 40,
"per_page": 50,
"total_count": 2000,
"next_page": 3,
"prev_page": 1
}
}