Planting Trees
Plant Trees
POST
https://app.thegoodapi.com/plant/trees
Yes, planting trees is really this easy!
Headers
Authorization*
string
<API Key>
Request Body
count
integer
The number of trees you'd like to plant
yes
attribution
string
Use this to tag an order with a non-unique look up key. This can be used later to filter orders down all trees with the attribution key
no
metadata
JSON
Use this to tag an order with various k/v pairs.
no
idempotency_key
string
Use this for idempotency
no
{
"total_planted_trees": 45,
"tree_details": [
{
"id": "i2SeocFjwNayo7PI7DpI",
"count": 1,
"fractional_count": 0,
"created_at": "2025-07-01T22:07:31.374582-04:00",
"idempotency_key": "",
"metadata": {
"key1": "val1",
"key2": 786
},
"attribution": "[email protected]"
}
],
"total_planted_trees_month": 0
}
Get Total Trees Planted
GET
https://app.thegoodapi.com/plant/trees
Headers
Authorization*
String
<API Key>
Query Params (All optional)
attribution_key
String
Fetch by attribution key
id
String
Fetch by Tree ID
created_at
String
All trees registered after created date (fmt: xxxx-xx-xx)
end_at
string
All trees registered before an end date (fmt: xxxx-xx-xx)
metadata
json
JSON to filter by metadata. Applies in "AND" operations. For example: {"key1": "val1", "key2":"val2"} will return all records that have the key1:val1 AND key2:val2 k/v pairs as part of their metadata
{
"total_planted_trees": 45,
"tree_details": [
{
"id": "i2SeocFjwNayo7PI7DpI",
"count": 1,
"created_at": "2025-07-02T02:07:31.374582Z",
"idempotency_key": "",
"metadata": {
"key1": "val1",
"key2": 786
},
"attribution": "[email protected]"
},
{
"id": "1NdT0fiH6Yi4ffsmmnmE",
"count": 1,
"created_at": "2025-07-02T02:06:57.723507Z",
"idempotency_key": "",
"metadata": null,
"attribution": "[email protected]"
},
{
"id": "EOsdQ5HKjZbCKkmCZd2D",
"count": 1,
"created_at": "2025-07-02T02:03:28.667646Z",
"idempotency_key": "",
"metadata": null,
"attribution": "[email protected]"
},
....
....
....
....
....
}
Last updated
Was this helpful?