Pagination
Our API provides some responses in paginated format.
Example response:
{
"paginate_info": {
"start": 0,
"items": 10,
"total_items": 20,
"total_pages": 2,
"links": {
"first": "None?offset=0&limit=10",
"previous": "None?offset=0&limit=10",
"next": "None?offset=10&limit=10",
"last": "None?offset=20&limit=10"
}
},
"data": [
{
"id": 7,
"updated_at": "2025-01-30T20:41:32.825545",
"created_at": "2025-01-30T20:41:32.825541",
"amount": 20100000.0,
"is_external": null,
"payment_reference": null,
"payment_receipt": null,
"recharge_group_id": 2,
"is_archived": false,
"status": "Pendiente",
"payment_method": null,
"payment_receipt_filename": null,
"payment_link_code": "y150b38268e3"
},
{
"id": 8,
"updated_at": "2025-01-30T20:52:31.133033",
"created_at": "2025-01-30T20:52:31.133029",
"amount": 22110000.0,
"is_external": null,
"payment_reference": null,
"payment_receipt": null,
"recharge_group_id": 2,
"is_archived": false,
"status": "Pendiente",
"payment_method": null,
"payment_receipt_filename": null,
"payment_link_code": "auyyxdgom3i3"
},
{
"id": 9,
"updated_at": "2025-01-30T20:53:08.351928",
"created_at": "2025-01-30T20:53:08.351923",
"amount": 22110000.0,
"is_external": null,
"payment_reference": null,
"payment_receipt": null,
"recharge_group_id": 2,
"is_archived": false,
"status": "Pendiente",
"payment_method": null,
"payment_receipt_filename": null,
"payment_link_code": "j0ez6mnuud7z"
},
{
"id": 10,
"updated_at": "2025-01-30T20:54:54.958639",
"created_at": "2025-01-30T20:54:54.958634",
"amount": 22110000.0,
"is_external": null,
"payment_reference": null,
"payment_receipt": null,
"recharge_group_id": 2,
"is_archived": false,
"status": "Pendiente",
"payment_method": null,
"payment_receipt_filename": null,
"payment_link_code": "wbfdycxw186j"
},
{
"id": 11,
"updated_at": "2025-01-30T20:56:36.096496",
"created_at": "2025-01-30T20:56:36.096491",
"amount": 22110000.0,
"is_external": null,
"payment_reference": null,
"payment_receipt": null,
"recharge_group_id": 2,
"is_archived": false,
"status": "Pendiente",
"payment_method": null,
"payment_receipt_filename": null,
"payment_link_code": "0uha4fymo533"
},
{
"id": 12,
"updated_at": "2025-01-30T20:56:49.637932",
"created_at": "2025-01-30T20:56:49.637927",
"amount": 4680000.0,
"is_external": null,
"payment_reference": null,
"payment_receipt": null,
"recharge_group_id": 2,
"is_archived": false,
"status": "Pendiente",
"payment_method": null,
"payment_receipt_filename": null,
"payment_link_code": "kx083hy4hdvw"
},
{
"id": 13,
"updated_at": "2025-01-30T20:56:59.657589",
"created_at": "2025-01-30T20:56:59.657584",
"amount": 1000000.0,
"is_external": null,
"payment_reference": null,
"payment_receipt": null,
"recharge_group_id": 2,
"is_archived": false,
"status": "Pendiente",
"payment_method": null,
"payment_receipt_filename": null,
"payment_link_code": "cvtg4ms7c3nj"
},
{
"id": 14,
"updated_at": "2025-01-30T20:57:12.812623",
"created_at": "2025-01-30T20:57:12.812617",
"amount": 51700000.0,
"is_external": null,
"payment_reference": null,
"payment_receipt": null,
"recharge_group_id": 2,
"is_archived": false,
"status": "Pendiente",
"payment_method": null,
"payment_receipt_filename": null,
"payment_link_code": "x1cp35m7s6bi"
},
{
"id": 15,
"updated_at": "2025-01-30T21:13:14.362747",
"created_at": "2025-01-30T21:13:14.362742",
"amount": 5000000.0,
"is_external": null,
"payment_reference": null,
"payment_receipt": null,
"recharge_group_id": 2,
"is_archived": false,
"status": "Pendiente",
"payment_method": null,
"payment_receipt_filename": null,
"payment_link_code": "u0lwhli3bwlq"
},
{
"id": 16,
"updated_at": "2025-01-30T22:08:25.315429",
"created_at": "2025-01-30T22:08:25.280550",
"amount": 200000.0,
"is_external": null,
"payment_reference": null,
"payment_receipt": null,
"recharge_group_id": 2,
"is_archived": false,
"status": "Aplicado",
"payment_method": null,
"payment_receipt_filename": null,
"payment_link_code": null
}
]
}
Pagination Fields
paginate_info:- start: The starting point of the current page.
- items: The number of items on the current page.
- total_items: The total number of items available.
- total_pages: The total number of pages available.
- links: A set of pagination links:
first: Link to the first page.previous: Link to the previous page.next: Link to the next page.last: Link to the last page.
Pagination Parameters
The pagination system accepts the following parameters:
offset: The starting point of the list to retrieve.limit: The number of items to retrieve on each page.
Example Request
GET [BASE_URL]?limit=20&offset=0
Filter by Attributes
Our API allows you to filter data using specific parameters in the URL.
Filter Parameter
To apply filters, you can use the filters parameter in the URL. The syntax is as follows:
GET [BASE_URL]?filters={attribute}{comparator}{value_to_filter}
Available comparators:
==: Equal to.>=: Greater than or equal to.<=: Less than or equal to.%%: Alike (partial match).
Filter Examples
Filter by id
To get items where the id is equal to 15:
GET [BASE_URL]?filters=id==15
Example Request
{
"paginate_info": {
"start": 0,
"items": 10,
"total_items": 1,
"total_pages": 1,
"links": {
"first": "None?offset=0&limit=10",
"previous": "None?offset=0&limit=10",
"next": "None?offset=10&limit=10",
"last": "None?offset=10&limit=10"
}
},
"data": [
{
"id": 15,
"updated_at": "2025-01-30T21:13:14.362747",
"created_at": "2025-01-30T21:13:14.362742",
"amount": 5000000.0,
"is_external": null,
"payment_reference": null,
"payment_receipt": null,
"recharge_group_id": 2,
"is_archived": false,
"status": "Pendiente",
"payment_method": null,
"payment_receipt_filename": null,
"payment_link_code": "u0lwhli3bwlq"
}
]
}
Filter by status
GET [BASE_URL]?filters=status==Aplicado
Example Response
{
"paginate_info": {
"start": 0,
"items": 10,
"total_items": 4,
"total_pages": 1,
"links": {
"first": "None?offset=0&limit=10",
"previous": "None?offset=0&limit=10",
"next": "None?offset=10&limit=10",
"last": "None?offset=10&limit=10"
}
},
"data": [
{
"id": 16,
"updated_at": "2025-01-30T22:08:25.315429",
"created_at": "2025-01-30T22:08:25.280550",
"amount": 200000.0,
"is_external": null,
"payment_reference": null,
"payment_receipt": null,
"recharge_group_id": 2,
"is_archived": false,
"status": "Aplicado",
"payment_method": null,
"payment_receipt_filename": null,
"payment_link_code": null
},
{
"id": 24,
"updated_at": "2025-01-31T16:09:34.446582",
"created_at": "2025-01-31T16:09:34.398645",
"amount": 200000.0,
"is_external": true,
"payment_reference": "BC3453",
"payment_receipt": "preloaded-balance/55cb7af8-54b0-4e3a-b971-e13204d3256d.pdf",
"recharge_group_id": 2,
"is_archived": false,
"status": "Aplicado",
"payment_method": "BANCOMBIABANO",
"payment_receipt_filename": "prueba.pdf",
"payment_link_code": null
},
{
"id": 25,
"updated_at": "2025-01-31T16:10:03.967778",
"created_at": "2025-01-31T16:10:03.942378",
"amount": 200000.0,
"is_external": true,
"payment_reference": "BC3453",
"payment_receipt": "preloaded-balance/8ff796e4-a23d-48ae-a3fb-8562bde68e65.pdf",
"recharge_group_id": 2,
"is_archived": false,
"status": "Aplicado",
"payment_method": "BANCOMBIABANO",
"payment_receipt_filename": "prueba.pdf",
"payment_link_code": null
},
{
"id": 26,
"updated_at": "2025-01-31T16:12:26.221588",
"created_at": "2025-01-31T16:12:26.183252",
"amount": 200000.0,
"is_external": true,
"payment_reference": "BC3453",
"payment_receipt": "preloaded-balance/95fee795-a6c8-49fd-b174-b8296e74c74b.pdf",
"recharge_group_id": 2,
"is_archived": false,
"status": "Aplicado",
"payment_method": "BANCOMBIABANO",
"payment_receipt_filename": "prueba.pdf",
"payment_link_code": null
}
]
}
Using sorters to Order Information
You can use sorters to order the information:
-
To sort ascending by a field, use:
?sorters=field -
To sort descending, use:
?sorters=-field
Example of using sorters:
GET [BASE_URL]?sorters=amount
Combining Filters and Sorting
You can combine filters with sorting. Example:
GET [BASE_URL]?limit=20&offset=0&filters=holding_id==1&sorters=-payment_date
This means:
limit=20: limit of 20 items.offset=0: offset of 0.filters=hotel.company.holding_id==1: filter byholding_id.sorters=-payment_date: sort bypayment_datein descending order.