Paging

Some of our requests that return large sets of data are paged. All paged requests allow you to specify how many records you want returned in each page, along with which page you want. They also provide you with a Next and Previous URL to make it easy to move between pages.

The default page size in the API is 10, and the maximum is 100. If you don't specify the page size in a request, the default of 10 will be used, and if you specify a page size greater than the maximum, a 400 Bad Request will be returned with a validation failure.

All of our paged requests return the following information:

TotalRows

integer The total number of records that exist.

PageNumber

integer The page that is being returned in the request.

TotalPages

integer The total number of pages that exist for the specified page size.

Data

Array of result objects An array containing the results of the request.

PreviousUrl

string The URL to request the previous page of data.

NextUrl

string The URL to request the next page of data.

{
    "TotalRows": 102,
    "PageNumber": 2,
    "TotalPages": 11,
    "Data": [...],
    "PreviousUrl": "https://api.rdbranch.com/api/ConsumerApi/v1/Restaurant/ColinsNewCafe1/Customers?firstName=John&surname=Smith&pageNumber=1&pageSize=10",                                                 
    "NextUrl": "https://api.rdbranch.com/api/ConsumerApi/v1/Restaurant/ColinsNewCafe1/Customers?firstName=John&surname=Smith&pageNumber=3&pageSize=10"
}

Last updated

Was this helpful?