API v1 is deprecated. It keeps working until the end date you receive from us. Build new integrations on API v2 and read the migration guide.
Developers

List the trees of the company

Deprecated

GET
/get-trees

One row per tree, 100 per page. Trees bought through the old shop keep their WYC... id and coordinates. Trees that came in through the WoodYouCare Foundation have no per-tree identity: they appear as one row per allocation with id set to allocation-{id} and the centroid of the planting as coordinates.

Authorization

bearerAuth
AuthorizationBearer <token>

A personal access token created in the old woodyou.care dashboard under Account > API tokens. New tokens cannot be created for v1.

In: header

Query Parameters

page?integer

Page number, starting at 1. 100 objects per page.

Range1 <= value
Default1
locale?string

Language of translated names and messages: nl (default) or en.

Default"nl"

Value in

  • "nl"
  • "en"

Response Body

application/json

application/json

curl -X GET "https://example.com/get-trees"
{  "data": [    {      "id": "WYC00000001",      "project": "Lesan Dayak",      "supplier": "Yayasan Lesan",      "latitude": "1.690705633830709",      "longitude": "117.1355001968776",      "country": "Indonesia"    },    {      "id": "allocation-8812",      "project": "Rewilding Kenya",      "supplier": "Wildlife Works",      "latitude": "-3.4241",      "longitude": "38.5862",      "country": "Kenya"    }  ],  "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  }}