Pagination
Page numbers, 100 per page.
get-trees and get-projects return 100 objects per page with Laravel's default pagination. get-trees lists the trees bought through the old shop first (by order, then by tree id), followed by one row per planted allocation from the Foundation; get-projects is ordered by the old project id:
{
"data": [ { "id": "WYC00000001", "project": "Lesan Dayak" } ],
"links": {
"first": "https://woodyou.care/api/v1/get-trees?page=1",
"last": "https://woodyou.care/api/v1/get-trees?page=4",
"prev": null,
"next": "https://woodyou.care/api/v1/get-trees?page=2"
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 4,
"path": "https://woodyou.care/api/v1/get-trees",
"per_page": 100,
"to": 100,
"total": 350
}
}Request the next page with ?page=2 and keep going until links.next is null. The page size is fixed.
curl "https://woodyou.care/api/v1/get-trees?page=2" \
-H "Authorization: Bearer {YOUR_TOKEN}" \
-H "Accept: application/json"me and get-stats are single objects and have no pagination.