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.
Header | Type | Description |
---|---|---|
X-NextPage | Integer | Number of the next available page |
X-Count | Integer | The 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-MaxCount | Integer | Total number of results |
X-CurrentPage | Integer | Number of the current page |
X-PreviousPage | Integer | Number for the previous page. -1 indicates there is no previous page |
X-PageSize | Integer | Maximum number on the current page |
X-MaxPageIndex | Integer | Total number of pages |
X-SortOrder | String | Orientation the list is sorted by (Ascending or Descending) |
X-SortExpression | String | The object field being sorted on |