Get LCA Calculation Errors
const options = {
method: 'GET',
headers: {'x-api-key': '<x-api-key>', 'x-organization-id': '<x-organization-id>'}
};
fetch('https://api.dcycle.io/lca/portfolio/{lca_id}/calculation-errors', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.dcycle.io/lca/portfolio/{lca_id}/calculation-errors"
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/lca/portfolio/{lca_id}/calculation-errors \
--header 'x-api-key: <x-api-key>' \
--header 'x-organization-id: <x-organization-id>'{
"items": {
"code": "<string>",
"detail": "<string>",
"block_id": {},
"block_name": {},
"pieces": {
"piece_id": {},
"piece_name": {}
}
}
}Get LCA Calculation Errors
List data problems that silently distort an LCA’s calculated results, grouped by canvas block
GET
/
lca
/
portfolio
/
{lca_id}
/
calculation-errors
Get LCA Calculation Errors
const options = {
method: 'GET',
headers: {'x-api-key': '<x-api-key>', 'x-organization-id': '<x-organization-id>'}
};
fetch('https://api.dcycle.io/lca/portfolio/{lca_id}/calculation-errors', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.dcycle.io/lca/portfolio/{lca_id}/calculation-errors"
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/lca/portfolio/{lca_id}/calculation-errors \
--header 'x-api-key: <x-api-key>' \
--header 'x-organization-id: <x-organization-id>'{
"items": {
"code": "<string>",
"detail": "<string>",
"block_id": {},
"block_name": {},
"pieces": {
"piece_id": {},
"piece_name": {}
}
}
}List every data problem that distorts the calculated results of an LCA without failing the calculation. Pieces without a linked activity or emission factor contribute 0 to every category, and pieces with incomplete unit conversions are dropped entirely — this endpoint surfaces those silent omissions, attributed to the canvas block they live in, so they can be fixed.
An empty
Request
Path Parameters
uuid
required
The UUID of the LCA portfolioExample:
a1b2c3d4-e5f6-7890-abcd-ef1234567890Headers
string
required
Your API key for authenticationExample:
sk_live_1234567890abcdefstring
required
Your organization UUIDExample:
a8315ef3-dd50-43f8-b7ce-d839e68d51faQuery Parameters
uuid
Filter the items to a single canvas block.Example:
e5f6a7b8-c9d0-1234-ef01-567890123456Response
array[object]
One item per (error code, canvas block) combination
Show Calculation Error Item
Show Calculation Error Item
string
Machine-readable error code:
missing_emission_factor— piece has no emission factor associatedinvalid_conversions— piece has incomplete unit conversionspending_distances— distribution distances are still being calculateddistribution_route_errors— distribution routes failed and cannot be calculatedcircular_reference— blocks form a circular connection and cannot be calculatedrelation_in_multiple_blocks— a material instance is listed in more than one material block; its impact is attributed to only one of themmissing_transport_destination— transport block has no destination process connected; its transport impact is not calculatedmissing_transport_origin— transport block has no material connected as origin; there is nothing to transportmissing_transport_data— material has no transport distance or route resolved; its transport impact is treated as 0missing_transport_emission_factor— the carrier type has no emission factor; the transport impact is treated as 0
string
Human-readable explanation
string | null
Canvas block the error is attributed to (
null when not attributable to a single block)string | null
Block display name
Example
curl -X GET "https://api.dcycle.io/lca/portfolio/a1b2c3d4-e5f6-7890-abcd-ef1234567890/calculation-errors" \
-H "x-api-key: ${DCYCLE_API_KEY}" \
-H "x-organization-id: ${DCYCLE_ORG_ID}"
import requests
import os
headers = {
"x-api-key": os.getenv("DCYCLE_API_KEY"),
"x-organization-id": os.getenv("DCYCLE_ORG_ID")
}
lca_id = "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
response = requests.get(
f"https://api.dcycle.io/lca/portfolio/{lca_id}/calculation-errors",
headers=headers,
)
for item in response.json()["items"]:
block = item["block_name"] or "LCA-wide"
print(f"[{item['code']}] {block}: {item['detail']}")
for piece in item["pieces"]:
print(f" - {piece['piece_name']}")
Successful Response
{
"items": [
{
"code": "missing_emission_factor",
"detail": "Piece is linked to an activity without emission factors for its region and methodology, so it counts as 0 in every category.",
"block_id": "e5f6a7b8-c9d0-1234-ef01-567890123456",
"block_name": "Raw materials",
"pieces": [
{
"piece_id": "b8c9d0e1-f2a3-4567-1234-890123456789",
"piece_name": "Recycled aluminium"
}
]
},
{
"code": "invalid_conversions",
"detail": "Piece has incomplete unit conversions, so it is silently dropped from the calculation.",
"block_id": "e5f6a7b8-c9d0-1234-ef01-567890123456",
"block_name": "Raw materials",
"pieces": [
{
"piece_id": "c9d0e1f2-a3b4-5678-2345-901234567890",
"piece_name": "Cardboard box"
}
]
}
]
}
items array means no data problems were detected.
Common Errors
404 Not Found
Cause: LCA does not exist or does not belong to the specified organization{
"code": "NOT_FOUND",
"detail": "LCA not found"
}
Related Endpoints
Get LCA Dashboard
Calculated impact results by life cycle stage
LCA Overview
LCA API introduction and concepts
Was this page helpful?