> ## Documentation Index
> Fetch the complete documentation index at: https://code.dcycle.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Get LCA Dashboard

> Retrieve environmental impact results for an LCA, broken down by EN 15804 life cycle stages

# Get LCA Dashboard

Retrieve the calculated environmental impact results for a specific LCA, organized by EN 15804 life cycle stages (A1–A4, B6, B7). Each stage contains impact values across all selected impact categories.

## Request

### Path Parameters

<ParamField path="lca_id" type="uuid" required>
  The UUID of the LCA portfolio

  **Example:** `a1b2c3d4-e5f6-7890-abcd-ef1234567890`
</ParamField>

### Headers

<ParamField header="x-api-key" type="string" required>
  Your API key for authentication
</ParamField>

<ParamField header="x-organization-id" type="string" required>
  Your organization UUID
</ParamField>

### Query Parameters

<ParamField query="view" type="string" default="system">
  Allocation view for co-product LCAs.

  **Available values:**

  * `system` — Total system impact (default)
  * `product_total` — Impact allocated to a specific co-product (requires `output_product_id`)
  * `product_unit` — Per-unit impact of a co-product (requires `output_product_id`)
</ParamField>

<ParamField query="output_product_id" type="uuid">
  UUID of the output product for co-product allocation views (`product_total` or `product_unit`). Required when `view` is not `system`.

  **Example:** `bf800281-bcc7-42f4-81e4-8ec9abb9745e`
</ParamField>

## Response

<ResponseField name="meta" type="object">
  Metadata about the LCA and dashboard configuration
</ResponseField>

<ResponseField name="stages" type="array[object]">
  Array of life cycle stage results

  <Expandable title="Stage Object">
    <ResponseField name="stage" type="string">
      EN 15804 stage code: `A1`, `A2`, `A3`, `A4`, `B6`, `B7`
    </ResponseField>

    <ResponseField name="phase" type="string">
      Life cycle phase: `Production` or `Downstream`
    </ResponseField>

    <ResponseField name="label" type="string">
      Human-readable stage description (e.g., `"Raw material supply"`)
    </ResponseField>

    <ResponseField name="categories" type="array[object]">
      Impact values per category for this stage

      <Expandable title="Category Impact Object">
        <ResponseField name="impact_category" type="string">
          Impact category identifier (e.g., `climate_change`, `acidification`)
        </ResponseField>

        <ResponseField name="impact_value" type="number | null">
          Calculated impact value. `null` if not yet calculated.
        </ResponseField>

        <ResponseField name="impact_unit" type="string">
          Unit of measurement (e.g., `"kg CO2-Eq"`, `"kg SO2-Eq"`)
        </ResponseField>

        <ResponseField name="top_contributors" type="array[object] | null">
          Top contributing processes to this impact, if available
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="is_stale" type="boolean">
  Whether the results may be outdated and need recalculation
</ResponseField>

<ResponseField name="validation_errors" type="array[object]">
  List of validation issues that may affect result accuracy
</ResponseField>

<ResponseField name="calculation_warnings" type="array[object]">
  Warnings from the calculation engine (e.g., missing emission factors)
</ResponseField>

## Example

