Skip to content

Carbon Dashboard API

Retrieve carbon analysis data for projects and sites.


Project Carbon Summary

Retrieves the Carbon Analysis summary for a specific project.

HTTP request

GET https://api.darukaa.com/api/v1/projects/{project_id}/carbon/summary

Path parameters

Parameter Type Required Description
project_id string (UUID) Yes Project ID for which carbon analysis summary is requested

Headers

Header Value Required
Authorization Bearer Yes

Example request

curl -X GET "https://api.darukaa.com/api/v1/projects/aac7-xxxx-xxxx-xxxx-f0b9/carbon/summary" \
  -H "Authorization: Bearer <your_access_token>"
project_id = "aac7-xxxx-xxxx-xxxx-f0b9"
response = requests.get(
    f"https://api.darukaa.com/api/v1/projects/{project_id}/carbon/summary",
    headers=headers
)
carbon_summary = response.json()
const projectId = "aac7-xxxx-xxxx-xxxx-f0b9";
const response = await fetch(`https://api.darukaa.com/api/v1/projects/${projectId}/carbon/summary`, {
  method: 'GET',
  headers: {
    'Authorization': `Bearer ${accessToken}`
  }
});

const carbonSummary = await response.json();

Status codes

Code Description
200 Success - Carbon summary retrieved successfully
401 Unauthorized - Invalid or missing access token
404 Not Found - Project with the specified ID does not exist

Response body

Success (200)

{
  "temperature": 25.5,
  "temperature_unit": "°C",
  "precipitation": 1200.0,
  "precipitation_unit": "mm/year",
  "soil_type": "Clay Loam",
  "total_mean_biomass": 150.5,
  "total_mean_biomass_unit": "t/ha",
  "total_mean_carbon_stock": 75.25,
  "total_mean_carbon_stock_unit": "t/ha",
  "baseline_start_date": "2020-01-01",
  "credits": 1250.5,
  "calculated_at": "2025-12-04T13:30:00Z",
  "project_id": "aac7-xxxx-xxxx-xxxx-f0b9"
}

Failure (401)

{
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Invalid or missing access token",
    "details": "Please provide a valid Bearer token in the Authorization header",
    "request_id": "req_abc123",
    "timestamp": "2025-12-04T13:30:00Z"
  }
}

Failure (404)

{
  "error": {
    "code": "PROJECT_NOT_FOUND",
    "message": "Project not found",
    "details": "No project exists with the ID: aac71-xxxx-xxxx-xxxx-f0b9",
    "request_id": "req_abc123",
    "timestamp": "2025-12-04T13:30:00Z"
  }
}
Field Type Description
temperature number Average project temperature value derived from climate inputs
temperature_unit string Unit of temperature measurement (°C expected)
precipitation number Average rainfall/precipitation in project area
precipitation_unit string Measurement unit of precipitation (mm/year)
soil_type string Dominant soil type classification in the project area
total_mean_biomass number Average biomass per hectare estimated across the project
total_mean_biomass_unit string Unit of biomass measurement (e.g., t/ha)
total_mean_carbon_stock number Mean carbon stored per hectare across the project
total_mean_carbon_stock_unit string Unit of carbon stock measurement (t/ha)
baseline_start_date string/null Date from which baseline carbon condition measurement begins
credits number/null Credits issued/eligible based on carbon offsets
calculated_at datetime/null Timestamp of last carbon analysis computation
project_id UUID string Identifier of referenced project

Site Carbon Analysis

Retrieves the Carbon Analysis summary for a specific site.

HTTP request

GET https://api.darukaa.com/api/v1/sites/{site_id}/carbon

Path parameters

Parameter Type Required Description
site_id string (UUID) Yes Unique identifier of the site to fetch carbon analysis for

Headers

Header Value Required
Authorization Bearer Yes

Example request

curl -X GET "https://api.darukaa.com/api/v1/sites/3266-xxxx-xxxx-xxxx-e8b2/carbon" \
  -H "Authorization: Bearer <your_access_token>"
site_id = "3266-xxxx-xxxx-xxxx-e8b2"
response = requests.get(
    f"https://api.darukaa.com/api/v1/sites/{site_id}/carbon",
    headers=headers
)
site_carbon = response.json()
const siteId = "3266-xxxx-xxxx-xxxx-8b2";
const response = await fetch(`https://api.darukaa.com/api/v1/sites/${siteId}/carbon`, {
  method: 'GET',
  headers: {
    'Authorization': `Bearer ${accessToken}`
  }
});

const siteCarbon = await response.json();

Status codes

Code Description
200 Success - Site carbon analysis retrieved successfully
401 Unauthorized - Invalid or missing access token
404 Not Found - Site with the specified ID does not exist

Response body

Success (200)

