GET
request at the endpoint /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
Show example of a paginated response from the leads endpoint
200
Retrieving the data programmatically
Send a request to your desired paginated endpoint. After processing the data received, you would then send a request to the endpoint provided atlinks.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
.
Retrieving a specific page
Add a query paramter to the end of your request with the page number. This looks likeYOUR_URL.com/api/leads?page={page_number}
, where {page_number}
is the page you would like to retrieve.