When querying for lists of items, the responses will be paginated. The pagination will be represented in the links
key of the response.
"links":{
"self": "https://api.vantage.sh/v1/products?page=2",
"first": "https://api.vantage.sh/v1/products?page=1",
"next": "https://api.vantage.sh/v1/products?page3",
"last": "https://api.vantage.sh/v1/products?page=5",
"prev": "https://api.vantage.sh/v1/products?page=1"
}
Key | Description |
---|---|
self | The URL to the current page. |
first | The URL to the first page of items. |
next | The URL to the next page of items. |
last | The URL to the very last page of items. |
prev | The URL to the previous page of items. |
The Array
of items will be available as a key that matches the name of the route. For instance products
will have a top level products
key
{
"links": {},
"products":[]
}
You can specify the page you want to access and the number of items per page by using the page
and limit
query params.
curl --request GET \
--url https://api.vantage.sh/v1/products?page=3&limit=10 \
--header 'Accept: application/json'