This is our endpoint to paginate the products.
Only registered users have access to view the paginated list.
This endpoint requires authentication.
Method | URI | Headers |
---|---|---|
GET | https://test-api.updivision.work/api/products/paginate | Accept: application/json Authorization: Bearer {token} |
Eg: page=2
{
"current_page": 1,
"data": [
{
"id": 1,
"name": "Apple Silicone Case for iPhone",
"description": "On the outside, the silky, soft-touch finish of the silicone exterior feels great in your hand.",
"picture": "https://test-api.updivision.work/api/images/product-seeder/product-1.jpeg",
"price": "29.90"
},
{
"id": 2,
"name": "Beats Solo3",
"description": "With up to 40 hours of battery life, Beats Solo3 is your perfect everyday headphone",
"picture": "https://test-api.updivision.work/api/images/product-seeder/product-2.jpeg",
"price": "300.00"
}
],
"first_page_url": "https://testapi.test/api/products/paginate?page=1",
"from": 1,
"last_page": 3,
"last_page_url": "https://testapi.test/api/products/paginate?page=3",
"next_page_url": "https://testapi.test/api/products/paginate?page=2",
"path": "https://testapi.test/api/products/paginate",
"per_page": 2,
"prev_page_url": null,
"to": 2,
"total": 6
}
{
"message": "Unauthenticated."
}