Pagination
Paginated list endpoints, such as GET /portal/domains and GET /portal/merchants, let you page through results with two query parameters.
Query parameters
| Name | Type | Description |
|---|---|---|
limit |
number (default 10) |
Number of results to return per page. |
page |
number (default 1) |
The page to return from the result set. |
GET /portal/domains and GET /portal/merchants accept a limit of up to 100. A larger value, or a page below 1, returns a 400 validation error.
Response
Paginated responses carry a meta object alongside result. current_page is always present. next_page is present only when more results are available, and prev_page only when you are past the first page.
{
"meta": {
"current_page": 2,
"next_page": 3,
"prev_page": 1
},
"result": []
}To fetch every result, keep requesting pages while meta.next_page is present. Use next_page, not the number of items returned, to decide whether another page exists.
Example
curl --request GET \ --url 'https://partners.clym.io/api/portal/domains?limit=30&page=2' \ --header 'Authorization: Bearer {YOUR_API_KEY}'
The same parameters and meta object apply to paginated instance endpoints such as GET /portal/instance/access/users.
