# Pagination

All resources coming in bulk are paginated when using Sender API.

Paginated response contains and object with 4 attributes: data, links, meta and has_more_resources.

# data

Under data attribute you will find an array of requested resource objects.

Under links attribute you will find an object of links for other requests.

An example of links would look like this:

    "first": "https://app.sender.net/client-api/api/campaigns?page=1",
    "last": "https://app.sender.net/client-api/api/campaigns?page=257",
    "prev": null,
    "next": "https://app.sender.net/client-api/api/campaigns?page=2"

# meta

Under meta attribute you will find more information on available pages.

Example meta attribute:

    "current_page": 1,
    "from": 1,
    "last_page": 257,
    "path": "https://app.sender.net/client-api/api/campaigns",
    "per_page": 5,
    "to": 5,
    "total": 1282
Param Value
current_page Requested page
from From which item does the page start
to At which item does the page end
last_page Last page
path Request path
per_page Items shown per page
total Total amount of items

# has_more_resources

Tells you if next page exists.

# Pagination parameters

You can give your own pagination parameters. Since all listed requests are using GET HTTP method, we only accept route parameters.

# ?page

Which page would you like to see?

# ?per_page

How many items per page would you like in your response?

# Example

You can turn https://api.sender.net/v2/campaigns/.

Into https://api.sender.net/v2/campaigns?page=5&per_page=20.

To see campaigns from 81st to 100th.

Last updated:   2021-05-12