{
  "lulc_timeseries": {
    "2000": {"Mangrove": 340.62, "Forest": 120.5},
    "2022": {"Mangrove": 380.25, "Forest": 150.3}
  },
  "lulc_transition_piechart": {
    "start_year": 2000,
    "end_year": 2022,
    "unit": "ha",
    "2000": {"Mangrove": 340.62, "Forest": 120.5},
    "2022": {"Mangrove": 380.25, "Forest": 150.3}
  },
  "surface_water_transition": {
    "unit": "ha",
    "Seasonal": 50.2,
    "Permanent": 120.5,
    "New seasonal": 15.3,
    "Lost seasonal": 8.2
  },
  "agb": 1250.5,
  "agb_unit": "t",
  "mean_agb": 62.5,
  "mean_agb_unit": "t/ha",
  "cstock_agb": 625.25,
  "cstock_agb_unit": "t",
  "mean_cstock_agb": 31.25,
  "mean_cstock_agb_unit": "t/ha",
  "bgb": 312.5,
  "bgb_unit": "t",
  "mean_bgb": 15.625,
  "mean_bgb_unit": "t/ha",
  "cstock_bgb": 156.25,
  "cstock_bgb_unit": "t",
  "mean_cstock_bgb": 7.8125,
  "mean_cstock_bgb_unit": "t/ha",
  "soil_properties": {
    "clay": {"0cm": 25.5, "10cm": 28.2, "unit": "%"},
    "sand": {"0cm": 45.3, "10cm": 42.1, "unit": "%"},
    "organic_carbon": {"0cm": 2.5, "10cm": 1.8, "unit": "%"}
  },
  "soc": {
    "0cm": 0.0,
    "10cm": 1.39,
    "unit": "t/ha"
  },
  "agb_tif_gcs_path": "gs://bucket/path/to/agb.tif",
  "calculated_at": "2025-12-04T13:30:00Z",
  "site_id": "3266-xxxx-xxxx-xxxx-e8b2",
  "project_id": "aac7-xxxx-xxxx-xxxx-f0b9"
}

Failure (401)

{
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Invalid or missing access token",
    "details": "Please provide a valid Bearer token in the Authorization header",
    "request_id": "req_abc123",
    "timestamp": "2025-12-04T13:30:00Z"
  }
}

Failure (404)

{
  "error": {
    "code": "SITE_NOT_FOUND",
    "message": "Site not found",
    "details": "No site exists with the ID: 3266-xxxx-xxxx-xxxx-e8b2",
    "request_id": "req_abc123",
    "timestamp": "2025-12-04T13:30:00Z"
  }
}
Field Type Description
lulc_timeseries object Year → LULC area mapping (each year object contains class: area pairs, units implied in lulc_transition_piechart.unit)
lulc_transition_piechart object Snapshot comparison (start year and end year) for LULC used to build piecharts. Contains start/end year class-area mapping and unit
surface_water_transition object Summary metrics of surface water transitions with unit and categories such as Seasonal, Permanent, New seasonal, Lost seasonal
agb number Above-ground biomass total (absolute) for the site
agb_unit string Unit for agb (e.g., t)
mean_agb number Mean above-ground biomass per unit area (site-average)
mean_agb_unit string Unit for mean_agb (e.g., t/ha)
cstock_agb number Carbon stock estimated from AGB (absolute)
cstock_agb_unit string Unit for cstock_agb (e.g., t)
mean_cstock_agb number Mean carbon stock from AGB per unit area
mean_cstock_agb_unit string Unit for mean_cstock_agb (e.g., t/ha)
bgb number Below-ground biomass total (absolute)
bgb_unit string Unit for bgb (e.g., t)
mean_bgb number Mean below-ground biomass per unit area
mean_bgb_unit string Unit for mean_bgb (e.g., t/ha)
cstock_bgb number Carbon stock estimated from BGB (absolute)
cstock_bgb_unit string Unit for cstock_bgb (e.g., t)
mean_cstock_bgb number Mean carbon stock from BGB per unit area
mean_cstock_bgb_unit string Unit for mean_cstock_bgb (e.g., t/ha)
soil_properties object Soil texture and organic carbon profile. Contains nested maps for clay, sand, organic_carbon keyed by depth (e.g., 0cm, 10cm, ...), and a unit
soc object Soil organic carbon (SOC) profile by depth with unit (e.g., t/ha)
agb_tif_gcs_path string/null GCS path to the AGB raster (GeoTIFF) if available
calculated_at datetime/null Timestamp when the analysis was computed
site_id UUID string Unique identifier for the site
project_id UUID string Associated project identifier

All Sites Carbon Analysis

Retrieves Carbon Analysis details for all sites within a specific project.

HTTP request

GET https://api.darukaa.com/api/v1/projects/{project_id}/carbon/sites

Path parameters

Parameter Type Required Description
project_id string (UUID) Yes Unique identifier of the project whose sites you want to fetch carbon analysis for

Headers

Header Value Required
Authorization Bearer Yes

Example request

curl -X GET "https://api.darukaa.com/api/v1/projects/aac7-xxxx-xxxx-xxxx-f0b9/carbon/sites" \
  -H "Authorization: Bearer <your_access_token>"
response = requests.get(
    f"https://api.darukaa.com/api/v1/projects/{project_id}/carbon/sites",
    headers=headers
)
all_sites_carbon = response.json()  # Returns array of site carbon data
const response = await fetch(`https://api.darukaa.com/api/v1/projects/${projectId}/carbon/sites`, {
  method: 'GET',
  headers: {
    'Authorization': `Bearer ${accessToken}`
  }
});

