All requests to the CallRail API that return more than one object will be paginated. If you’re using the Listing All Calls endpoint, we recommend using relative pagination instead of offset pagination for an improved experience and faster performance.
What is relative pagination?
Relative pagination separates the results of your query across multiple pages, without explicitly defining the number of pages in the response or numbering individual pages. Instead, relative pagination provides the endpoint to query the next page of results, and a has_next_page parameter to indicate when you’ve reached the final page of results for your query.
Please note: currently relative pagination is only available for the Listing All Calls endpoint.
We do not recommend using a mix of relative and offset pagination across requests for the same dataset.
Switching to relative pagination
You can use relative pagination by specifying the following attributes:
Name |
Type |
Required |
Description |
relative_pagination |
boolean | optional | Enables the use of relative pagination. A value of true enables relative pagination. A value of false disables relative pagination (and enables Offset Pagination). The default value is false. |
per_page |
integer | optional | How many objects to return per page to return (The default is 100. The Listing All Calls endpoint supports a maximum of 250.) |
offset |
integer | optional | Allows you to navigate directly to a specific page of results. With relative pagination, the first page is offset=0 so to navigate to the 10th page of results, you would specify offset=9. |
For example, the request below would return 25 objects per page from the Listing All Calls index endpoint.
GET /v3/a/{account_id}/calls.json?relative_pagination=true&per_page=25