Pagination
Introduction
When retrieving large datasets from the Passport API, pagination ensures optimized performance and efficient data handling. This guide explains how the pagination_info object is structured and how to implement pagination in API requests.
Pagination Overview
Pagination helps manage large sets of results by breaking them into smaller, more manageable pages. The pagination_info
object provides metadata about the paginated response.
Example of Pagination Response
"pagination_info": {
"total_elements": 21,
"first_request_timestamp": "2023-03-29T02:12:15",
"total_pages": 2,
"current_page": 1
}
Pagination Objects Fields
Field | Type | Description |
---|---|---|
total_elements | Integer | The total number of items available across all pages. |
first_request_timestamps | String (ISO 8601) | The timestamp when the initial request was made. |
total_pages | Integer | The total number of pages available. |
current_page | Integer | The page number of the current response. |
The API automatically calculates the total number of pages based on the number of elements and the page size.
Requesting Paginated Data
To request paginated data, include supported pagination parameter in the request:
Example Request
3
3
curl --location 'https://api.paas-sandbox.co.passportfintech.com/accounts' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN'
All endpoints (GET) will always return a pagination object.
Example of Response
52
52
{
"accounts": [
{
"created_at": "2025-02-27T12:00:41.881Z",
"updated_at": "2025-02-27T12:00:35.772Z",
"customer_id": "caa846a4-5b72-406e-915d-ff617980309a",
"account_number": "880830185",
"fintech_id": "d894358e-f62a-4d38-a83b-d0892f97d258",
"available_balance": {
"currency": "COP",
"value": "90000000000000000"
},
"bank_id": "18db9d09-c6b5-4484-add6-6edea2a1ad8e",
"pending_balance": {
"currency": "COP",
"value": "0"
},
"account_name": "Individual Low Value Account",
"bank_name": "BANCO COOPERATIVO COOPCENTRAL",
"account_status": "ACTIVE",
"account_id": "f8e5fe47-3f91-4338-a764-71fcc7e9c707",
"account_type": "LOW_VALUE"
},
{
"created_at": "2025-02-27T15:47:28.282Z",
"updated_at": "2025-02-27T15:47:24.233Z",
"customer_id": "d9782bf2-5a7d-47fa-9ae7-18b33e6869e6",
"account_number": "880360913",
"fintech_id": "d894358e-f62a-4d38-a83b-d0892f97d258",
"available_balance": {
"currency": "COP",
"value": "90000000000000000"
},
"bank_id": "18db9d09-c6b5-4484-add6-6edea2a1ad8e",
"pending_balance": {
"currency": "COP",
"value": "0"
},
"account_name": "Individual Low Value Account",
"bank_name": "BANCO COOPERATIVO COOPCENTRAL",
"account_status": "ACTIVE",
"account_id": "63219dec-7f5d-4065-910f-f4ad60a5dd16",
"account_type": "LOW_VALUE"
}
],
"pagination_info": {
"total_pages": 2,
"total_elements": 4,
"first_request_timestamp": "2025-03-06T13:08:40.510Z",
"current_page": 1
}
}