Pagination
Endpoints that accept page and per_page parameters are paginated. They expose four additional fields that contain data about your position in the response. For example, to display 15 results per page and view the second page of a GET to /networks, your final request would be GET/networks?...page=2&per_page=5
1
{
2
"success": true,
3
"data": {
4
"current_page": 1,
5
"data": [],
6
7
"first_page_url": "http:/insurpass-
8
api.test/api/merchant/search_pharmacies?page=1",
9
10
"from": null,
11
"last_page": 1,
12
13
"last_page_url": "http://insurpass-
14
api.test/api/merchant/search_pharmacies?page=1",
15
16
"next_page_url": null,
17
"path": "http://insurpass-api.test/api/merchant/search_pharmacies",
18
"per_page": 15,
19
"prev_page_url": null,
20
"to": null,
21
"total": 0
22
},
23
"message": "Pharmacies retrieved successfully"
24
}
Copied!
Copy link