Pagination

For API calls that return arrays of objects it is possible to paginate the results using the query parameters url "limit" and "skip".

Example: let's imagine we have a list of 80-element objects, the first api will be done by requesting the first 50 elements "https://url-api?limit=50&skip=0" that is with limit to 50 we will receive the first 50 elements and with skip to 0 we indicate the starting point of the list.

The result of the API will be a list of 50 items:

{
"object": "list",
"data": [list of 50 items],
"has_more": true,
"count_api": 4,
"reset_count_api": 45
}

If the "has_more" return field is true it means that there is more data, and in "date" will be found the list of the first 50 elements .

To get the next elements you will have to make a new api in the format "https://url-api?limit=50&skip=50" where limit is the limit of elements that we want to have returned in the answer and skip is at 50 because we want to start from fifty-first element.

The result of the API will be a list of 30 elements starting from the fifty-first element:

{
"object": "list",
"data": [list of 30 items],
"has_more": false,
"count_api": 5,
"reset_count_api": 45
}

In this case we can see that the "has_more" field is false and therefore means that all elements have been returned.