Pagination

All pagination related query parameters begin with page.

List endpoints

List endpoints typically limit the number of entities returned. This is considered a “page” of results. There is a meta root property in the response, containing pagination metadata;

{
	"deals": [...],
	"meta": {
		"page": {
			"pageOffset": 0,
			"pageSize": 20,
			"count": 11394
		}	
	}
}

count is the total number of entities.

pageSize is the max number of items per page. This can be changed by passing the pageSize query parameter; e.g. pageSize=35.

pageOffset is where the page starts from, i.e. the index position of the first item to return from the overall result set. This is 0 by default. If you would like further pages, pass the pageOffset query parameter; e.g. pageOffset=20.

To-many relationships

Some endpoints (single entity and list endpoints) support pagination for to-many relationships. An example query parameter would be like pageSize[contacts]=15 where contacts is the relationship name. Check the endpoint’s documentation to see if this is supported.

It’s not possible to change the offset to get further pages in this case; you’ll need to use another endpoint to get what you want.

Feedback

If you have any feedback or suggestions, feel free to contact us at api@teamwork.com.