Pagination


Pagination

The documentation explains how pagination is implemented in Skalin APIs.

Info

Skalin offers pagination for most of our API’s list endpoints like Customers, Contacts, Agreements and Tasks.

# Setting up offset pagination

With the rest of our GET endpoints, we offer offset-based pagination. The parameters that control this type of pagination are page and size, indicating the desired offset and the number of items to be returned per page.

page integer Pagination page index. If omitted, the default value is 1.
size integer The maximum number of items returned per page. If not provided, 100 items will be returned.

# Dealing with response API

Within the response’s metadata object, a pagination object will be returned. The metadata.pagination object will contain the given page and size values, as well as the total and hasNextPage flag, indicating whether more items can be fetched after the current query.

The maximum size limit value is 500.

API response with pagination metadata

{
  "status": "success",
	"metadata": {
		"pagination": {
			"size": 50,
			"page": 2,
			"total": 82,
            "hasNextPage": false
		}
	},
	"data": [
		{
      ...
    }
  ]
};
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Contributors: Julien