Pagination

The Railz API uses a simple set of query parameters on data endpoints to facilitate paging through large amounts of data.

Request

Our data endpoints that return multiple results are paged. You will need to supply an offset query parameter when calling these endpoints. You can configure the size of each page by using the limit query parameter.

  • offset : The offset is the position in the dataset of a particular record.
  • limit: This is the size of the results set you would like (default: 100).

Example

curl --request GET \
  --url https://api.railz.ai/balanceSheets?businessName=Demo&reportFrequency=month&serviceName=quickbooks&limit=100&offset=2 \
  --header 'Accept: application/json'

Response

Currently, our transactional data endpoints return a pagination object, which identifies the below:

  • offset : The offset as requested. Defaults to 0
  • limit : The limit as requested. Defaults to 100
  • count : The total size of the result set.

Example

{
  "pagination":{
    "offset":50,
    "limit":25,
    "count":78
    },
  "meta":{
    ...
  },
  "data":{
    ...
  }
}