Used to retrieve information and status of your account.
curl https://api.cloverly.com/2019-03-beta/account \ -H "Content-type: application/json" \ -H "Authorization: Bearer public_key:47800ea0ee541b4c"
require 'faraday' conn = Faraday.new(:url => 'https://api.cloverly.com') conn.get do |req| req.url '/2019-03-beta/account' req.headers['Content-Type'] = 'application/json' req.headers['Authorization'] = 'Bearer public_key:47800ea0ee541b4c' end
const request = require('request'); const options = { url: 'https://api.cloverly.com/2019-03-beta/account', headers: { 'Content-type': 'application/json', 'Authorization': 'Bearer public_key:47800ea0ee541b4c' } }; request(options, function(error, response, body) { console.log(body); });
package main import "net/http" import "io/ioutil" import "fmt" func main() { client := &http.Client{} req, _ := http.NewRequest("GET", "https://api.cloverly.com/2019-03-beta/account", nil) req.Header.Add("Content-type", "application/json") req.Header.Add("Authorization", "Bearer public_key:47800ea0ee541b4c") resp, _ := client.Do(req) defer resp.Body.Close() body, _ := ioutil.ReadAll(resp.Body) fmt.Printf(string(body[:])) }
import requests url = 'https://api.cloverly.com/2019-03-beta/account' headers = {'Content-type': 'application/json', 'Authorization': 'Bearer public_key:47800ea0ee541b4c'} r = requests.get(url, headers=headers) print(r.text)
<?php $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "https://api.cloverly.com/2019-03-beta/account"); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-type: application/json', 'Authorization: Bearer public_key:47800ea0ee541b4c')); $r = curl_exec($ch); curl_close($ch); echo $r;
{
"name": "string",
"owner": {
"name": "string",
"email": "string"
},
"balance_in_usd_cents": "number",
"production_enabled?": "boolean",
"environment": "string"
}
Get a list of all currently available offsets. Any purchase or estimate call below accepts targeting specific offset via a offset_slug
value.
curl https://api.cloverly.com/2019-03-beta/offsets \ -H "Content-type: application/json" \ -H "Authorization: Bearer public_key:47800ea0ee541b4c"
require 'faraday' conn = Faraday.new(:url => 'https://api.cloverly.com') conn.get do |req| req.url '/2019-03-beta/offsets' req.headers['Content-Type'] = 'application/json' req.headers['Authorization'] = 'Bearer public_key:47800ea0ee541b4c' end
const request = require('request'); const options = { url: 'https://api.cloverly.com/2019-03-beta/offsets', headers: { 'Content-type': 'application/json', 'Authorization': 'Bearer public_key:47800ea0ee541b4c' } }; request(options, function(error, response, body) { console.log(body); });
package main import "net/http" import "io/ioutil" import "fmt" func main() { client := &http.Client{} req, _ := http.NewRequest("GET", "https://api.cloverly.com/2019-03-beta/offsets", nil) req.Header.Add("Content-type", "application/json") req.Header.Add("Authorization", "Bearer public_key:47800ea0ee541b4c") resp, _ := client.Do(req) defer resp.Body.Close() body, _ := ioutil.ReadAll(resp.Body) fmt.Printf(string(body[:])) }
import requests url = 'https://api.cloverly.com/2019-03-beta/offsets' headers = {'Content-type': 'application/json', 'Authorization': 'Bearer public_key:47800ea0ee541b4c'} r = requests.get(url, headers=headers) print(r.text)
<?php $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "https://api.cloverly.com/2019-03-beta/offsets"); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-type: application/json', 'Authorization: Bearer public_key:47800ea0ee541b4c')); $r = curl_exec($ch); curl_close($ch); echo $r;
[
{
"slug": "string",
"name": "string",
"city": "string",
"province": "string",
"country": "string",
"offset_type": "string",
"offset_type_slug": "string",
"total_capacity": "string",
"latlng": "string",
"technical_details": "string",
"available_carbon_in_kg": "string",
"pretty_url": "string"
}
]
Get the details of a specific offset.
curl https://api.cloverly.com/2019-03-beta/offsets/:offset_slug \ -H "Content-type: application/json" \ -H "Authorization: Bearer public_key:47800ea0ee541b4c"
require 'faraday' conn = Faraday.new(:url => 'https://api.cloverly.com') conn.get do |req| req.url '/2019-03-beta/offsets/:offset_slug' req.headers['Content-Type'] = 'application/json' req.headers['Authorization'] = 'Bearer public_key:47800ea0ee541b4c' end
const request = require('request'); const options = { url: 'https://api.cloverly.com/2019-03-beta/offsets/:offset_slug', headers: { 'Content-type': 'application/json', 'Authorization': 'Bearer public_key:47800ea0ee541b4c' } }; request(options, function(error, response, body) { console.log(body); });
package main import "net/http" import "io/ioutil" import "fmt" func main() { client := &http.Client{} req, _ := http.NewRequest("GET", "https://api.cloverly.com/2019-03-beta/offsets/:offset_slug", nil) req.Header.Add("Content-type", "application/json") req.Header.Add("Authorization", "Bearer public_key:47800ea0ee541b4c") resp, _ := client.Do(req) defer resp.Body.Close() body, _ := ioutil.ReadAll(resp.Body) fmt.Printf(string(body[:])) }
import requests url = 'https://api.cloverly.com/2019-03-beta/offsets/:offset_slug' headers = {'Content-type': 'application/json', 'Authorization': 'Bearer public_key:47800ea0ee541b4c'} r = requests.get(url, headers=headers) print(r.text)
<?php $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "https://api.cloverly.com/2019-03-beta/offsets/:offset_slug"); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-type: application/json', 'Authorization: Bearer public_key:47800ea0ee541b4c')); $r = curl_exec($ch); curl_close($ch); echo $r;
Required | |
---|---|
`offset_slug` | The slug for the offset |
{
"slug": "string",
"name": "string",
"city": "string",
"province": "string",
"country": "string",
"offset_type": "string",
"offset_type_slug": "string",
"total_capacity": "string",
"latlng": "string",
"technical_details": "string",
"available_carbon_in_kg": "string",
"pretty_url": "string"
}
Use this matching functionality when creating an estimate or purchase to match offsets by type, location, or exact slug.
By default, Cloverly API matches based on low-cost. The Cloverly API will match anywhere in the world with low cost. Using offset matching changes that behavior. By including a `type`, then the Cloverly API will require a particular offset type, and then sort by low cost. If a location is included, then the API will sort by closest offset to that location first.
Matching solar closest to Mountain View, CA
"offset_match": {"type": "solar", "location":{"postal_code":"94043","country":"US"}
Example matching wind to a latitutde / longitude in New Hampshire
"offset_match": {"type": "solar", "location":{"latlng": [41.1609216,-76.6826642]}
Matching offset to an airport
"offset_match": {"location": {"airport": "sfo"}}
Example matching biomass. (For a full list of available offset types, see offset types below.)
"offset_match": {"type": "biomass"}
Example matching specific offset
"offset_match": {"slug": "arcata-city-forest-barnum-tract-f07113"}
Matching solar closest to Mountain View, CA for 200 kwh of electricity
curl https://api.cloverly.com/2019-03-beta/purchases/electricity \ -X POST \ -d '{"energy":{"value":200,"units":"kwh"},"offset_match":{"type":"solar","location":{"postal_code":"94043","country":"US"}}}' \ -H "Content-type: application/json" \ -H "Authorization: Bearer public_key:47800ea0ee541b4c"
require 'faraday' conn = Faraday.new(:url => 'https://api.cloverly.com') conn.post do |req| req.url '/2019-03-beta/purchases/electricity' req.body = '{"energy":{"value":200,"units":"kwh"},"offset_match":{"type":"solar","location":{"postal_code":"94043","country":"US"}}}' req.headers['Content-Type'] = 'application/json' req.headers['Authorization'] = 'Bearer public_key:47800ea0ee541b4c' end
const request = require('request'); const options = { method: 'post', url: 'https://api.cloverly.com/2019-03-beta/purchases/electricity', body: JSON.stringify({"energy":{"value":200,"units":"kwh"},"offset_match":{"type":"solar","location":{"postal_code":"94043","country":"US"}}}), headers: { 'Content-type': 'application/json', 'Authorization': 'Bearer public_key:47800ea0ee541b4c' } }; request(options, function(error, response, body) { console.log(body); });
package main import "net/http" import "io/ioutil" import "fmt" import "bytes" func main() { client := &http.Client{} var requestData = []byte(`{"energy":{"value":200,"units":"kwh"},"offset_match":{"type":"solar","location":{"postal_code":"94043","country":"US"}}}`) req, _ := http.NewRequest("POST", "https://api.cloverly.com/2019-03-beta/purchases/electricity", bytes.NewBuffer(requestData)) req.Header.Add("Content-type", "application/json") req.Header.Add("Authorization", "Bearer public_key:47800ea0ee541b4c") resp, _ := client.Do(req) defer resp.Body.Close() body, _ := ioutil.ReadAll(resp.Body) fmt.Printf(string(body[:])) }
import requests url = 'https://api.cloverly.com/2019-03-beta/purchases/electricity' headers = {'Content-type': 'application/json', 'Authorization': 'Bearer public_key:47800ea0ee541b4c'} data = '{"energy":{"value":200,"units":"kwh"},"offset_match":{"type":"solar","location":{"postal_code":"94043","country":"US"}}}' r = requests.post(url, headers=headers, data=data) print(r.text)
<?php $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "https://api.cloverly.com/2019-03-beta/purchases/electricity"); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, '{"energy":{"value":200,"units":"kwh"},"offset_match":{"type":"solar","location":{"postal_code":"94043","country":"US"}}}'); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-type: application/json', 'Authorization: Bearer public_key:47800ea0ee541b4c')); $r = curl_exec($ch); curl_close($ch); echo $r;
Get a full list of offset types that can be used for filtering offsets. Use the `slug` returned here in the `offset_match` syntax above.
curl https://api.cloverly.com/2019-03-beta/offset-types \ -H "Content-type: application/json" \ -H "Authorization: Bearer public_key:47800ea0ee541b4c"
require 'faraday' conn = Faraday.new(:url => 'https://api.cloverly.com') conn.get do |req| req.url '/2019-03-beta/offset-types' req.headers['Content-Type'] = 'application/json' req.headers['Authorization'] = 'Bearer public_key:47800ea0ee541b4c' end
const request = require('request'); const options = { url: 'https://api.cloverly.com/2019-03-beta/offset-types', headers: { 'Content-type': 'application/json', 'Authorization': 'Bearer public_key:47800ea0ee541b4c' } }; request(options, function(error, response, body) { console.log(body); });
package main import "net/http" import "io/ioutil" import "fmt" func main() { client := &http.Client{} req, _ := http.NewRequest("GET", "https://api.cloverly.com/2019-03-beta/offset-types", nil) req.Header.Add("Content-type", "application/json") req.Header.Add("Authorization", "Bearer public_key:47800ea0ee541b4c") resp, _ := client.Do(req) defer resp.Body.Close() body, _ := ioutil.ReadAll(resp.Body) fmt.Printf(string(body[:])) }
import requests url = 'https://api.cloverly.com/2019-03-beta/offset-types' headers = {'Content-type': 'application/json', 'Authorization': 'Bearer public_key:47800ea0ee541b4c'} r = requests.get(url, headers=headers) print(r.text)
<?php $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "https://api.cloverly.com/2019-03-beta/offset-types"); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-type: application/json', 'Authorization: Bearer public_key:47800ea0ee541b4c')); $r = curl_exec($ch); curl_close($ch); echo $r;
[
{
"slug": "string",
"name": "string",
"description": "string"
}
]
Get the full list of purchases for account.
curl https://api.cloverly.com/2019-03-beta/purchases \ -H "Content-type: application/json" \ -H "Authorization: Bearer public_key:47800ea0ee541b4c"
require 'faraday' conn = Faraday.new(:url => 'https://api.cloverly.com') conn.get do |req| req.url '/2019-03-beta/purchases' req.headers['Content-Type'] = 'application/json' req.headers['Authorization'] = 'Bearer public_key:47800ea0ee541b4c' end
const request = require('request'); const options = { url: 'https://api.cloverly.com/2019-03-beta/purchases', headers: { 'Content-type': 'application/json', 'Authorization': 'Bearer public_key:47800ea0ee541b4c' } }; request(options, function(error, response, body) { console.log(body); });
package main import "net/http" import "io/ioutil" import "fmt" func main() { client := &http.Client{} req, _ := http.NewRequest("GET", "https://api.cloverly.com/2019-03-beta/purchases", nil) req.Header.Add("Content-type", "application/json") req.Header.Add("Authorization", "Bearer public_key:47800ea0ee541b4c") resp, _ := client.Do(req) defer resp.Body.Close() body, _ := ioutil.ReadAll(resp.Body) fmt.Printf(string(body[:])) }
import requests url = 'https://api.cloverly.com/2019-03-beta/purchases' headers = {'Content-type': 'application/json', 'Authorization': 'Bearer public_key:47800ea0ee541b4c'} r = requests.get(url, headers=headers) print(r.text)
<?php $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "https://api.cloverly.com/2019-03-beta/purchases"); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-type: application/json', 'Authorization: Bearer public_key:47800ea0ee541b4c')); $r = curl_exec($ch); curl_close($ch); echo $r;
[
{
"slug": "string",
"environment": "string",
"state": "string",
"renewable_energy_certificate": {
"slug": "string",
"name": "string",
"city": "string",
"province": "string",
"country": "string",
"renewable_type": "string",
"total_capacity": "string",
"latlng": "string",
"technical_details": "string",
"deprecated": "string"
},
"micro_rec_count": "number",
"micro_units": "number",
"offset": {
"slug": "string",
"name": "string",
"city": "string",
"province": "string",
"country": "string",
"offset_type": "string",
"offset_type_slug": "string",
"total_capacity": "string",
"latlng": "string",
"technical_details": "string",
"available_carbon_in_kg": "string",
"pretty_url": "string"
},
"total_cost_in_usd_cents": "number",
"estimated_at": "string",
"purchased_at": "string",
"equivalent_carbon_in_kg": "number",
"electricity_in_kwh": "string",
"rec_cost_in_usd_cents": "number",
"transaction_cost_in_usd_cents": "number",
"pretty_url": "string"
}
]
Get the details of a specific purchase
curl https://api.cloverly.com/2019-03-beta/purchases/:purchase_slug \ -H "Content-type: application/json" \ -H "Authorization: Bearer public_key:47800ea0ee541b4c"
require 'faraday' conn = Faraday.new(:url => 'https://api.cloverly.com') conn.get do |req| req.url '/2019-03-beta/purchases/:purchase_slug' req.headers['Content-Type'] = 'application/json' req.headers['Authorization'] = 'Bearer public_key:47800ea0ee541b4c' end
const request = require('request'); const options = { url: 'https://api.cloverly.com/2019-03-beta/purchases/:purchase_slug', headers: { 'Content-type': 'application/json', 'Authorization': 'Bearer public_key:47800ea0ee541b4c' } }; request(options, function(error, response, body) { console.log(body); });
package main import "net/http" import "io/ioutil" import "fmt" func main() { client := &http.Client{} req, _ := http.NewRequest("GET", "https://api.cloverly.com/2019-03-beta/purchases/:purchase_slug", nil) req.Header.Add("Content-type", "application/json") req.Header.Add("Authorization", "Bearer public_key:47800ea0ee541b4c") resp, _ := client.Do(req) defer resp.Body.Close() body, _ := ioutil.ReadAll(resp.Body) fmt.Printf(string(body[:])) }
import requests url = 'https://api.cloverly.com/2019-03-beta/purchases/:purchase_slug' headers = {'Content-type': 'application/json', 'Authorization': 'Bearer public_key:47800ea0ee541b4c'} r = requests.get(url, headers=headers) print(r.text)
<?php $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "https://api.cloverly.com/2019-03-beta/purchases/:purchase_slug"); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-type: application/json', 'Authorization: Bearer public_key:47800ea0ee541b4c')); $r = curl_exec($ch); curl_close($ch); echo $r;
Required | |
---|---|
`purchase_slug` | The slug for the purchase |
{
"slug": "string",
"environment": "string",
"state": "string",
"renewable_energy_certificate": {
"slug": "string",
"name": "string",
"city": "string",
"province": "string",
"country": "string",
"renewable_type": "string",
"total_capacity": "string",
"latlng": "string",
"technical_details": "string",
"deprecated": "string"
},
"micro_rec_count": "number",
"micro_units": "number",
"offset": {
"slug": "string",
"name": "string",
"city": "string",
"province": "string",
"country": "string",
"offset_type": "string",
"offset_type_slug": "string",
"total_capacity": "string",
"latlng": "string",
"technical_details": "string",
"available_carbon_in_kg": "string",
"pretty_url": "string"
},
"total_cost_in_usd_cents": "number",
"estimated_at": "string",
"purchased_at": "string",
"equivalent_carbon_in_kg": "number",
"electricity_in_kwh": "string",
"rec_cost_in_usd_cents": "number",
"transaction_cost_in_usd_cents": "number",
"pretty_url": "string"
}
After creating an estimate, use this endpoint to convert that estimate to a purchase.
curl https://api.cloverly.com/2019-03-beta/purchases \ -X POST \ -d '{"estimate_slug":"{estimate_slug}"}' \ -H "Content-type: application/json" \ -H "Authorization: Bearer public_key:47800ea0ee541b4c"
require 'faraday' conn = Faraday.new(:url => 'https://api.cloverly.com') conn.post do |req| req.url '/2019-03-beta/purchases' req.body = '{"estimate_slug":"{estimate_slug}"}' req.headers['Content-Type'] = 'application/json' req.headers['Authorization'] = 'Bearer public_key:47800ea0ee541b4c' end
const request = require('request'); const options = { method: 'post', url: 'https://api.cloverly.com/2019-03-beta/purchases', body: JSON.stringify({"estimate_slug":"{estimate_slug}"}), headers: { 'Content-type': 'application/json', 'Authorization': 'Bearer public_key:47800ea0ee541b4c' } }; request(options, function(error, response, body) { console.log(body); });
package main import "net/http" import "io/ioutil" import "fmt" import "bytes" func main() { client := &http.Client{} var requestData = []byte(`{"estimate_slug":"{estimate_slug}"}`) req, _ := http.NewRequest("POST", "https://api.cloverly.com/2019-03-beta/purchases", bytes.NewBuffer(requestData)) req.Header.Add("Content-type", "application/json") req.Header.Add("Authorization", "Bearer public_key:47800ea0ee541b4c") resp, _ := client.Do(req) defer resp.Body.Close() body, _ := ioutil.ReadAll(resp.Body) fmt.Printf(string(body[:])) }
import requests url = 'https://api.cloverly.com/2019-03-beta/purchases' headers = {'Content-type': 'application/json', 'Authorization': 'Bearer public_key:47800ea0ee541b4c'} data = '{"estimate_slug":"{estimate_slug}"}' r = requests.post(url, headers=headers, data=data) print(r.text)
<?php $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "https://api.cloverly.com/2019-03-beta/purchases"); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, '{"estimate_slug":"{estimate_slug}"}'); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-type: application/json', 'Authorization: Bearer public_key:47800ea0ee541b4c')); $r = curl_exec($ch); curl_close($ch); echo $r;
{
"slug": "string",
"environment": "string",
"state": "string",
"renewable_energy_certificate": {
"slug": "string",
"name": "string",
"city": "string",
"province": "string",
"country": "string",
"renewable_type": "string",
"total_capacity": "string",
"latlng": "string",
"technical_details": "string",
"deprecated": "string"
},
"micro_rec_count": "number",
"micro_units": "number",
"offset": {
"slug": "string",
"name": "string",
"city": "string",
"province": "string",
"country": "string",
"offset_type": "string",
"offset_type_slug": "string",
"total_capacity": "string",
"latlng": "string",
"technical_details": "string",
"available_carbon_in_kg": "string",
"pretty_url": "string"
},
"total_cost_in_usd_cents": "number",
"estimated_at": "string",
"purchased_at": "string",
"equivalent_carbon_in_kg": "number",
"electricity_in_kwh": "string",
"rec_cost_in_usd_cents": "number",
"transaction_cost_in_usd_cents": "number",
"pretty_url": "string"
}
Set the price you would like to pay, then, we calculate the amount of an offset available at that price.
curl https://api.cloverly.com/2019-03-beta/purchases/currency \ -X POST \ -d '{"currency":{"value":357,"units":"usd cents"}}' \ -H "Content-type: application/json" \ -H "Authorization: Bearer public_key:47800ea0ee541b4c"
require 'faraday' conn = Faraday.new(:url => 'https://api.cloverly.com') conn.post do |req| req.url '/2019-03-beta/purchases/currency' req.body = '{"currency":{"value":357,"units":"usd cents"}}' req.headers['Content-Type'] = 'application/json' req.headers['Authorization'] = 'Bearer public_key:47800ea0ee541b4c' end
const request = require('request'); const options = { method: 'post', url: 'https://api.cloverly.com/2019-03-beta/purchases/currency', body: JSON.stringify({"currency":{"value":357,"units":"usd cents"}}), headers: { 'Content-type': 'application/json', 'Authorization': 'Bearer public_key:47800ea0ee541b4c' } }; request(options, function(error, response, body) { console.log(body); });
package main import "net/http" import "io/ioutil" import "fmt" import "bytes" func main() { client := &http.Client{} var requestData = []byte(`{"currency":{"value":357,"units":"usd cents"}}`) req, _ := http.NewRequest("POST", "https://api.cloverly.com/2019-03-beta/purchases/currency", bytes.NewBuffer(requestData)) req.Header.Add("Content-type", "application/json") req.Header.Add("Authorization", "Bearer public_key:47800ea0ee541b4c") resp, _ := client.Do(req) defer resp.Body.Close() body, _ := ioutil.ReadAll(resp.Body) fmt.Printf(string(body[:])) }
import requests url = 'https://api.cloverly.com/2019-03-beta/purchases/currency' headers = {'Content-type': 'application/json', 'Authorization': 'Bearer public_key:47800ea0ee541b4c'} data = '{"currency":{"value":357,"units":"usd cents"}}' r = requests.post(url, headers=headers, data=data) print(r.text)
<?php $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "https://api.cloverly.com/2019-03-beta/purchases/currency"); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, '{"currency":{"value":357,"units":"usd cents"}}'); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-type: application/json', 'Authorization: Bearer public_key:47800ea0ee541b4c')); $r = curl_exec($ch); curl_close($ch); echo $r;
{
"slug": "string",
"environment": "string",
"state": "string",
"renewable_energy_certificate": {
"slug": "string",
"name": "string",
"city": "string",
"province": "string",
"country": "string",
"renewable_type": "string",
"total_capacity": "string",
"latlng": "string",
"technical_details": "string",
"deprecated": "string"
},
"micro_rec_count": "number",
"micro_units": "number",
"offset": {
"slug": "string",
"name": "string",
"city": "string",
"province": "string",
"country": "string",
"offset_type": "string",
"offset_type_slug": "string",
"total_capacity": "string",
"latlng": "string",
"technical_details": "string",
"available_carbon_in_kg": "string",
"pretty_url": "string"
},
"total_cost_in_usd_cents": "number",
"estimated_at": "string",
"purchased_at": "string",
"equivalent_carbon_in_kg": "number",
"electricity_in_kwh": "string",
"rec_cost_in_usd_cents": "number",
"transaction_cost_in_usd_cents": "number",
"pretty_url": "string"
}
Used to purchase offset for carbon
curl https://api.cloverly.com/2019-03-beta/purchases/carbon \ -X POST \ -d '{"weight":{"value":35,"units":"kg"}}' \ -H "Content-type: application/json" \ -H "Authorization: Bearer public_key:47800ea0ee541b4c"
require 'faraday' conn = Faraday.new(:url => 'https://api.cloverly.com') conn.post do |req| req.url '/2019-03-beta/purchases/carbon' req.body = '{"weight":{"value":35,"units":"kg"}}' req.headers['Content-Type'] = 'application/json' req.headers['Authorization'] = 'Bearer public_key:47800ea0ee541b4c' end
const request = require('request'); const options = { method: 'post', url: 'https://api.cloverly.com/2019-03-beta/purchases/carbon', body: JSON.stringify({"weight":{"value":35,"units":"kg"}}), headers: { 'Content-type': 'application/json', 'Authorization': 'Bearer public_key:47800ea0ee541b4c' } }; request(options, function(error, response, body) { console.log(body); });
package main import "net/http" import "io/ioutil" import "fmt" import "bytes" func main() { client := &http.Client{} var requestData = []byte(`{"weight":{"value":35,"units":"kg"}}`) req, _ := http.NewRequest("POST", "https://api.cloverly.com/2019-03-beta/purchases/carbon", bytes.NewBuffer(requestData)) req.Header.Add("Content-type", "application/json") req.Header.Add("Authorization", "Bearer public_key:47800ea0ee541b4c") resp, _ := client.Do(req) defer resp.Body.Close() body, _ := ioutil.ReadAll(resp.Body) fmt.Printf(string(body[:])) }
import requests url = 'https://api.cloverly.com/2019-03-beta/purchases/carbon' headers = {'Content-type': 'application/json', 'Authorization': 'Bearer public_key:47800ea0ee541b4c'} data = '{"weight":{"value":35,"units":"kg"}}' r = requests.post(url, headers=headers, data=data) print(r.text)
<?php $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "https://api.cloverly.com/2019-03-beta/purchases/carbon"); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, '{"weight":{"value":35,"units":"kg"}}'); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-type: application/json', 'Authorization: Bearer public_key:47800ea0ee541b4c')); $r = curl_exec($ch); curl_close($ch); echo $r;
{
"slug": "string",
"environment": "string",
"state": "string",
"renewable_energy_certificate": {
"slug": "string",
"name": "string",
"city": "string",
"province": "string",
"country": "string",
"renewable_type": "string",
"total_capacity": "string",
"latlng": "string",
"technical_details": "string",
"deprecated": "string"
},
"micro_rec_count": "number",
"micro_units": "number",
"offset": {
"slug": "string",
"name": "string",
"city": "string",
"province": "string",
"country": "string",
"offset_type": "string",
"offset_type_slug": "string",
"total_capacity": "string",
"latlng": "string",
"technical_details": "string",
"available_carbon_in_kg": "string",
"pretty_url": "string"
},
"total_cost_in_usd_cents": "number",
"estimated_at": "string",
"purchased_at": "string",
"equivalent_carbon_in_kg": "number",
"electricity_in_kwh": "string",
"rec_cost_in_usd_cents": "number",
"transaction_cost_in_usd_cents": "number",
"pretty_url": "string"
}
Used to offset shipping emissions
curl https://api.cloverly.com/2019-03-beta/purchases/shipping \ -X POST \ -d '{"from":{"zip":"35209"},"to":{"zip":"94043"},"weight":{"value":94,"units":"kg"}}' \ -H "Content-type: application/json" \ -H "Authorization: Bearer public_key:47800ea0ee541b4c"
require 'faraday' conn = Faraday.new(:url => 'https://api.cloverly.com') conn.post do |req| req.url '/2019-03-beta/purchases/shipping' req.body = '{"from":{"zip":"35209"},"to":{"zip":"94043"},"weight":{"value":94,"units":"kg"}}' req.headers['Content-Type'] = 'application/json' req.headers['Authorization'] = 'Bearer public_key:47800ea0ee541b4c' end
const request = require('request'); const options = { method: 'post', url: 'https://api.cloverly.com/2019-03-beta/purchases/shipping', body: JSON.stringify({"from":{"zip":"35209"},"to":{"zip":"94043"},"weight":{"value":94,"units":"kg"}}), headers: { 'Content-type': 'application/json', 'Authorization': 'Bearer public_key:47800ea0ee541b4c' } }; request(options, function(error, response, body) { console.log(body); });
package main import "net/http" import "io/ioutil" import "fmt" import "bytes" func main() { client := &http.Client{} var requestData = []byte(`{"from":{"zip":"35209"},"to":{"zip":"94043"},"weight":{"value":94,"units":"kg"}}`) req, _ := http.NewRequest("POST", "https://api.cloverly.com/2019-03-beta/purchases/shipping", bytes.NewBuffer(requestData)) req.Header.Add("Content-type", "application/json") req.Header.Add("Authorization", "Bearer public_key:47800ea0ee541b4c") resp, _ := client.Do(req) defer resp.Body.Close() body, _ := ioutil.ReadAll(resp.Body) fmt.Printf(string(body[:])) }
import requests url = 'https://api.cloverly.com/2019-03-beta/purchases/shipping' headers = {'Content-type': 'application/json', 'Authorization': 'Bearer public_key:47800ea0ee541b4c'} data = '{"from":{"zip":"35209"},"to":{"zip":"94043"},"weight":{"value":94,"units":"kg"}}' r = requests.post(url, headers=headers, data=data) print(r.text)
<?php $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "https://api.cloverly.com/2019-03-beta/purchases/shipping"); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, '{"from":{"zip":"35209"},"to":{"zip":"94043"},"weight":{"value":94,"units":"kg"}}'); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-type: application/json', 'Authorization: Bearer public_key:47800ea0ee541b4c')); $r = curl_exec($ch); curl_close($ch); echo $r;
{
"slug": "string",
"environment": "string",
"state": "string",
"renewable_energy_certificate": {
"slug": "string",
"name": "string",
"city": "string",
"province": "string",
"country": "string",
"renewable_type": "string",
"total_capacity": "string",
"latlng": "string",
"technical_details": "string",
"deprecated": "string"
},
"micro_rec_count": "number",
"micro_units": "number",
"offset": {
"slug": "string",
"name": "string",
"city": "string",
"province": "string",
"country": "string",
"offset_type": "string",
"offset_type_slug": "string",
"total_capacity": "string",
"latlng": "string",
"technical_details": "string",
"available_carbon_in_kg": "string",
"pretty_url": "string"
},
"total_cost_in_usd_cents": "number",
"estimated_at": "string",
"purchased_at": "string",
"equivalent_carbon_in_kg": "number",
"electricity_in_kwh": "string",
"rec_cost_in_usd_cents": "number",
"transaction_cost_in_usd_cents": "number",
"pretty_url": "string"
}
Offset emissions of vechicle transportation using gasoline or diesel.
curl https://api.cloverly.com/2019-03-beta/purchases/vehicle \ -X POST \ -d '{"distance":{"value":55,"units":"km"},"fuel_efficiency":{"value":25,"units":"mpg","of":"gasoline"}}' \ -H "Content-type: application/json" \ -H "Authorization: Bearer public_key:47800ea0ee541b4c"
require 'faraday' conn = Faraday.new(:url => 'https://api.cloverly.com') conn.post do |req| req.url '/2019-03-beta/purchases/vehicle' req.body = '{"distance":{"value":55,"units":"km"},"fuel_efficiency":{"value":25,"units":"mpg","of":"gasoline"}}' req.headers['Content-Type'] = 'application/json' req.headers['Authorization'] = 'Bearer public_key:47800ea0ee541b4c' end
const request = require('request'); const options = { method: 'post', url: 'https://api.cloverly.com/2019-03-beta/purchases/vehicle', body: JSON.stringify({"distance":{"value":55,"units":"km"},"fuel_efficiency":{"value":25,"units":"mpg","of":"gasoline"}}), headers: { 'Content-type': 'application/json', 'Authorization': 'Bearer public_key:47800ea0ee541b4c' } }; request(options, function(error, response, body) { console.log(body); });
package main import "net/http" import "io/ioutil" import "fmt" import "bytes" func main() { client := &http.Client{} var requestData = []byte(`{"distance":{"value":55,"units":"km"},"fuel_efficiency":{"value":25,"units":"mpg","of":"gasoline"}}`) req, _ := http.NewRequest("POST", "https://api.cloverly.com/2019-03-beta/purchases/vehicle", bytes.NewBuffer(requestData)) req.Header.Add("Content-type", "application/json") req.Header.Add("Authorization", "Bearer public_key:47800ea0ee541b4c") resp, _ := client.Do(req) defer resp.Body.Close() body, _ := ioutil.ReadAll(resp.Body) fmt.Printf(string(body[:])) }
import requests url = 'https://api.cloverly.com/2019-03-beta/purchases/vehicle' headers = {'Content-type': 'application/json', 'Authorization': 'Bearer public_key:47800ea0ee541b4c'} data = '{"distance":{"value":55,"units":"km"},"fuel_efficiency":{"value":25,"units":"mpg","of":"gasoline"}}' r = requests.post(url, headers=headers, data=data) print(r.text)
<?php $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "https://api.cloverly.com/2019-03-beta/purchases/vehicle"); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, '{"distance":{"value":55,"units":"km"},"fuel_efficiency":{"value":25,"units":"mpg","of":"gasoline"}}'); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-type: application/json', 'Authorization: Bearer public_key:47800ea0ee541b4c')); $r = curl_exec($ch); curl_close($ch); echo $r;
{
"slug": "string",
"environment": "string",
"state": "string",
"renewable_energy_certificate": {
"slug": "string",
"name": "string",
"city": "string",
"province": "string",
"country": "string",
"renewable_type": "string",
"total_capacity": "string",
"latlng": "string",
"technical_details": "string",
"deprecated": "string"
},
"micro_rec_count": "number",
"micro_units": "number",
"offset": {
"slug": "string",
"name": "string",
"city": "string",
"province": "string",
"country": "string",
"offset_type": "string",
"offset_type_slug": "string",
"total_capacity": "string",
"latlng": "string",
"technical_details": "string",
"available_carbon_in_kg": "string",
"pretty_url": "string"
},
"total_cost_in_usd_cents": "number",
"estimated_at": "string",
"purchased_at": "string",
"equivalent_carbon_in_kg": "number",
"electricity_in_kwh": "string",
"rec_cost_in_usd_cents": "number",
"transaction_cost_in_usd_cents": "number",
"pretty_url": "string"
}
Offset emissions of airline travel
curl https://api.cloverly.com/2019-03-beta/purchases/flight \ -X POST \ -d '{"airports":["sfo","atl","fra"]}' \ -H "Content-type: application/json" \ -H "Authorization: Bearer public_key:47800ea0ee541b4c"
require 'faraday' conn = Faraday.new(:url => 'https://api.cloverly.com') conn.post do |req| req.url '/2019-03-beta/purchases/flight' req.body = '{"airports":["sfo","atl","fra"]}' req.headers['Content-Type'] = 'application/json' req.headers['Authorization'] = 'Bearer public_key:47800ea0ee541b4c' end
const request = require('request'); const options = { method: 'post', url: 'https://api.cloverly.com/2019-03-beta/purchases/flight', body: JSON.stringify({"airports":["sfo","atl","fra"]}), headers: { 'Content-type': 'application/json', 'Authorization': 'Bearer public_key:47800ea0ee541b4c' } }; request(options, function(error, response, body) { console.log(body); });
package main import "net/http" import "io/ioutil" import "fmt" import "bytes" func main() { client := &http.Client{} var requestData = []byte(`{"airports":["sfo","atl","fra"]}`) req, _ := http.NewRequest("POST", "https://api.cloverly.com/2019-03-beta/purchases/flight", bytes.NewBuffer(requestData)) req.Header.Add("Content-type", "application/json") req.Header.Add("Authorization", "Bearer public_key:47800ea0ee541b4c") resp, _ := client.Do(req) defer resp.Body.Close() body, _ := ioutil.ReadAll(resp.Body) fmt.Printf(string(body[:])) }
import requests url = 'https://api.cloverly.com/2019-03-beta/purchases/flight' headers = {'Content-type': 'application/json', 'Authorization': 'Bearer public_key:47800ea0ee541b4c'} data = '{"airports":["sfo","atl","fra"]}' r = requests.post(url, headers=headers, data=data) print(r.text)
<?php $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "https://api.cloverly.com/2019-03-beta/purchases/flight"); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, '{"airports":["sfo","atl","fra"]}'); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-type: application/json', 'Authorization: Bearer public_key:47800ea0ee541b4c')); $r = curl_exec($ch); curl_close($ch); echo $r;
{
"slug": "string",
"environment": "string",
"state": "string",
"renewable_energy_certificate": {
"slug": "string",
"name": "string",
"city": "string",
"province": "string",
"country": "string",
"renewable_type": "string",
"total_capacity": "string",
"latlng": "string",
"technical_details": "string",
"deprecated": "string"
},
"micro_rec_count": "number",
"micro_units": "number",
"offset": {
"slug": "string",
"name": "string",
"city": "string",
"province": "string",
"country": "string",
"offset_type": "string",
"offset_type_slug": "string",
"total_capacity": "string",
"latlng": "string",
"technical_details": "string",
"available_carbon_in_kg": "string",
"pretty_url": "string"
},
"total_cost_in_usd_cents": "number",
"estimated_at": "string",
"purchased_at": "string",
"equivalent_carbon_in_kg": "number",
"electricity_in_kwh": "string",
"rec_cost_in_usd_cents": "number",
"transaction_cost_in_usd_cents": "number",
"pretty_url": "string"
}
Purchase a renewable energy certificate for electricity
curl https://api.cloverly.com/2019-03-beta/purchases/electricity \ -X POST \ -d '{"energy":{"value":200,"units":"kwh"}}' \ -H "Content-type: application/json" \ -H "Authorization: Bearer public_key:47800ea0ee541b4c"
require 'faraday' conn = Faraday.new(:url => 'https://api.cloverly.com') conn.post do |req| req.url '/2019-03-beta/purchases/electricity' req.body = '{"energy":{"value":200,"units":"kwh"}}' req.headers['Content-Type'] = 'application/json' req.headers['Authorization'] = 'Bearer public_key:47800ea0ee541b4c' end
const request = require('request'); const options = { method: 'post', url: 'https://api.cloverly.com/2019-03-beta/purchases/electricity', body: JSON.stringify({"energy":{"value":200,"units":"kwh"}}), headers: { 'Content-type': 'application/json', 'Authorization': 'Bearer public_key:47800ea0ee541b4c' } }; request(options, function(error, response, body) { console.log(body); });
package main import "net/http" import "io/ioutil" import "fmt" import "bytes" func main() { client := &http.Client{} var requestData = []byte(`{"energy":{"value":200,"units":"kwh"}}`) req, _ := http.NewRequest("POST", "https://api.cloverly.com/2019-03-beta/purchases/electricity", bytes.NewBuffer(requestData)) req.Header.Add("Content-type", "application/json") req.Header.Add("Authorization", "Bearer public_key:47800ea0ee541b4c") resp, _ := client.Do(req) defer resp.Body.Close() body, _ := ioutil.ReadAll(resp.Body) fmt.Printf(string(body[:])) }
import requests url = 'https://api.cloverly.com/2019-03-beta/purchases/electricity' headers = {'Content-type': 'application/json', 'Authorization': 'Bearer public_key:47800ea0ee541b4c'} data = '{"energy":{"value":200,"units":"kwh"}}' r = requests.post(url, headers=headers, data=data) print(r.text)
<?php $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "https://api.cloverly.com/2019-03-beta/purchases/electricity"); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, '{"energy":{"value":200,"units":"kwh"}}'); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-type: application/json', 'Authorization: Bearer public_key:47800ea0ee541b4c')); $r = curl_exec($ch); curl_close($ch); echo $r;
{
"slug": "string",
"environment": "string",
"state": "string",
"renewable_energy_certificate": {
"slug": "string",
"name": "string",
"city": "string",
"province": "string",
"country": "string",
"renewable_type": "string",
"total_capacity": "string",
"latlng": "string",
"technical_details": "string",
"deprecated": "string"
},
"micro_rec_count": "number",
"micro_units": "number",
"offset": {
"slug": "string",
"name": "string",
"city": "string",
"province": "string",
"country": "string",
"offset_type": "string",
"offset_type_slug": "string",
"total_capacity": "string",
"latlng": "string",
"technical_details": "string",
"available_carbon_in_kg": "string",
"pretty_url": "string"
},
"total_cost_in_usd_cents": "number",
"estimated_at": "string",
"purchased_at": "string",
"equivalent_carbon_in_kg": "number",
"electricity_in_kwh": "string",
"rec_cost_in_usd_cents": "number",
"transaction_cost_in_usd_cents": "number",
"pretty_url": "string"
}
Cancel the purchase of an offset. It is not possible to cancel offsets once they have been retired.
curl https://api.cloverly.com/2019-03-beta/purchases/:purchase_slug \ -X DELETE \ -H "Content-type: application/json" \ -H "Authorization: Bearer public_key:47800ea0ee541b4c"
require 'faraday' conn = Faraday.new(:url => 'https://api.cloverly.com') conn.delete do |req| req.url '/2019-03-beta/purchases/:purchase_slug' req.headers['Content-Type'] = 'application/json' req.headers['Authorization'] = 'Bearer public_key:47800ea0ee541b4c' end
const request = require('request'); const options = { method: 'delete', url: 'https://api.cloverly.com/2019-03-beta/purchases/:purchase_slug', headers: { 'Content-type': 'application/json', 'Authorization': 'Bearer public_key:47800ea0ee541b4c' } }; request(options, function(error, response, body) { console.log(body); });
package main import "net/http" import "io/ioutil" import "fmt" func main() { client := &http.Client{} req, _ := http.NewRequest("DELETE", "https://api.cloverly.com/2019-03-beta/purchases/:purchase_slug", nil) req.Header.Add("Content-type", "application/json") req.Header.Add("Authorization", "Bearer public_key:47800ea0ee541b4c") resp, _ := client.Do(req) defer resp.Body.Close() body, _ := ioutil.ReadAll(resp.Body) fmt.Printf(string(body[:])) }
import requests url = 'https://api.cloverly.com/2019-03-beta/purchases/:purchase_slug' headers = {'Content-type': 'application/json', 'Authorization': 'Bearer public_key:47800ea0ee541b4c'} r = requests.delete(url, headers=headers) print(r.text)
<?php $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "https://api.cloverly.com/2019-03-beta/purchases/:purchase_slug"); curl_setopt($ch, CURLOPT_DELETE, 1); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-type: application/json', 'Authorization: Bearer public_key:47800ea0ee541b4c')); $r = curl_exec($ch); curl_close($ch); echo $r;
Required | |
---|---|
`purchase_slug` | The slug for the purchase |
{
"slug": "string",
"environment": "string",
"state": "string",
"renewable_energy_certificate": {
"slug": "string",
"name": "string",
"city": "string",
"province": "string",
"country": "string",
"renewable_type": "string",
"total_capacity": "string",
"latlng": "string",
"technical_details": "string",
"deprecated": "string"
},
"micro_rec_count": "number",
"micro_units": "number",
"offset": {
"slug": "string",
"name": "string",
"city": "string",
"province": "string",
"country": "string",
"offset_type": "string",
"offset_type_slug": "string",
"total_capacity": "string",
"latlng": "string",
"technical_details": "string",
"available_carbon_in_kg": "string",
"pretty_url": "string"
},
"total_cost_in_usd_cents": "number",
"estimated_at": "string",
"purchased_at": "string",
"equivalent_carbon_in_kg": "number",
"electricity_in_kwh": "string",
"rec_cost_in_usd_cents": "number",
"transaction_cost_in_usd_cents": "number",
"pretty_url": "string"
}
Get the full list of estimates for account.
curl https://api.cloverly.com/2019-03-beta/estimates \ -H "Content-type: application/json" \ -H "Authorization: Bearer public_key:47800ea0ee541b4c"
require 'faraday' conn = Faraday.new(:url => 'https://api.cloverly.com') conn.get do |req| req.url '/2019-03-beta/estimates' req.headers['Content-Type'] = 'application/json' req.headers['Authorization'] = 'Bearer public_key:47800ea0ee541b4c' end
const request = require('request'); const options = { url: 'https://api.cloverly.com/2019-03-beta/estimates', headers: { 'Content-type': 'application/json', 'Authorization': 'Bearer public_key:47800ea0ee541b4c' } }; request(options, function(error, response, body) { console.log(body); });
package main import "net/http" import "io/ioutil" import "fmt" func main() { client := &http.Client{} req, _ := http.NewRequest("GET", "https://api.cloverly.com/2019-03-beta/estimates", nil) req.Header.Add("Content-type", "application/json") req.Header.Add("Authorization", "Bearer public_key:47800ea0ee541b4c") resp, _ := client.Do(req) defer resp.Body.Close() body, _ := ioutil.ReadAll(resp.Body) fmt.Printf(string(body[:])) }
import requests url = 'https://api.cloverly.com/2019-03-beta/estimates' headers = {'Content-type': 'application/json', 'Authorization': 'Bearer public_key:47800ea0ee541b4c'} r = requests.get(url, headers=headers) print(r.text)
<?php $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "https://api.cloverly.com/2019-03-beta/estimates"); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-type: application/json', 'Authorization: Bearer public_key:47800ea0ee541b4c')); $r = curl_exec($ch); curl_close($ch); echo $r;
[
{
"slug": "string",
"environment": "string",
"state": "string",
"renewable_energy_certificate": {
"slug": "string",
"name": "string",
"city": "string",
"province": "string",
"country": "string",
"renewable_type": "string",
"total_capacity": "string",
"latlng": "string",
"technical_details": "string",
"deprecated": "string"
},
"micro_rec_count": "number",
"micro_units": "number",
"offset": {
"slug": "string",
"name": "string",
"city": "string",
"province": "string",
"country": "string",
"offset_type": "string",
"offset_type_slug": "string",
"total_capacity": "string",
"latlng": "string",
"technical_details": "string",
"available_carbon_in_kg": "string",
"pretty_url": "string"
},
"total_cost_in_usd_cents": "number",
"estimated_at": "string",
"equivalent_carbon_in_kg": "number",
"electricity_in_kwh": "string",
"rec_cost_in_usd_cents": "number",
"transaction_cost_in_usd_cents": "number",
"pretty_url": "string"
}
]
Get the details of a specific estimate
curl https://api.cloverly.com/2019-03-beta/estimates/:estimate_slug \ -H "Content-type: application/json" \ -H "Authorization: Bearer public_key:47800ea0ee541b4c"
require 'faraday' conn = Faraday.new(:url => 'https://api.cloverly.com') conn.get do |req| req.url '/2019-03-beta/estimates/:estimate_slug' req.headers['Content-Type'] = 'application/json' req.headers['Authorization'] = 'Bearer public_key:47800ea0ee541b4c' end
const request = require('request'); const options = { url: 'https://api.cloverly.com/2019-03-beta/estimates/:estimate_slug', headers: { 'Content-type': 'application/json', 'Authorization': 'Bearer public_key:47800ea0ee541b4c' } }; request(options, function(error, response, body) { console.log(body); });
package main import "net/http" import "io/ioutil" import "fmt" func main() { client := &http.Client{} req, _ := http.NewRequest("GET", "https://api.cloverly.com/2019-03-beta/estimates/:estimate_slug", nil) req.Header.Add("Content-type", "application/json") req.Header.Add("Authorization", "Bearer public_key:47800ea0ee541b4c") resp, _ := client.Do(req) defer resp.Body.Close() body, _ := ioutil.ReadAll(resp.Body) fmt.Printf(string(body[:])) }
import requests url = 'https://api.cloverly.com/2019-03-beta/estimates/:estimate_slug' headers = {'Content-type': 'application/json', 'Authorization': 'Bearer public_key:47800ea0ee541b4c'} r = requests.get(url, headers=headers) print(r.text)
<?php $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "https://api.cloverly.com/2019-03-beta/estimates/:estimate_slug"); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-type: application/json', 'Authorization: Bearer public_key:47800ea0ee541b4c')); $r = curl_exec($ch); curl_close($ch); echo $r;
{
"slug": "string",
"environment": "string",
"state": "string",
"renewable_energy_certificate": {
"slug": "string",
"name": "string",
"city": "string",
"province": "string",
"country": "string",
"renewable_type": "string",
"total_capacity": "string",
"latlng": "string",
"technical_details": "string",
"deprecated": "string"
},
"micro_rec_count": "number",
"micro_units": "number",
"offset": {
"slug": "string",
"name": "string",
"city": "string",
"province": "string",
"country": "string",
"offset_type": "string",
"offset_type_slug": "string",
"total_capacity": "string",
"latlng": "string",
"technical_details": "string",
"available_carbon_in_kg": "string",
"pretty_url": "string"
},
"total_cost_in_usd_cents": "number",
"estimated_at": "string",
"equivalent_carbon_in_kg": "number",
"electricity_in_kwh": "string",
"rec_cost_in_usd_cents": "number",
"transaction_cost_in_usd_cents": "number",
"pretty_url": "string"
}
Set the price you would like to pay, then, we calculate the amount of offsets available at that price.
curl https://api.cloverly.com/2019-03-beta/estimates/currency \ -X POST \ -d '{"currency":{"value":357,"units":"usd cents"}}' \ -H "Content-type: application/json" \ -H "Authorization: Bearer public_key:47800ea0ee541b4c"
require 'faraday' conn = Faraday.new(:url => 'https://api.cloverly.com') conn.post do |req| req.url '/2019-03-beta/estimates/currency' req.body = '{"currency":{"value":357,"units":"usd cents"}}' req.headers['Content-Type'] = 'application/json' req.headers['Authorization'] = 'Bearer public_key:47800ea0ee541b4c' end
const request = require('request'); const options = { method: 'post', url: 'https://api.cloverly.com/2019-03-beta/estimates/currency', body: JSON.stringify({"currency":{"value":357,"units":"usd cents"}}), headers: { 'Content-type': 'application/json', 'Authorization': 'Bearer public_key:47800ea0ee541b4c' } }; request(options, function(error, response, body) { console.log(body); });
package main import "net/http" import "io/ioutil" import "fmt" import "bytes" func main() { client := &http.Client{} var requestData = []byte(`{"currency":{"value":357,"units":"usd cents"}}`) req, _ := http.NewRequest("POST", "https://api.cloverly.com/2019-03-beta/estimates/currency", bytes.NewBuffer(requestData)) req.Header.Add("Content-type", "application/json") req.Header.Add("Authorization", "Bearer public_key:47800ea0ee541b4c") resp, _ := client.Do(req) defer resp.Body.Close() body, _ := ioutil.ReadAll(resp.Body) fmt.Printf(string(body[:])) }
import requests url = 'https://api.cloverly.com/2019-03-beta/estimates/currency' headers = {'Content-type': 'application/json', 'Authorization': 'Bearer public_key:47800ea0ee541b4c'} data = '{"currency":{"value":357,"units":"usd cents"}}' r = requests.post(url, headers=headers, data=data) print(r.text)
<?php $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "https://api.cloverly.com/2019-03-beta/estimates/currency"); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, '{"currency":{"value":357,"units":"usd cents"}}'); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-type: application/json', 'Authorization: Bearer public_key:47800ea0ee541b4c')); $r = curl_exec($ch); curl_close($ch); echo $r;
{
"slug": "string",
"environment": "string",
"state": "string",
"renewable_energy_certificate": {
"slug": "string",
"name": "string",
"city": "string",
"province": "string",
"country": "string",
"renewable_type": "string",
"total_capacity": "string",
"latlng": "string",
"technical_details": "string",
"deprecated": "string"
},
"micro_rec_count": "number",
"micro_units": "number",
"offset": {
"slug": "string",
"name": "string",
"city": "string",
"province": "string",
"country": "string",
"offset_type": "string",
"offset_type_slug": "string",
"total_capacity": "string",
"latlng": "string",
"technical_details": "string",
"available_carbon_in_kg": "string",
"pretty_url": "string"
},
"total_cost_in_usd_cents": "number",
"estimated_at": "string",
"equivalent_carbon_in_kg": "number",
"electricity_in_kwh": "string",
"rec_cost_in_usd_cents": "number",
"transaction_cost_in_usd_cents": "number",
"pretty_url": "string"
}
Estimate an offset
curl https://api.cloverly.com/2019-03-beta/estimates/carbon \ -X POST \ -d '{"weight":{"value":35,"units":"kg"}}' \ -H "Content-type: application/json" \ -H "Authorization: Bearer public_key:47800ea0ee541b4c"
require 'faraday' conn = Faraday.new(:url => 'https://api.cloverly.com') conn.post do |req| req.url '/2019-03-beta/estimates/carbon' req.body = '{"weight":{"value":35,"units":"kg"}}' req.headers['Content-Type'] = 'application/json' req.headers['Authorization'] = 'Bearer public_key:47800ea0ee541b4c' end
const request = require('request'); const options = { method: 'post', url: 'https://api.cloverly.com/2019-03-beta/estimates/carbon', body: JSON.stringify({"weight":{"value":35,"units":"kg"}}), headers: { 'Content-type': 'application/json', 'Authorization': 'Bearer public_key:47800ea0ee541b4c' } }; request(options, function(error, response, body) { console.log(body); });
package main import "net/http" import "io/ioutil" import "fmt" import "bytes" func main() { client := &http.Client{} var requestData = []byte(`{"weight":{"value":35,"units":"kg"}}`) req, _ := http.NewRequest("POST", "https://api.cloverly.com/2019-03-beta/estimates/carbon", bytes.NewBuffer(requestData)) req.Header.Add("Content-type", "application/json") req.Header.Add("Authorization", "Bearer public_key:47800ea0ee541b4c") resp, _ := client.Do(req) defer resp.Body.Close() body, _ := ioutil.ReadAll(resp.Body) fmt.Printf(string(body[:])) }
import requests url = 'https://api.cloverly.com/2019-03-beta/estimates/carbon' headers = {'Content-type': 'application/json', 'Authorization': 'Bearer public_key:47800ea0ee541b4c'} data = '{"weight":{"value":35,"units":"kg"}}' r = requests.post(url, headers=headers, data=data) print(r.text)
<?php $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "https://api.cloverly.com/2019-03-beta/estimates/carbon"); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, '{"weight":{"value":35,"units":"kg"}}'); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-type: application/json', 'Authorization: Bearer public_key:47800ea0ee541b4c')); $r = curl_exec($ch); curl_close($ch); echo $r;
{
"slug": "string",
"environment": "string",
"state": "string",
"renewable_energy_certificate": {
"slug": "string",
"name": "string",
"city": "string",
"province": "string",
"country": "string",
"renewable_type": "string",
"total_capacity": "string",
"latlng": "string",
"technical_details": "string",
"deprecated": "string"
},
"micro_rec_count": "number",
"micro_units": "number",
"offset": {
"slug": "string",
"name": "string",
"city": "string",
"province": "string",
"country": "string",
"offset_type": "string",
"offset_type_slug": "string",
"total_capacity": "string",
"latlng": "string",
"technical_details": "string",
"available_carbon_in_kg": "string",
"pretty_url": "string"
},
"total_cost_in_usd_cents": "number",
"estimated_at": "string",
"equivalent_carbon_in_kg": "number",
"electricity_in_kwh": "string",
"rec_cost_in_usd_cents": "number",
"transaction_cost_in_usd_cents": "number",
"pretty_url": "string"
}
Estimate an offset for shipping emissions
curl https://api.cloverly.com/2019-03-beta/estimates/shipping \ -X POST \ -d '{"from":{"zip":"35209"},"to":{"zip":"94043"},"weight":{"value":94,"units":"kg"}}' \ -H "Content-type: application/json" \ -H "Authorization: Bearer public_key:47800ea0ee541b4c"
require 'faraday' conn = Faraday.new(:url => 'https://api.cloverly.com') conn.post do |req| req.url '/2019-03-beta/estimates/shipping' req.body = '{"from":{"zip":"35209"},"to":{"zip":"94043"},"weight":{"value":94,"units":"kg"}}' req.headers['Content-Type'] = 'application/json' req.headers['Authorization'] = 'Bearer public_key:47800ea0ee541b4c' end
const request = require('request'); const options = { method: 'post', url: 'https://api.cloverly.com/2019-03-beta/estimates/shipping', body: JSON.stringify({"from":{"zip":"35209"},"to":{"zip":"94043"},"weight":{"value":94,"units":"kg"}}), headers: { 'Content-type': 'application/json', 'Authorization': 'Bearer public_key:47800ea0ee541b4c' } }; request(options, function(error, response, body) { console.log(body); });
package main import "net/http" import "io/ioutil" import "fmt" import "bytes" func main() { client := &http.Client{} var requestData = []byte(`{"from":{"zip":"35209"},"to":{"zip":"94043"},"weight":{"value":94,"units":"kg"}}`) req, _ := http.NewRequest("POST", "https://api.cloverly.com/2019-03-beta/estimates/shipping", bytes.NewBuffer(requestData)) req.Header.Add("Content-type", "application/json") req.Header.Add("Authorization", "Bearer public_key:47800ea0ee541b4c") resp, _ := client.Do(req) defer resp.Body.Close() body, _ := ioutil.ReadAll(resp.Body) fmt.Printf(string(body[:])) }
import requests url = 'https://api.cloverly.com/2019-03-beta/estimates/shipping' headers = {'Content-type': 'application/json', 'Authorization': 'Bearer public_key:47800ea0ee541b4c'} data = '{"from":{"zip":"35209"},"to":{"zip":"94043"},"weight":{"value":94,"units":"kg"}}' r = requests.post(url, headers=headers, data=data) print(r.text)
<?php $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "https://api.cloverly.com/2019-03-beta/estimates/shipping"); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, '{"from":{"zip":"35209"},"to":{"zip":"94043"},"weight":{"value":94,"units":"kg"}}'); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-type: application/json', 'Authorization: Bearer public_key:47800ea0ee541b4c')); $r = curl_exec($ch); curl_close($ch); echo $r;
{
"slug": "string",
"environment": "string",
"state": "string",
"renewable_energy_certificate": {
"slug": "string",
"name": "string",
"city": "string",
"province": "string",
"country": "string",
"renewable_type": "string",
"total_capacity": "string",
"latlng": "string",
"technical_details": "string",
"deprecated": "string"
},
"micro_rec_count": "number",
"micro_units": "number",
"offset": {
"slug": "string",
"name": "string",
"city": "string",
"province": "string",
"country": "string",
"offset_type": "string",
"offset_type_slug": "string",
"total_capacity": "string",
"latlng": "string",
"technical_details": "string",
"available_carbon_in_kg": "string",
"pretty_url": "string"
},
"total_cost_in_usd_cents": "number",
"estimated_at": "string",
"equivalent_carbon_in_kg": "number",
"electricity_in_kwh": "string",
"rec_cost_in_usd_cents": "number",
"transaction_cost_in_usd_cents": "number",
"pretty_url": "string"
}
Estimate the offset emissions of vechicle transportation using gasoline or diesel.
curl https://api.cloverly.com/2019-03-beta/estimates/vehicle \ -X POST \ -d '{"distance":{"value":55,"units":"km"},"fuel_efficiency":{"value":25,"units":"mpg","of":"gasoline"}}' \ -H "Content-type: application/json" \ -H "Authorization: Bearer public_key:47800ea0ee541b4c"
require 'faraday' conn = Faraday.new(:url => 'https://api.cloverly.com') conn.post do |req| req.url '/2019-03-beta/estimates/vehicle' req.body = '{"distance":{"value":55,"units":"km"},"fuel_efficiency":{"value":25,"units":"mpg","of":"gasoline"}}' req.headers['Content-Type'] = 'application/json' req.headers['Authorization'] = 'Bearer public_key:47800ea0ee541b4c' end
const request = require('request'); const options = { method: 'post', url: 'https://api.cloverly.com/2019-03-beta/estimates/vehicle', body: JSON.stringify({"distance":{"value":55,"units":"km"},"fuel_efficiency":{"value":25,"units":"mpg","of":"gasoline"}}), headers: { 'Content-type': 'application/json', 'Authorization': 'Bearer public_key:47800ea0ee541b4c' } }; request(options, function(error, response, body) { console.log(body); });
package main import "net/http" import "io/ioutil" import "fmt" import "bytes" func main() { client := &http.Client{} var requestData = []byte(`{"distance":{"value":55,"units":"km"},"fuel_efficiency":{"value":25,"units":"mpg","of":"gasoline"}}`) req, _ := http.NewRequest("POST", "https://api.cloverly.com/2019-03-beta/estimates/vehicle", bytes.NewBuffer(requestData)) req.Header.Add("Content-type", "application/json") req.Header.Add("Authorization", "Bearer public_key:47800ea0ee541b4c") resp, _ := client.Do(req) defer resp.Body.Close() body, _ := ioutil.ReadAll(resp.Body) fmt.Printf(string(body[:])) }
import requests url = 'https://api.cloverly.com/2019-03-beta/estimates/vehicle' headers = {'Content-type': 'application/json', 'Authorization': 'Bearer public_key:47800ea0ee541b4c'} data = '{"distance":{"value":55,"units":"km"},"fuel_efficiency":{"value":25,"units":"mpg","of":"gasoline"}}' r = requests.post(url, headers=headers, data=data) print(r.text)
<?php $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "https://api.cloverly.com/2019-03-beta/estimates/vehicle"); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, '{"distance":{"value":55,"units":"km"},"fuel_efficiency":{"value":25,"units":"mpg","of":"gasoline"}}'); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-type: application/json', 'Authorization: Bearer public_key:47800ea0ee541b4c')); $r = curl_exec($ch); curl_close($ch); echo $r;
{
"slug": "string",
"environment": "string",
"state": "string",
"renewable_energy_certificate": {
"slug": "string",
"name": "string",
"city": "string",
"province": "string",
"country": "string",
"renewable_type": "string",
"total_capacity": "string",
"latlng": "string",
"technical_details": "string",
"deprecated": "string"
},
"micro_rec_count": "number",
"micro_units": "number",
"offset": {
"slug": "string",
"name": "string",
"city": "string",
"province": "string",
"country": "string",
"offset_type": "string",
"offset_type_slug": "string",
"total_capacity": "string",
"latlng": "string",
"technical_details": "string",
"available_carbon_in_kg": "string",
"pretty_url": "string"
},
"total_cost_in_usd_cents": "number",
"estimated_at": "string",
"equivalent_carbon_in_kg": "number",
"electricity_in_kwh": "string",
"rec_cost_in_usd_cents": "number",
"transaction_cost_in_usd_cents": "number",
"pretty_url": "string"
}
Estimate the offset emissions of airline travel
curl https://api.cloverly.com/2019-03-beta/estimates/flight \ -X POST \ -d '{"airports":["sfo","atl","fra"]}' \ -H "Content-type: application/json" \ -H "Authorization: Bearer public_key:47800ea0ee541b4c"
require 'faraday' conn = Faraday.new(:url => 'https://api.cloverly.com') conn.post do |req| req.url '/2019-03-beta/estimates/flight' req.body = '{"airports":["sfo","atl","fra"]}' req.headers['Content-Type'] = 'application/json' req.headers['Authorization'] = 'Bearer public_key:47800ea0ee541b4c' end
const request = require('request'); const options = { method: 'post', url: 'https://api.cloverly.com/2019-03-beta/estimates/flight', body: JSON.stringify({"airports":["sfo","atl","fra"]}), headers: { 'Content-type': 'application/json', 'Authorization': 'Bearer public_key:47800ea0ee541b4c' } }; request(options, function(error, response, body) { console.log(body); });
package main import "net/http" import "io/ioutil" import "fmt" import "bytes" func main() { client := &http.Client{} var requestData = []byte(`{"airports":["sfo","atl","fra"]}`) req, _ := http.NewRequest("POST", "https://api.cloverly.com/2019-03-beta/estimates/flight", bytes.NewBuffer(requestData)) req.Header.Add("Content-type", "application/json") req.Header.Add("Authorization", "Bearer public_key:47800ea0ee541b4c") resp, _ := client.Do(req) defer resp.Body.Close() body, _ := ioutil.ReadAll(resp.Body) fmt.Printf(string(body[:])) }
import requests url = 'https://api.cloverly.com/2019-03-beta/estimates/flight' headers = {'Content-type': 'application/json', 'Authorization': 'Bearer public_key:47800ea0ee541b4c'} data = '{"airports":["sfo","atl","fra"]}' r = requests.post(url, headers=headers, data=data) print(r.text)
<?php $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "https://api.cloverly.com/2019-03-beta/estimates/flight"); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, '{"airports":["sfo","atl","fra"]}'); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-type: application/json', 'Authorization: Bearer public_key:47800ea0ee541b4c')); $r = curl_exec($ch); curl_close($ch); echo $r;
{
"slug": "string",
"environment": "string",
"state": "string",
"renewable_energy_certificate": {
"slug": "string",
"name": "string",
"city": "string",
"province": "string",
"country": "string",
"renewable_type": "string",
"total_capacity": "string",
"latlng": "string",
"technical_details": "string",
"deprecated": "string"
},
"micro_rec_count": "number",
"micro_units": "number",
"offset": {
"slug": "string",
"name": "string",
"city": "string",
"province": "string",
"country": "string",
"offset_type": "string",
"offset_type_slug": "string",
"total_capacity": "string",
"latlng": "string",
"technical_details": "string",
"available_carbon_in_kg": "string",
"pretty_url": "string"
},
"total_cost_in_usd_cents": "number",
"estimated_at": "string",
"equivalent_carbon_in_kg": "number",
"electricity_in_kwh": "string",
"rec_cost_in_usd_cents": "number",
"transaction_cost_in_usd_cents": "number",
"pretty_url": "string"
}
Estimate a renewable energy certificate for electricity
curl https://api.cloverly.com/2019-03-beta/estimates/electricity \ -X POST \ -d '{"energy":{"value":200,"units":"kwh"}}' \ -H "Content-type: application/json" \ -H "Authorization: Bearer public_key:47800ea0ee541b4c"
require 'faraday' conn = Faraday.new(:url => 'https://api.cloverly.com') conn.post do |req| req.url '/2019-03-beta/estimates/electricity' req.body = '{"energy":{"value":200,"units":"kwh"}}' req.headers['Content-Type'] = 'application/json' req.headers['Authorization'] = 'Bearer public_key:47800ea0ee541b4c' end
const request = require('request'); const options = { method: 'post', url: 'https://api.cloverly.com/2019-03-beta/estimates/electricity', body: JSON.stringify({"energy":{"value":200,"units":"kwh"}}), headers: { 'Content-type': 'application/json', 'Authorization': 'Bearer public_key:47800ea0ee541b4c' } }; request(options, function(error, response, body) { console.log(body); });
package main import "net/http" import "io/ioutil" import "fmt" import "bytes" func main() { client := &http.Client{} var requestData = []byte(`{"energy":{"value":200,"units":"kwh"}}`) req, _ := http.NewRequest("POST", "https://api.cloverly.com/2019-03-beta/estimates/electricity", bytes.NewBuffer(requestData)) req.Header.Add("Content-type", "application/json") req.Header.Add("Authorization", "Bearer public_key:47800ea0ee541b4c") resp, _ := client.Do(req) defer resp.Body.Close() body, _ := ioutil.ReadAll(resp.Body) fmt.Printf(string(body[:])) }
import requests url = 'https://api.cloverly.com/2019-03-beta/estimates/electricity' headers = {'Content-type': 'application/json', 'Authorization': 'Bearer public_key:47800ea0ee541b4c'} data = '{"energy":{"value":200,"units":"kwh"}}' r = requests.post(url, headers=headers, data=data) print(r.text)
<?php $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "https://api.cloverly.com/2019-03-beta/estimates/electricity"); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, '{"energy":{"value":200,"units":"kwh"}}'); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-type: application/json', 'Authorization: Bearer public_key:47800ea0ee541b4c')); $r = curl_exec($ch); curl_close($ch); echo $r;
{
"slug": "string",
"environment": "string",
"state": "string",
"renewable_energy_certificate": {
"slug": "string",
"name": "string",
"city": "string",
"province": "string",
"country": "string",
"renewable_type": "string",
"total_capacity": "string",
"latlng": "string",
"technical_details": "string",
"deprecated": "string"
},
"micro_rec_count": "number",
"micro_units": "number",
"offset": {
"slug": "string",
"name": "string",
"city": "string",
"province": "string",
"country": "string",
"offset_type": "string",
"offset_type_slug": "string",
"total_capacity": "string",
"latlng": "string",
"technical_details": "string",
"available_carbon_in_kg": "string",
"pretty_url": "string"
},
"total_cost_in_usd_cents": "number",
"estimated_at": "string",
"equivalent_carbon_in_kg": "number",
"electricity_in_kwh": "string",
"rec_cost_in_usd_cents": "number",
"transaction_cost_in_usd_cents": "number",
"pretty_url": "string"
}
Cancel the estimate of an offset.
curl https://api.cloverly.com/2019-03-beta/estimates/:estimate_slug \ -X DELETE \ -H "Content-type: application/json" \ -H "Authorization: Bearer public_key:47800ea0ee541b4c"
require 'faraday' conn = Faraday.new(:url => 'https://api.cloverly.com') conn.delete do |req| req.url '/2019-03-beta/estimates/:estimate_slug' req.headers['Content-Type'] = 'application/json' req.headers['Authorization'] = 'Bearer public_key:47800ea0ee541b4c' end
const request = require('request'); const options = { method: 'delete', url: 'https://api.cloverly.com/2019-03-beta/estimates/:estimate_slug', headers: { 'Content-type': 'application/json', 'Authorization': 'Bearer public_key:47800ea0ee541b4c' } }; request(options, function(error, response, body) { console.log(body); });
package main import "net/http" import "io/ioutil" import "fmt" func main() { client := &http.Client{} req, _ := http.NewRequest("DELETE", "https://api.cloverly.com/2019-03-beta/estimates/:estimate_slug", nil) req.Header.Add("Content-type", "application/json") req.Header.Add("Authorization", "Bearer public_key:47800ea0ee541b4c") resp, _ := client.Do(req) defer resp.Body.Close() body, _ := ioutil.ReadAll(resp.Body) fmt.Printf(string(body[:])) }
import requests url = 'https://api.cloverly.com/2019-03-beta/estimates/:estimate_slug' headers = {'Content-type': 'application/json', 'Authorization': 'Bearer public_key:47800ea0ee541b4c'} r = requests.delete(url, headers=headers) print(r.text)
<?php $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "https://api.cloverly.com/2019-03-beta/estimates/:estimate_slug"); curl_setopt($ch, CURLOPT_DELETE, 1); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-type: application/json', 'Authorization: Bearer public_key:47800ea0ee541b4c')); $r = curl_exec($ch); curl_close($ch); echo $r;
Required | |
---|---|
`estimate_slug` | The slug for the estimate |
{
"slug": "string",
"environment": "string",
"state": "string",
"renewable_energy_certificate": {
"slug": "string",
"name": "string",
"city": "string",
"province": "string",
"country": "string",
"renewable_type": "string",
"total_capacity": "string",
"latlng": "string",
"technical_details": "string",
"deprecated": "string"
},
"micro_rec_count": "number",
"micro_units": "number",
"offset": {
"slug": "string",
"name": "string",
"city": "string",
"province": "string",
"country": "string",
"offset_type": "string",
"offset_type_slug": "string",
"total_capacity": "string",
"latlng": "string",
"technical_details": "string",
"available_carbon_in_kg": "string",
"pretty_url": "string"
},
"total_cost_in_usd_cents": "number",
"estimated_at": "string",
"equivalent_carbon_in_kg": "number",
"electricity_in_kwh": "string",
"rec_cost_in_usd_cents": "number",
"transaction_cost_in_usd_cents": "number",
"pretty_url": "string"
}