StackOne’s allows paginating on API requests that return multiple records using a page cursor.

The following optional URL parameters are used for pagination:

page_size
string
default:"25"

The number of records per page.

next
string

The next parameter is used to iterate through data pages.

It is recommended to keep the same page_size throughout the sequence of pagination requests otherwise unexpected behaviour may occur.

Sample URL

https://api.stackone.com/unified/hris/employees?page_size=25&next=eyJyIjphAsHHere

Sample Response

In the response payload, you can find the next cursor. To get the next page of data send a new request with the next parameter set to this value.

"next":"eyJyIjphAsHHere",
"data":[
   0: [...],
   1: [...],
   ...
   24: [...],
]

Once the cursor reaches the end of the data list, both values become NULL.

For further information see Guides - Pagination