Pagination

When querying paginated endpoints, the limit (default 250 records per response) and offset (default starts at 0) parameters are used for pagination.

In the response for these endpoints, you can use the meta attribute to help with this process:

{
  "meta": {
    "count": 1000,
    "previous": {
      "offset": 100,
      "link": "https://endgrate.com/api/{endpoint}?transfer_id=abcabc123123abcabc123123&limit=100&offset=100"
    },
    "next": {
      "offset": 300,
      "link": "https://endgrate.com/api/{endpoint}?transfer_id=abcabc123123abcabc123123&limit=100&offset=300"
    }
  }
}

The count attribute is the total number of records for the entire request. If there is a previous page of records, the previous object will be in meta. Similarly, if there is a next page of records, the next object will be in meta.

For general pagination purposes, we recommend first calling your desired endpoint with the default paging parameters, and then querying for if the next object is in meta. If so, continue by calling the link provided in the next object. Repeat this process until the next object is no longer in meta, meaning that there are no more records remaining.