Zephyrnet Logo

Using DitchCarbon with Rows.com

Date:

Of course, you can specify more options alongside the manufacturer and product name when you create the API request. If you want to specify how many months the product would be used for, for example, and this number was stored in column E, change the formula in column C to the following:

=GET(CONCATENATE(“https://api.ditchcarbon.com/v1.0/product?”,”manufacturer=”,A2,”&”,”name=”,B2,”&”,”months=”,E2),PAIR2JSON(“Authorization”,(“Bearer <YOUR_TOKEN_HERE>”)))

For a full list of options for this API endpoint, visit https://docs.ditchcarbon.com/reference/lookupproduct

3. The carbon footprint per £1 spent at a company

Say you’re compiling a report on which companies are taking action on climate and have compiled a Rows.com spreadsheet with a list of companies to analyse. Each row contains a company name.

To find the carbon footprint (in kilograms of CO2-equivalent emissions) created by this company for every £1 spent, create another column B, and paste in the following formula:

=GET(CONCATENATE(“https://api.ditchcarbon.com/v1.0/supplier?”,”name=”,A2),PAIR2JSON(“Authorization”,(“Bearer <YOUR_TOKEN_HERE>”)))

Replace <YOUR_TOKEN_HERE> with your DitchCarbon API token, which you should be able to access from your account dashboard.

Once you hit <ENTER>, Rows.com sends an API request to our database containing the company name in that row. Once you see the button labelled “data”, press on it, and then press “Inspect Data” in the resulting dropdown.

You should see a sidebar appear on the right side of the screen. Once you expand the folder-like structure labelled “data”, you’ll find the calculated carbon footprint (in kilograms of CO2-equivalent emissions) created by this company for every £1 spent.

Return to the spreadsheet momentarily and create another column C. Rows.com will automatically paste the result of the API request into this column, once you configure the following step.

Return to the sidebar, press on the calculated carbon footprint and select cell C2 as the destination. Then, duplicate the formula in column B into every row and watch Rows.com magically paste the carbon footprint per £1 spent at the company into column C.

That’s it, you’re all done! If you’ve done it right, you should see a table like the following. Feel free to replace “Dell” with another company by editing the text field to try out the API!

spot_img

Latest Intelligence

spot_img