Pagination
How pagination works across Mesta API list endpoints.
Pagination
All list endpoints in the Mesta API support pagination. Use query parameters to control the page size and offset.
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
page | integer | 0 | Page number (0-indexed) |
pageSize | integer | 10 | Number of records per page |
sortBy | string | createdAt | Field to sort by (typically createdAt or updatedAt) |
sortOrder | string | DESC | Sort direction: ASC or DESC |
search | string | — | Free-text search query (where supported) |
Response Format
Paginated responses include metadata alongside the data array:
{
"data": [
{ "id": "...", "..." : "..." },
{ "id": "...", "..." : "..." }
],
"total": 47,
"page": 0,
"pageSize": 10
}| Field | Type | Description |
|---|---|---|
data | array | Array of records for the current page |
total | integer | Total number of records matching the query |
page | integer | Current page number |
pageSize | integer | Number of records per page |
Example
Fetch the second page of orders, 20 per page, sorted by most recent:
GET /v1/orders?page=1&pageSize=20&sortBy=createdAt&sortOrder=DESC
Endpoints Supporting Pagination
GET /v1/ordersGET /v1/sendersGET /v1/beneficiariesGET /v1/payment-methodsGET /v1/quotesGET /v1/webhooksGET /v1/external-eventsGET /v1/merchant-transactions
Updated 8 days ago
