Consolidated Emissions
const options = {
method: 'GET',
headers: {'x-api-key': '<x-api-key>', 'x-organization-id': '<x-organization-id>'}
};
fetch('https://api.dcycle.io/v1/projects/{project_id}/consolidated', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.dcycle.io/v1/projects/{project_id}/consolidated"
headers = {
"x-api-key": "<x-api-key>",
"x-organization-id": "<x-organization-id>"
}
response = requests.get(url, headers=headers)
print(response.text)curl --request GET \
--url https://api.dcycle.io/v1/projects/{project_id}/consolidated \
--header 'x-api-key: <x-api-key>' \
--header 'x-organization-id: <x-organization-id>'{
"total_co2e_kg": 123,
"by_scope": [
{}
],
"by_category": [
{}
],
"by_period": [
{}
],
"by_organization": [
{}
],
"organization_breakdown_complete": true,
"start_date": "<string>",
"end_date": "<string>"
}Consolidated Emissions
Get a project’s consolidated emissions: totals and breakdowns over the organizations the project covers
GET
/
v1
/
projects
/
{project_id}
/
consolidated
Consolidated Emissions
const options = {
method: 'GET',
headers: {'x-api-key': '<x-api-key>', 'x-organization-id': '<x-organization-id>'}
};
fetch('https://api.dcycle.io/v1/projects/{project_id}/consolidated', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.dcycle.io/v1/projects/{project_id}/consolidated"
headers = {
"x-api-key": "<x-api-key>",
"x-organization-id": "<x-organization-id>"
}
response = requests.get(url, headers=headers)
print(response.text)curl --request GET \
--url https://api.dcycle.io/v1/projects/{project_id}/consolidated \
--header 'x-api-key: <x-api-key>' \
--header 'x-organization-id: <x-organization-id>'{
"total_co2e_kg": 123,
"by_scope": [
{}
],
"by_category": [
{}
],
"by_period": [
{}
],
"by_organization": [
{}
],
"organization_breakdown_complete": true,
"start_date": "<string>",
"end_date": "<string>"
}← Projects API
Get the consolidated emissions of a project, in kg CO2e (market-based, fossil). The project covers its owner and the owner’s accepted subsidiaries that are selected in the project, over the project period. Every organization that can open the project (its owner, a group organization above it, a subsidiary, a linked organization) gets the same total.
The breakdown by organization lists only the organizations whose data your organization can read (itself and its subsidiaries); the rest of the project has no entry, and
organization_breakdown_complete is false.
GET /v1/projects/{project_id}/consolidated/export returns the same figures as CSV.
Request
Headers
string
required
Your API key for authentication
string
required
Your organization UUID
Path Parameters
string
required
UUID of the project
Query Parameters
integer[]
GHG scopes to include (1, 2, 3). Repeat the parameter for several.
string[]
Emission categories to include (for example
electricity, purchases). An unknown category returns 400.string[]
Narrow to organizations of the project your organization can read. Any other organization returns 404.
string[]
Narrow to facilities of those organizations. Any other facility returns 404.
date
Narrows the start of the project period (never widens it).
date
Narrows the end of the project period (never widens it).
string
default:"month"
Periods of
by_period: month or year.Response
number
Total kg CO2e of the project
array
{scope, co2e_kg} per scopearray
{scope, category, co2e_kg} per categoryarray
{period, co2e_kg}, with period as YYYY-MM or YYYYarray
{organization_id, organization_name, co2e_kg} for each organization of the project you can readboolean
False when part of the total comes from organizations you cannot read
date
First day of the consolidated period
date
Last day of the consolidated period
Example
curl "https://api.dcycle.io/v1/projects/${PROJECT_ID}/consolidated?scope=1&scope=2&granularity=year" \
-H "x-api-key: ${DCYCLE_API_KEY}" \
-H "x-organization-id: ${DCYCLE_ORG_ID}"
Was this page helpful?