Paginating displays results separated into a discrete number of pages. This is necessary to avoid delays if large amounts of data is being accessed.
Pagination works with the following tables/urls:
- Tickets Table
- Contacts Table
- Customer Table URL:
- Customer Table URL (for Zapier integration):
- Organizations Table
- Tickets Table URL
The following two parameters must be sent in the URL for pagination to work correctly.
- pageSize: Default value is 50. Specifies the maximum number of results returned per page. If there are not enough results to reach the maximum, then the exact number of results will be returned.
- pageNumber: Default value is 1. Specifies a specific page to return. For example, if you would like to view the 5th page of results, you would enter the value “5” for this field.
The results returned will include a TotalRecords element. With this, you can figure out how many pages there are based on the pagesize.
This will return the second page of results. Each page will contain 40 records.
Let’s say the TotalRecords is 164. In this case, there will be 5 total pages. Pages 1-4 will have 40 records and page 5 with a remaining 4 records.
For convenience when using paginated API endpoints, the NextPage property can be utilized to obtain your next API call. If your initial API call were https://app.teamsupport.com/api/json/tickets?pageNumber=1&pageSize=5, the NextPage property will return the API call to retrieve the next set of results as shown below:
Need more help with this?