Pagination

The Gigapay API uses pagination on all of its list-endpoints. These endpoints all share a common structure, optionally accepting pageand a page_size request parameter. page which page to return and page_size the number of objects per page. The objects returned are contained within the resultfield of the response.

For instance, to list two Employees per page, the request would look like this:

curl https://api.gigapay.se/v2/employees/?page_size=2&page=1 \
-H "Authorization: Token 1vjv20ksxwvlpp3peize74ievjmx3e" \
-H "Integration-ID: 650fd73ff5"

And result in the following response:

HTTP 200 OK
...
{
"count": 4,
"next": "https://api.gigapay.se/v2/employees/?page=2",
"previous": null,
"results": [
{
"id": "1f1d1263-0e79-4787-b573-6df81b44bfc2",
"name": "Albin Lindskog",
"cellphone_number": "+46703000000",
"email": null,
"metadata": {
"user_id": 2,
},
"created_at": "2019-05-22T10:32:36.118753Z",
"verified_at": null,
}, {
"id": "25d2af38-59b9-4f73-9452-51787fed5c84",
"name": "Karl Karlsson",
"cellphone_number": null,
"email": karl.karlsson@gmail.com,
"metadata": {
"user_id": 3,
},
"created_at": "2019-05-20T15:33:08.974624Z",
"verified_at": "2019-05-21T09:13:48.625263",
}
]
}