Paginate Results
The Sibill APIs support pagination of results to handle responses with a large number of items through the use of a pagination cursor. The cursor represents a pointer to the current position in the list of results and is used to retrieve the next set of data.
By default, responses contain 25 items per page, but you can set a different number. The maximum number of items per page is 100, the minimum is 1. A cursor is required to scroll through all results.
How to use it
The first API call can be made without parameters to get the first results, while subsequent calls must include the cursor returned in the previous response.
Here is an example of how to use the cursor to get the next results for the GET /api/v1/companies/:company_id/documents endpoint:
GET /api/v1/companies/:company_id/documents?page_size=25
HTTP/1.1 200 Ok
Content-Type: application/json
{
"data":[
{
"created_at":"2025-03-06T08:21:37.999777Z",
"delivery_date":null,
"delivery_status":null,
"format":"FPR12",
"id":"aa5d3bb5-a8b8-4124-9ce1-47963b56c260",
"number":"document-number-ddonp",
"status":"CREATED",
"updated_at":"2025-03-06T08:21:37.999777Z"
},
...
],
"page":{
"cursor":"g3QAAAACdwJpZG0AAAAkYzg3ZTNiYmMtYzNhZi00ZmFjLThkNzYtNmE1MTgzMDRhYdw1pY3JvkYXJ3E0NQRjEyAA==",
"size":25
}
}
GET /api/v1/companies/:company_id/documents?page_size=25&cursor=g3QAAAACdwJpZG0AAAAkYzg3ZTNiYmMtYzNhZi00ZmFjLThkNzYtNmE1MTgzMDRhYdw1pY3JvkYXJ3E0NQRjEyAA==
HTTP/1.1 200 Ok
Content-Type: application/json
{
"data":[
{
"created_at":"2025-03-06T08:21:37.970759Z",
"delivery_date":null,
"delivery_status":null,
"format":"FPR12",
"id":"c87e3bbc-c3af-4fac-8d76-6a518304ab22",
"number":"document-number-kpygo",
"status":"CREATED",
"updated_at":"2025-03-06T08:21:37.970759Z"
},
...
],
"page":{
"cursor":"PDF6Z0A81MszpgYZV5zqkNNUhAsHXSyXZ+CdVcW+3+uOg9wGKAmMSDgKKZQJWfgO3loB/hsyiTYczy0Rk1mbrQ==",
"size":25
}
}