How to navigate the API responses.
_links
member in order to facilitate navigation, inspired by the HAL media type.
The _links
member is an object whose members correspond to a name that represents the link relationship.
All links are relative, and thus require appending on top of a Base URL that should be configurable.
E.g. a GET
request could be performed on a “self” link:
GET {{base_url}}{{response._links.self.href}}
href
(string) - A relative URL that represents a hyperlink to another related objectpage[size]
, page[before]
, and page[after]
As the cursor may change based on the results being returned (e.g. for Email Validation it’s based on the email, while for Lead Lists it’s based on the ID of the lead list’s entry) it’s highly recommended to follow the links next
or prev
within the response (e.g. response._links.next.href
).
Notes:
next
and previous
links will only appear when there are items available.
page[before]
and page[after]
query parameters.
page
and page_size
fields.
For these cases the response will include a _pagination
object:
page
(integer) - The current page numberpage_size
(integer) - The number of entries per pagetotal_pages
(integer) - The total number of pages in the search resultstotal
(integer) - The total number of entries in the search results