Our APIs use pagination to divide datasets into smaller, manageable pages.
Efficiently managing large datasets is crucial for maintaining API performance and scalability. Our APIs employ a robust pagination mechanism to deliver data in smaller, manageable portions. This improves response times and client-side processing, particularly for applications that load results incrementally.
Pagination in Our APIs
Instead of returning the entire dataset in a single response, which can strain resources, clients can request specific subsets of data. This improves response times and enables smoother data handling, particularly for applications that load results incrementally.
We support two query parameters for pagination:
page
(integer): Specifies the page number to retrieve. The default value is1
.- Negative values are invalid and will result in an error.
limit
(integer): Defines the maximum number of items per page. The default value is10
.
For example, to retrieve the first page of organizations with a maximum of 10 items per page:
GET /v1/organizations?page=1&limit=10
Pagination Response
The pagination response includes the following structure:
items
: An array of entities retrieved for the current page. Each object contains detailed information about the resource requested, as shown in the example below.page
: The current page number, starting from1
(default).limit
: The maximum number of items included in the response, as defined in the request or default configuration.
Below is an example response for a paginated request:
{
"items": [
{
"id": "0193696f-8eff-7926-a77a-0b424cf7156b",
"parentOrganizationId": null,
"legalName": "Collins Inc",
"doingBusinessAs": "The ledger.io",
"legalDocument": "78425230000190",
"address": {
"line1": "Avenida Paulista, 1234",
"line2": "CJ 203",
"zipCode": "01310916",
"city": "New Lyla",
"state": "CH",
"country": "FO"
},
"status": {
"code": "ACTIVE",
"description": "Ledger Test"
},
"createdAt": "2024-11-26T17:05:39.071587Z",
"updatedAt": "2024-11-26T17:05:39.071587Z",
"deletedAt": null,
"metadata": {
"bitcoinn": "3QH2XV7JxMRKXDqh87JG7LWuf7AeGfy",
"boolean": true,
"chave": "metadata_chave",
"double": 10.5,
"int": 1
}
}
],
"page": 1,
"limit": 1
}