const allSitesCarbon = await response.json();  // Returns array of site carbon data

Status codes

Code Description
200 Success - All sites carbon analysis retrieved successfully
401 Unauthorized - Invalid or missing access token
404 Not Found - Project with the specified ID does not exist

Response body

Success (200)

[
  {
    "lulc_timeseries": {
      "2000": {"Mangrove": 340.62, "Forest": 120.5},
      "2022": {"Mangrove": 380.25, "Forest": 150.3}
    },
    "lulc_transition_piechart": {
      "start_year": 2000,
      "end_year": 2022,
      "unit": "ha",
      "2000": {"Mangrove": 340.62, "Forest": 120.5},
      "2022": {"Mangrove": 380.25, "Forest": 150.3}
    },
    "surface_water_transition": {
      "unit": "ha",
      "Seasonal": 50.2,
      "Permanent": 120.5,
      "New seasonal": 15.3,
      "Lost seasonal": 8.2
    },
    "agb": 1250.5,
    "agb_unit": "t",
    "mean_agb": 62.5,
    "mean_agb_unit": "t/ha",
    "cstock_agb": 625.25,
    "cstock_agb_unit": "t",
    "mean_cstock_agb": 31.25,
    "mean_cstock_agb_unit": "t/ha",
    "bgb": 312.5,
    "bgb_unit": "t",
    "mean_bgb": 15.625,
    "mean_bgb_unit": "t/ha",
    "cstock_bgb": 156.25,
    "cstock_bgb_unit": "t",
    "mean_cstock_bgb": 7.8125,
    "mean_cstock_bgb_unit": "t/ha",
    "soil_properties": {
      "clay": {"0cm": 25.5, "10cm": 28.2, "unit": "%"},
      "sand": {"0cm": 45.3, "10cm": 42.1, "unit": "%"},
      "organic_carbon": {"0cm": 2.5, "10cm": 1.8, "unit": "%"}
    },
    "soc": {
      "0cm": 0.0,
      "10cm": 1.39,
      "unit": "t/ha"
    },
    "agb_tif_gcs_path": "gs://bucket/path/to/agb.tif",
    "calculated_at": "2025-12-04T13:30:00Z",
    "site_id": "3266-xxxx-xxxx-xxxx-e8b2",
    "project_id": "aac7-xxxx-xxxx-xxxx-f0b9"
  }
]

Failure (401)

{
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Invalid or missing access token",
    "details": "Please provide a valid Bearer token in the Authorization header",
    "request_id": "req_abc123",
    "timestamp": "2025-12-04T13:30:00Z"
  }
}

Failure (404)

{
  "error": {
    "code": "PROJECT_NOT_FOUND",
    "message": "Project not found",
    "details": "No project exists with the ID: aac71-xxxx-xxxx-xxxx-f0b9",
    "request_id": "req_abc123",
    "timestamp": "2025-12-04T13:30:00Z"
  }
}
Field Type Description
lulc_timeseries object Year → LULC area mapping (each year object contains class: area pairs, units implied in lulc_transition_piechart.unit)
lulc_transition_piechart object Snapshot comparison (start year and end year) for LULC used to build piecharts. Contains start/end year class-area mapping and unit
surface_water_transition object Summary metrics of surface water transitions with unit and categories such as Seasonal, Permanent, New seasonal, Lost seasonal
agb number Above-ground biomass total (absolute) for the site
agb_unit string Unit for agb (e.g., t)
mean_agb number Mean above-ground biomass per unit area (site-average)
mean_agb_unit string Unit for mean_agb (e.g., t/ha)
cstock_agb number Carbon stock estimated from AGB (absolute)
cstock_agb_unit string Unit for cstock_agb (e.g., t)
mean_cstock_agb number Mean carbon stock from AGB per unit area
mean_cstock_agb_unit string Unit for mean_cstock_agb (e.g., t/ha)
bgb number Below-ground biomass total (absolute)
bgb_unit string Unit for bgb (e.g., t)
mean_bgb number Mean below-ground biomass per unit area
mean_bgb_unit string Unit for mean_bgb (e.g., t/ha)
cstock_bgb number Carbon stock estimated from BGB (absolute)
cstock_bgb_unit string Unit for cstock_bgb (e.g., t)
mean_cstock_bgb number Mean carbon stock from BGB per unit area
mean_cstock_bgb_unit string Unit for mean_cstock_bgb (e.g., t/ha)
soil_properties object Soil texture and organic carbon profile. Contains nested maps for clay, sand, organic_carbon keyed by depth (e.g., 0cm, 10cm, ...), and a unit
soc object Soil organic carbon (SOC) profile by depth with unit (e.g., t/ha)
agb_tif_gcs_path string/null GCS path to the AGB raster (GeoTIFF) if available
calculated_at datetime/null Timestamp when the analysis was computed
site_id UUID string Unique identifier for the site
project_id UUID string Associated project identifier