Collect Ocean Bound Plastic Bottles
Rescue Plastic Bottles
POST
https://app.thegoodapi.com/rescue/plastic_bottles
Yes, collecting ocean bound plastic bottles is that easy!
Headers
Authorization*
string
<API Key>
Request Body (JSON)
count
integer
The number of bottles you'd like to rescue
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
Response
{
"total_rescued_bottles": 1001,
"total_rescued_bottles_month": 1001,
"bottle_details": [
{
"id": "6IbY4xsil27DH5G0U3Mg",
"count": 1,
"fractional_count": 0,
"created_at": "2025-07-06T20:28:26.003429-04:00",
"idempotency_key": "",
"metadata": {
"key1": "val1",
"key2": 714
},
"attribution": "[email protected]",
"refunded": false
}
]
}
Get Total Rescued Plastic Bottles Details
GET
https://app.thegoodapi.com/rescue/plastic_bottles
Headers
Authorization*
String
<API Key>
attribution_key
String
Fetch by attribution key
id
String
Fetch by Bottle ID
created_at
String
All bottles registered after created date (fmt: xxxx-xx-xx)
end_at
string
All bottles 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
Example Curl:
curl --request GET \
--url http://app.thegoodapi.com/rescue/plastic_bottles \
--header 'Authorization: {API_KEY}' \
--header 'Content-Type: application/json'
Response
{
"total_rescued_bottles": 6,
"total_rescued_bottles_month": 6,
"bottle_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]"
},
...
...
....
....
]
}
Last updated
Was this helpful?