GET
request at the endpoint YOUR_URL.com/api/leads
will always be paginated, as there could be thousands of entries in leads.
Paginated responses from the API will have a data
field for the entries at this page, as well as links
and meta
fields that provide you with information about the pagination in the response.
Show example of a paginated response from the leads endpoint
links.next
in the response, if it is not null
.
Alternatively, you could loop the query by adding the page number as a paremeter for your request, incrementing the page number until you reach meta.last_page
.
This looks like YOUR_URL.com/api/leads?page={page_number}
, where {page_number}
is incremented by 1 each time until you reach meta.last_page
.
YOUR_URL.com/api/leads?page={page_number}
, where {page_number}
is the page you would like to retrieve.