Retrieve the tree totals of the company
Deprecated
The number of trees of the company, optionally within a period. co2_compensation uses the legacy formula and is deprecated: the Platform reports trees, not emissions. goal_emissions_compensated compares that figure with the carbon target the company set in the old shop.
Authorization
bearerAuth 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
Start of the period, Y-m-d H:i:s. Only used together with end.
End of the period, Y-m-d H:i:s. Only used together with start.
Language of translated names and messages: nl (default) or en.
"nl"Value in
- "nl"
- "en"
Response Body
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/get-stats"{ "data": { "tree_count": 350, "available_for_gifting": 12, "co2_compensation": { "value": 2100, "unit": "kg" }, "goal_emissions_compensated": { "value": 4.2, "unit": "%" } }}Retrieve the current user, company and customer GET
Returns the user the token belongs to, the company that user is a member of and the customer record of that company. The customer block is derived from the company on the Platform.
List the trees of the company GET
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.