Migrating from v1
Endpoint by endpoint, what changed between the legacy woodyou.care API and the Platform API.
API v1 is the API of the old woodyou.care shop. It keeps working with the same responses until the end date you receive from us, but nothing new is added to it. This page walks through what changes when you move to v2.
In short
- New tokens. v1 tokens are Sanctum tokens from the old dashboard. v2 uses Platform API tokens with scopes, created at Settings > API tokens on the Automate package. See Authentication.
- New base URL.
https://woodyou.care/api/v1becomeshttps://woodyou.care/api/v2. - Buying and gifting moved to the Foundation. The Platform shows proof; it does not sell trees. Everything that created an order in v1 answers
410 Goneand points to the WoodYouCare Foundation. - Allocations instead of individual trees. Trees that come in through the Foundation have no per-tree identity. v2 reports allocations: a number of trees from one planting, with a status.
- No emission figures. v1 reported
co2_compensationandgoal_emissions_compensated. v2 reports trees, plantings, monitoring and verification, nothing else. - Uniform lists and errors. Cursor pagination with
has_moreinstead of Laravel page numbers, and one error shape with stable codes instead of free-form messages.
Endpoint by endpoint
| v1 | v2 | Notes |
|---|---|---|
GET /ping | GET /v2/me | v2 has no unauthenticated ping; a 200 on /me tells you the token works |
GET /me | GET /v2/me | Same purpose. The customer block disappears; company gains package and totals |
GET /get-stats | GET /v2/company | tree_count becomes trees.total with a breakdown per status. available_for_gifting becomes trees_unassigned. The emission fields have no successor |
GET /get-trees | GET /v2/allocations | One row per allocation instead of per tree. Legacy trees keep their WYC... ids inside the allocation; Foundation trees never had one |
GET /get-projects | GET /v2/projects | Same fields plus ecosystem_type and verification. Stock disappears, because the Platform does not sell trees; trees counts your own trees per project |
POST /buy-tree, POST /buy-trees | Foundation | 410 Gone. Donate at the Foundation; the allocation shows up in v2 and a webhook tells you |
POST /gift-tree | POST /v2/recipients | Assign trees from your unassigned trees to a recipient. New trees are no longer bought on the fly |
POST /buy-vouchers | POST /v2/gift-codes | Reserve trees behind a code the receiver claims at /gift; nothing is bought |
POST /cancel-order/{id} | Foundation | 410 Gone |
GET /get-products | Foundation | 410 Gone. Products are Foundation domain |
POST /calculate-delivery-compentation | Removed | 410 Gone, no successor |
Field mapping for trees
v1 get-trees row | v2 allocation |
|---|---|
id (WYC00000001) | legacy_tree_ids[] on the allocation, only for trees imported from woodyou.care |
project | project.name (expand project) |
supplier | partner.name on the planting (expand planting, then partner) |
latitude, longitude | planting.location (centroid of the planting polygon) |
country | project.country, as an ISO code instead of a translated name |
Checklist
Create a Platform token
Ask an administrator to create a live and a test token with the scopes you need.
Replace the reads
Point me, get-stats, get-trees and get-projects at their v2 successors and switch your list handling to cursor pagination.
Move purchases to the Foundation
Anything that called buy-*, gift-tree or buy-vouchers now donates at the Foundation or assigns trees to a recipient in v2.
Subscribe to webhooks
Replace polling with webhooks for new allocations, plantings and verification.
Drop the emission figures
Remove co2_compensation and goal_emissions_compensated from your reports. The Platform talks about trees.