All listing endpoints in the API are paginated. In each paginated response, information related to the previous and next page of the result set is included.

Note: The Availability endpoint is not a listing endpoint, as it is generated on the fly. Thus the results from the Availability endpoint are not paginated

A ?limit argument can be added to a request, in order to change the number of results on each page.

To retrieve the next page of results, use the query param ?page to specify which page.

📘

Default limit

The default limit is set to 50 for most resources in the API.

👍

Are there more pages?

Use the next_page_url in the response to determine whether there are additional pages to fetch, i.e. only show a "Load more" button if next_page_url is not null.

Example:

curl --request GET \
  --url https://api.timekit.io/v2/bookings?limit=3&page=2 \
  --header 'Content-Type: application/json' \
  --user :live_api_key_7nzvc7wsBQQISLeFSVhROys9V1bUJ1z7

Will return:

{
  "total": 5,
  "per_page": "3",
  "current_page": 2,
  "last_page": 2,
  "next_page_url": null,
  "prev_page_url": "https://api.timekit.io/v2/bookings?limit=3&page=1",
  "from": 4,
  "to": 5,
  "data": [
    {
      "id": "c125d175-132a-499e-8beb-87f31378d5ab",
      "state": "initialized",
      "graph": "instant",
      "completed": false,
      "created_at": "2016-09-15T11:23:09+0300",
      "updated_at": "2016-09-15T11:23:09+0300"
    },
    {
      "id": "06502f41-78b3-4d03-9b6d-4c8b84e360ff",
      "state": "initialized",
      "graph": "instant",
      "completed": false,
      "created_at": "2016-09-15T11:23:09+0300",
      "updated_at": "2016-09-15T11:23:09+0300"
    }
  ]
}