Pagination

Most resources have an endpoint that returns a list of data separated over multiple pages. Using the request parameter named page, you can indicate the current page.

The JSON structure of the pagination is as follows:

{
  "data": [
    {...},
    {...}
    ..
  ],
  "links": {
    "first": "https://app.trengo.eu/api/v2/{resource}?page=1",
    "last": "https://app.trengo.eu/api/v2/{resource}?page=3",
    "prev": null,
    "next": "https://app.trengo.eu/api/v2/{resource}?page=2"
  },
  "meta": {
    "path": "https://app.trengo.eu/api/v2/{resource}",
    "current_page": 1,
    "from": 1,
    "to": 25,
    "last_page": 3,
    "per_page": 25,
    "total": 75
  }
}

What’s Next