Carbon Footprint

Carbon Footprint API

The Footprint endpoint calculates and returns the carbon footprint(s) for one or more products within a single transaction, given a well-formed JSON request containing required properties, as shown in the examples below. Note that all footprint requests must include your API key from your Cooler account.

Parameters

KEY

TYPE

DESCRIPTION

EXAMPLE

productName*

string

name or title of the product

Samsung A7 Galaxy

productDescription*

string

*product description

Keep up with life with your fast paced life with a phone that fits you, like the Samsung Galaxy A14 5G from Total by Verizon. With the speed of 5G and a powerful Galaxy processor, you can experience your day virtually lag-free.

productPrice*

number

price of the product

500

postalCode

string

postal code of the product when it ships to the customer or your store

49503

newProduct

boolean

new=true, used=false

true

externalId

string

your system’s product id

your_product_id

Reponse Data


{
  "id": "1900b667-fbcf-4f0e-9512-b0f3b4e4e9f7",
  "items": [
    {
      "id": "35c627b9-8249-427a-a050-5e3360e67503",
      "submission": {
        "id": "f2480103-0aba-4c78-826e-c03a92e130ec",
        "zip": "02062",
        "currency": "USD",
        "title": "Samsung A7 Galaxy",
        "price": 500,
        "description": "Samsung A7 Galaxy",
        "newProduct": true, 
        "externalId": "id_you_assigned"
      },
      "footprint": {
        "id": "812c7561-8448-445a-b43b-43e0659e87a4",
        "currency": "USD",
        "expiresAt": "2025-01-20T22:41:10.430Z",
        "carbonFootprint": 1234,
        "carbonFootprintSavings": null
      }
    }
  ],
  "dateCreated": "2025-01-13T22:41:10.149Z",
  "dateUpdated": "2025-01-13T22:41:10.149Z"
}

Code Examples

The following code examples use our test key—remember to replace the key with your own in your own code when calling the endpoints for production.

Javascript

Curl

Last updated