Quick Start

The Cooler API: Measuring Carbon Footprints

Use Cooler's carbon calculator API to calculate the carbon footprint of every item within your transactions. The calculator can be updated, sometimes monthly, based on a variety of economic factors. Learn more about our methodology here.

Get your API keys

Your API requests are authenticated using unique API keys. Cooler provides both a production key and a test key, allowing you to test your applications without incurring any charges. Any request that does not include an API key will result in an error.

Navigate to your account settings to retrieve your API keys.

Make your first footprint request

Send an authenticated request to the Footprint endpoint to calculate the carbon footprint of the product or products in a transaction. You can use the default test key or your Cooler API test or production key. For more examples, see the API Reference.

curl -X POST https://api.cooler.dev/v2/footprint/products \
-H "Content-Type: application/json" \
-H "Cooler-Api-Key: cooler_test_acaf38b8-5d04-4aa4-87fe-91a67fc13a05" \
-d '{
  "items": [{
    "productPrice": 500,
    "productName": "Samsung A7 Galaxy",
    "productDescription": "Samsung A7 Galaxy",
    "postalCode": "02062",
    "newProduct": true,
    "externalId": "6c233e4f-3f55-43fe-b67b-0ce50e5f7177"
  }]
}'

Last updated