Skip to main content
GET
/
v1
/
lca
/
impacts
/
{lca_id}
Get LCA Impacts
const options = {
  method: 'GET',
  headers: {'x-api-key': '<x-api-key>', 'x-organization-id': '<x-organization-id>'}
};

fetch('https://api.dcycle.io/v1/lca/impacts/{lca_id}', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
import requests

url = "https://api.dcycle.io/v1/lca/impacts/{lca_id}"

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/lca/impacts/{lca_id} \
  --header 'x-api-key: <x-api-key>' \
  --header 'x-organization-id: <x-organization-id>'
{
  "items": [
    {
      "block_id": "<string>",
      "sum_total_impact": 123,
      "impact_general_unit_id": "<string>",
      "impact_specific_unit": {}
    }
  ]
}

Get LCA Impacts

Calculates and returns environmental impacts for an LCA portfolio using a specified methodology and impact category. Returns impact values per process block.
Use Validate LCA first to ensure all required data is in place before requesting impact calculations.

Request

Headers

x-api-key
string
required
Your API key for authenticationExample: sk_live_1234567890abcdef
x-organization-id
string
required
Your organization UUIDExample: a8315ef3-dd50-43f8-b7ce-d839e68d51fa

Path Parameters

lca_id
string
required
UUID of the LCA portfolioExample: 550e8400-e29b-41d4-a716-446655440000

Query Parameters

methodology_id
string
required
UUID of the methodology to use for impact calculationExample: d4e5f6a7-b8c9-0123-def4-567890123456
impact_category
string
required
Impact category identifierCommon values: gwp, ap, ep, pocp, adp
process_id_list
string
required
JSON string containing a list of process block UUIDs to include in the calculationExample: ["a1b2c3d4-e5f6-7890-abcd-ef1234567890","b2c3d4e5-f6a7-8901-bcde-f12345678901"]

Response

items
array
List of impact results per process block

Example

curl -X GET "https://api.dcycle.io/v1/lca/impacts/${LCA_ID}?methodology_id=${METHODOLOGY_ID}&impact_category=gwp&process_id_list=%5B%22${PROCESS_ID_1}%22%2C%22${PROCESS_ID_2}%22%5D" \
  -H "x-api-key: ${DCYCLE_API_KEY}" \
  -H "x-organization-id: ${DCYCLE_ORG_ID}"
import json
import requests
import os

lca_id = "550e8400-e29b-41d4-a716-446655440000"
process_ids = [
    "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "b2c3d4e5-f6a7-8901-bcde-f12345678901",
]

response = requests.get(
    f"https://api.dcycle.io/v1/lca/impacts/{lca_id}",
    headers={
        "x-api-key": os.getenv("DCYCLE_API_KEY"),
        "x-organization-id": os.getenv("DCYCLE_ORG_ID"),
    },
    params={
        "methodology_id": "d4e5f6a7-b8c9-0123-def4-567890123456",
        "impact_category": "gwp",
        "process_id_list": json.dumps(process_ids),
    },
)

impacts = response.json()
for item in impacts["items"]:
    print(f"Block {item['block_id']}: {item['sum_total_impact']} {item['impact_general_unit_id']}")
const axios = require('axios');

const lcaId = '550e8400-e29b-41d4-a716-446655440000';
const processIds = [
  'a1b2c3d4-e5f6-7890-abcd-ef1234567890',
  'b2c3d4e5-f6a7-8901-bcde-f12345678901',
];

axios.get(`https://api.dcycle.io/v1/lca/impacts/${lcaId}`, {
  headers: {
    'x-api-key': process.env.DCYCLE_API_KEY,
    'x-organization-id': process.env.DCYCLE_ORG_ID,
  },
  params: {
    methodology_id: 'd4e5f6a7-b8c9-0123-def4-567890123456',
    impact_category: 'gwp',
    process_id_list: JSON.stringify(processIds),
  },
})
.then(({ data }) => {
  data.items.forEach(item => {
    console.log(`Block ${item.block_id}: ${item.sum_total_impact} ${item.impact_general_unit_id}`);
  });
});

Successful Response

{
  "items": [
    {
      "block_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "sum_total_impact": 12.345,
      "impact_general_unit_id": "kg CO2 eq",
      "impact_specific_unit": null
    },
    {
      "block_id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "sum_total_impact": 3.678,
      "impact_general_unit_id": "kg CO2 eq",
      "impact_specific_unit": null
    }
  ]
}

Common Errors

401 Unauthorized

Cause: Missing or invalid API key
{"detail": "Invalid API key for organization", "code": "INVALID_API_KEY"}

403 Forbidden

Cause: The authenticated user is not a member of the organization
{"detail": "Logged User is not Member of Organization", "code": "LOGGED_USER_NOT_MEMBER"}

404 Not Found

Cause: LCA portfolio not found or doesn’t belong to your organization
{"detail": "LCA Portfolio not found"}

422 Unprocessable Entity

Cause: Missing required query parameters or invalid JSON in process_id_list
{
  "detail": [
    {
      "loc": ["query", "process_id_list"],
      "msg": "field required",
      "type": "value_error.missing"
    }
  ]
}

Validate LCA

Validate before calculating impacts

Export to Excel

Export impact results as spreadsheet

LCA Dashboard

View aggregated environmental impact results