Pagination
API responses that return lists are always paginated. Results appear in an items array, with pagination details in a pagination object.
Pagination parameters
Use the page and per_page parameters to control which set of results you receive and how many items are returned per page.
- Name
page- Type
- positive integer
- Description
The page number you want to retrieve (default: 1).
- Name
per_page- Type
- positive integer
- Description
The number of items to return per page (default: 10, max: 100).
Example paginated request
curl -G https://sandbox.orchestrate.global/api/v1/payments \
-H "Authorization: Bearer $ORCHESTRATE_API_KEY" \
-d page=2 \
-d per_page=10
Pagination metadata
The following properties are returned in the pagination object:
- Name
page- Type
- integer
- Description
The current page number being returned.
- Name
per_page- Type
- integer
- Description
The number of items returned per page.
- Name
total_pages- Type
- integer
- Description
The total number of pages available.
- Name
total_items- Type
- integer
- Description
The total number of items across all pages.
Paginated response
{
"items": [
{
"id": "WAz8eIbvDR60rouK",
// ... payment details
},
{
"id": "hSIhXBhNe8X1d8Et",
// ... payment details
}
// ... more items
],
"pagination": {
"page": 2,
"per_page": 10,
"total_pages": 5,
"total_items": 50
}
}