Refunds
Reverse tree or plastic bottle registrations created within the last 30 days.
Refund trees
Section titled “Refund trees”POST https://app.thegoodapi.com/refund/trees
Headers
Section titled “Headers”| Name | Value |
|---|---|
Content-Type | application/json |
Authorization | <API Key> |
Request body
Section titled “Request body”| Name | Type | Description |
|---|---|---|
id | string | Tree ID — fetch via the Get Total Trees Planted endpoint |
Response — 200 OK
Section titled “Response — 200 OK”{ "refunded_trees": 1001, "total_planted_trees": 15, "refund_details": [ { "id": "Vf0YF7PuL5LDH0wh82Kt", "count": 1001, "fractional_count": 0, "created_at": "2025-07-07T00:24:06.884162Z", "idempotency_key": "", "metadata": { "key1": "val1", "key2": 714 }, "attribution": "saif282@gmail.com", "refunded": false } ], "refund_id": "refund-Vf0YF7PuL5LDH0wh82Kt"}Refund plastic bottles
Section titled “Refund plastic bottles”POST https://app.thegoodapi.com/refund/plastic_bottles
Headers
Section titled “Headers”| Name | Value |
|---|---|
Content-Type | application/json |
Authorization | <API Key> |
Request body
Section titled “Request body”| Name | Type | Description |
|---|---|---|
id | string | Bottle ID — fetch via the Get Total Rescued Plastic Bottles endpoint |
Response — 200 OK
Section titled “Response — 200 OK”{ "refunded_bottles": 1, "total_rescued_bottles": 10, "refund_details": [ { "id": "Vf0YF7PuL5LDH0wh82Kt", "count": 1001, "fractional_count": 0, "created_at": "2025-07-07T00:24:06.884162Z", "idempotency_key": "", "metadata": { "key1": "val1", "key2": 714 }, "attribution": "saif282@gmail.com", "refunded": false } ], "refund_id": "refund-Vf0YF7PuL5LDH0wh82Kt"}