Table of Contents
Paging - Reckon One API v2
All of the Reckon One API v2 endpoints that return a list of results support paging. Paging is applied after both filtering and sorting.
Paging is added to the endpoint URL as two query string parameters:
/r1/v2/{cashbookId}/ledgeraccounts?page=5,perpage=10
The above example will return page 5, with 10 items on the page (so items 51 to 60).
The default value for
page is 1 and the default value for perpage is 10.The response also includes metadata relating to the results in a couple of HTTP headers:
- The
Linkheader provides URLs for the first, last, previous and next pages of results (where these pages exist). Each URL is separated by a comma. - The
X-Total-Countheader provides the total number of results found by the request.
Here is an example of the Link header:
<http://api.reckon.com/r1/v2/a5f4afcc-e990c-4780-909d-a9fffe16ba26/ledgeraccounts?page=1&perPage=10>; rel="first"