<CodeGroup>
  ```bash cURL theme={"theme":{"light":"github-light","dark":"github-dark"}}
  curl -X GET "https://api.dcycle.io/lca/portfolio/a1b2c3d4-e5f6-7890-abcd-ef1234567890/dashboard?view=system" \
    -H "x-api-key: ${DCYCLE_API_KEY}" \
    -H "x-organization-id: ${DCYCLE_ORG_ID}"
  ```

  ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
  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}/dashboard",
      headers=headers,
      params={"view": "system"}
  )

  dashboard = response.json()
  for stage in dashboard["stages"]:
      print(f"\n{stage['stage']} - {stage['label']} ({stage['phase']})")
      for cat in stage["categories"]:
          if cat["impact_value"] is not None:
              print(f"  {cat['impact_category']}: {cat['impact_value']} {cat['impact_unit']}")
  ```

  ```javascript JavaScript theme={"theme":{"light":"github-light","dark":"github-dark"}}
  const axios = require('axios');

  const headers = {
    'x-api-key': process.env.DCYCLE_API_KEY,
    'x-organization-id': process.env.DCYCLE_ORG_ID
  };

  const lcaId = 'a1b2c3d4-e5f6-7890-abcd-ef1234567890';
  axios.get(`https://api.dcycle.io/lca/portfolio/${lcaId}/dashboard`, {
    headers,
    params: { view: 'system' }
  })
  .then(response => {
    response.data.stages.forEach(stage => {
      console.log(`\n${stage.stage} - ${stage.label} (${stage.phase})`);
      stage.categories.forEach(cat => {
        if (cat.impact_value !== null) {
          console.log(`  ${cat.impact_category}: ${cat.impact_value} ${cat.impact_unit}`);
        }
      });
    });
  });
  ```
</CodeGroup>

### Successful Response

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "meta": {
    "lca_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "view": "system"
  },
  "stages": [
    {
      "stage": "A1",
      "phase": "Production",
      "label": "Raw material supply",
      "categories": [
        {
          "impact_category": "climate_change",
          "impact_value": 245.67,
          "impact_unit": "kg CO2-Eq",
          "top_contributors": [
            {
              "name": "Portland cement",
              "value": 180.2,
              "percentage": 73.3
            }
          ]
        },
        {
          "impact_category": "acidification",
          "impact_value": 1.23,
          "impact_unit": "mol H+-Eq",
          "top_contributors": null
        }
      ]
    },
    {
      "stage": "A2",
      "phase": "Production",
      "label": "Transport to manufacturer",
      "categories": [
        {
          "impact_category": "climate_change",
          "impact_value": 18.45,
          "impact_unit": "kg CO2-Eq",
          "top_contributors": null
        }
      ]
    },
    {
      "stage": "A3",
      "phase": "Production",
      "label": "Manufacturing",
      "categories": [
        {
          "impact_category": "climate_change",
          "impact_value": 95.12,
          "impact_unit": "kg CO2-Eq",
          "top_contributors": null
        }
      ]
    },
    {
      "stage": "A4",
      "phase": "Downstream",
      "label": "Distribution",
      "categories": [
        {
          "impact_category": "climate_change",
          "impact_value": 12.34,
          "impact_unit": "kg CO2-Eq",
          "top_contributors": null
        }
      ]
    },
    {
      "stage": "B6",
      "phase": "Downstream",
      "label": "Operational energy use",
      "categories": [
        {
          "impact_category": "climate_change",
          "impact_value": 0.0,
          "impact_unit": "kg CO2-Eq",
          "top_contributors": null
        }
      ]
    },
    {
      "stage": "B7",
      "phase": "Downstream",
      "label": "Operational water use",
      "categories": [
        {
          "impact_category": "climate_change",
          "impact_value": 0.0,
          "impact_unit": "kg CO2-Eq",
          "top_contributors": null
        }
      ]
    }
  ],
  "is_stale": false,
  "validation_errors": [],
  "calculation_warnings": []
}
```

## Co-Product Allocation Example

For LCAs with multiple output products, use the `view` and `output_product_id` parameters to see allocated impacts:

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
# Per-unit impact for a specific co-product
curl -X GET "https://api.dcycle.io/lca/portfolio/{lca_id}/dashboard?view=product_unit&output_product_id={product_id}" \
  -H "x-api-key: ${DCYCLE_API_KEY}" \
  -H "x-organization-id: ${DCYCLE_ORG_ID}"
```

## Common Errors

### 404 Not Found

**Cause:** LCA does not exist or does not belong to the specified organization

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "code": "NOT_FOUND",
  "detail": "LCA not found"
}
```

### 422 Validation Error

**Cause:** `product_total` or `product_unit` view requested without `output_product_id`

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "detail": "output_product_id is required for product_total and product_unit views"
}
```

## Related Endpoints

<CardGroup cols={2}>
  <Card title="List LCA Portfolios" icon="list" href="/api-reference/lca/list">
    Retrieve all LCA portfolios
  </Card>

  <Card title="LCA Overview" icon="leaf" href="/api-reference/lca/overview">
    LCA API introduction and concepts
  </Card>
</CardGroup>
