Get List of Portfolios
curl --request GET \
--url https://api.cnaught.com/v1/portfolios \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.cnaught.com/v1/portfolios"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.cnaught.com/v1/portfolios', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cnaught.com/v1/portfolios",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.cnaught.com/v1/portfolios"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.cnaught.com/v1/portfolios")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cnaught.com/v1/portfolios")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "oH5hlq",
"name": "CNaught Impact",
"summary": "Science-backed, diversified portfolio to maximize impact, mitigate risk, and foster innovation based on Oxford's principles for carbon offsetting.",
"description": "The Impact Portfolio is a diversified portfolio of high-quality carbon credits designed to maximize impact, mitigate risk, and foster innovation. A portfolio approach to credits is recommended by the World Economic Forum, and the CNaught portfolio embodies the science-based best practices laid out in Oxford’s Principles for Carbon Offsetting. The Impact Portfolio includes the full range of carbon credit types CNaught offers so that you can maximize your ability to support a low-carbon future.",
"primary_image_url": "https://assets.cnaught.com/64fd900fcf6f93409fc7ff21/65249b23e4abea354f4e8672_6412308f4b9aaa3dc170ae16_Manoa.jpeg"
},
{
"id": "fRqLie",
"name": "CNaught Impact Lite",
"summary": "The Impact Lite Portfolio is narrower in scope than the Impact portfolio but still contains a diversified portfolio of high-quality carbon credits to drive impact and mitigate risk.",
"description": "The Impact Lite Portfolio is narrower in scope than the Impact portfolio but still contains a diversified portfolio of high-quality carbon credits to drive impact and mitigate risk. A portfolio approach to credits is recommended by the World Economic Forum, and CNaught's approach embodies the science-based best practices laid out in Oxford’s Principles for Carbon Offsetting. The Impact Lite Portfolio does not support innovation in long-lived carbon removal technologies, which will be a critical part of reaching global climate goals.",
"primary_image_url": "https://assets.cnaught.com/64fd900fcf6f93409fc7ff21/659c94c127c442a6b4f17aa5_katingan-mentaya-river.jpg"
}
]
}{
"title": "Authorization has been denied for this request",
"status": 401
}Portfolios
Get List of Portfolios
Gets the list of portfolios the user is able to use for purchasing credits. This list is not paginated - the full list of portfolios is returned. The portfolio objects in the list do not include details about the project categories comprising the portfolio - those can be retrieved for each portfolio using the Get Portfolio By Id API endpoint.
GET
/
portfolios
Get List of Portfolios
curl --request GET \
--url https://api.cnaught.com/v1/portfolios \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.cnaught.com/v1/portfolios"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.cnaught.com/v1/portfolios', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cnaught.com/v1/portfolios",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.cnaught.com/v1/portfolios"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.cnaught.com/v1/portfolios")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cnaught.com/v1/portfolios")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "oH5hlq",
"name": "CNaught Impact",
"summary": "Science-backed, diversified portfolio to maximize impact, mitigate risk, and foster innovation based on Oxford's principles for carbon offsetting.",
"description": "The Impact Portfolio is a diversified portfolio of high-quality carbon credits designed to maximize impact, mitigate risk, and foster innovation. A portfolio approach to credits is recommended by the World Economic Forum, and the CNaught portfolio embodies the science-based best practices laid out in Oxford’s Principles for Carbon Offsetting. The Impact Portfolio includes the full range of carbon credit types CNaught offers so that you can maximize your ability to support a low-carbon future.",
"primary_image_url": "https://assets.cnaught.com/64fd900fcf6f93409fc7ff21/65249b23e4abea354f4e8672_6412308f4b9aaa3dc170ae16_Manoa.jpeg"
},
{
"id": "fRqLie",
"name": "CNaught Impact Lite",
"summary": "The Impact Lite Portfolio is narrower in scope than the Impact portfolio but still contains a diversified portfolio of high-quality carbon credits to drive impact and mitigate risk.",
"description": "The Impact Lite Portfolio is narrower in scope than the Impact portfolio but still contains a diversified portfolio of high-quality carbon credits to drive impact and mitigate risk. A portfolio approach to credits is recommended by the World Economic Forum, and CNaught's approach embodies the science-based best practices laid out in Oxford’s Principles for Carbon Offsetting. The Impact Lite Portfolio does not support innovation in long-lived carbon removal technologies, which will be a critical part of reaching global climate goals.",
"primary_image_url": "https://assets.cnaught.com/64fd900fcf6f93409fc7ff21/659c94c127c442a6b4f17aa5_katingan-mentaya-river.jpg"
}
]
}{
"title": "Authorization has been denied for this request",
"status": 401
}⌘I