Pagination
Doorflow API uses offset-based pagination through 'page' and 'per_page' parameters. This allow us to offer a common structure for our pagination across endpoints and allows applications to navigate through paginated data.
Request Parameter | Use |
---|---|
page |
Specifies the page number to request. |
per_page |
Specifies the number of items to return per page. |
We use headers in the response to provide metadata about the paginated data, such as the current page, items per page, and total results, helping clients understand the structure and status of the dataset without including this information in the body of the response.
Response Header | Use |
---|---|
X-Per-Page |
Indicates the number of items returned per page in the response. |
X-Page |
Specifies the current page number being returned. |
X-Total-Results |
Provides the total number of results available across all pages. |
Requesting a particular page
GET /api/3/people?per_page=200&page=2
Example Response headers
HTTP/1.1 200 OK
X-Page: 2
X-Per-Page: 200
X-Total-Results: 405
The example above would contain 200 results on page 2 of the full dataset