Pagination

For API requests that return a list, Stax Bill limits the maximum number of returned JSON entities. This maximum threshold varies from entity type to entity type but is never below 1,000. For reading a large list of entities, the query string parameters pageNumber and pageSize can be used to paginate the results.

Example

📘

Read the start of the list:

GET https://secure.fusebill.com/v1/customers?pageSize=100&pageNumber=0

This request would read the first 100 customers.

📘

Continue reading the list

GET https://secure.fusebill.com/v1/customers?pageSize=100&pageNumber=1

And that request would read the next page of 100 customers

Custom Pagination Headers

To make pagination easier, there are special custom headers Stax Bill sends as part of the HTTPS response. These allow for simple programmatic reading of the list.

HeaderTypeDescription
X-NextPageIntegerNumber of the next available page
X-CountIntegerThe total number of results that match the search criteria. This can be used to deduce how many entities match the search criteria if filtering is being used
X-MaxCountIntegerTotal number of results
X-CurrentPageIntegerNumber of the current page
X-PreviousPageIntegerNumber for the previous page. -1 indicates there is no previous page
X-PageSizeIntegerMaximum number on the current page
X-MaxPageIndexIntegerTotal number of pages
X-SortOrderStringOrientation the list is sorted by (Ascending or Descending)
X-SortExpressionStringThe object field being sorted on