Pagination

For large data sets the Payable API will return resources in a paginated format.

Please note that paginated resources start from 0 and go all the way up to the total count of resources.

We recommend setting the limit to a reasonable size of 25, which is the default if you do not supply a limit number. Please note: we have a hard cap of 50 resources.

The response will consist of:

  • skip - This is how many resources to skip in the list
  • limit - The maximum number of resources to return
  • total_count - The total number of resources to iterate through
  • data - The actual resources themselves
  • links - A set of links, that allows you to navigate through the list of resources

Please refer to the below code snippet for an example of a paginated request of all generated reports.

{
    "skip": 0,
    "limit": 20,
    "total_count": 100,
    "data": [
        // resources
    ],
    "links": [
        {
            "href": "https://api.payable.co/<resource>?skip=0&limit=5",
            "rel": "current",
            "method": "GET"
        },
        {
            "href": "https://api.payable.co/<resource>?skip=5&limit=5",
            "rel": "next",
            "method": "GET"
        }
    ]
}