Skip to content

Ocean-Bound Plastic

Rescue ocean-bound plastic bottles and fetch the total number of bottles you’ve rescued.

POST https://app.thegoodapi.com/rescue/plastic_bottles

Rescuing ocean-bound plastic bottles is this easy.

NameTypeDescription
Authorization*string<API Key>
NameTypeRequiredDescription
countintegerYesThe number of bottles you’d like to rescue
attributionstringNoTag an order with a non-unique lookup key for filtering orders later
metadataJSONNoTag an order with arbitrary key/value pairs
idempotency_keystringNoUse this to safely retry requests without double-counting
{
"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": "saif282@gmail.com",
"refunded": false
}
]
}

GET https://app.thegoodapi.com/rescue/plastic_bottles

NameTypeDescription
Authorization*string<API Key>

All query parameters are optional.

NameTypeDescription
attribution_keystringFetch by attribution key
idstringFetch by Bottle ID
created_atstringBottles registered after this date (format: YYYY-MM-DD)
end_atstringBottles registered before this date (format: YYYY-MM-DD)
metadataJSONFilter by metadata — applies as AND operations. Example: {"key1": "val1", "key2": "val2"} returns records that match both
Terminal window
curl --request GET \
--url https://app.thegoodapi.com/rescue/plastic_bottles \
--header 'Authorization: {API_KEY}' \
--header 'Content-Type: application/json'
{
"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": "user1@test.com"
},
{
"id": "1NdT0fiH6Yi4ffsmmnmE",
"count": 1,
"created_at": "2025-07-02T02:06:57.723507Z",
"idempotency_key": "",
"metadata": null,
"attribution": "user2@test.com"
}
]
}