> ## 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 Impacts

> Calculate and retrieve environmental impacts for an LCA portfolio

# 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.

<Note>
  Use [Validate LCA](/api-reference/lca/validate) first to ensure all required data is in place before requesting impact calculations.
</Note>

## Request

### Headers

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

  **Example:** `sk_live_1234567890abcdef`
</ParamField>

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

  **Example:** `a8315ef3-dd50-43f8-b7ce-d839e68d51fa`
</ParamField>

### Path Parameters

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

  **Example:** `550e8400-e29b-41d4-a716-446655440000`
</ParamField>

### Query Parameters

<ParamField query="methodology_id" type="string" required>
  UUID of the methodology to use for impact calculation

  **Example:** `d4e5f6a7-b8c9-0123-def4-567890123456`
</ParamField>

<ParamField query="impact_category" type="string" required>
  Impact category identifier

  **Common values:** `gwp`, `ap`, `ep`, `pocp`, `adp`
</ParamField>

<ParamField query="process_id_list" type="string" required>
  JSON string containing a list of process block UUIDs to include in the calculation

  **Example:** `["a1b2c3d4-e5f6-7890-abcd-ef1234567890","b2c3d4e5-f6a7-8901-bcde-f12345678901"]`
</ParamField>

## Response

<ResponseField name="items" type="array">
  List of impact results per process block

  <Expandable title="LCAProcessImpact">
    <ResponseField name="block_id" type="string">
      UUID of the process block
    </ResponseField>

    <ResponseField name="sum_total_impact" type="number">
      Total calculated impact value for this process
    </ResponseField>

    <ResponseField name="impact_general_unit_id" type="string">
      General unit identifier for the impact category (e.g. `"kg CO2 eq"` for GWP)
    </ResponseField>

    <ResponseField name="impact_specific_unit" type="string | null">
      Specific unit when applicable, otherwise `null`
    </ResponseField>
  </Expandable>
</ResponseField>

## Example

<CodeGroup>
  ```bash cURL theme={"theme":{"light":"github-light","dark":"github-dark"}}
  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}"
  ```

  ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
  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']}")
  ```

  ```javascript JavaScript theme={"theme":{"light":"github-light","dark":"github-dark"}}
  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}`);
    });
  });
  ```
</CodeGroup>

### Successful Response

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "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

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{"detail": "Invalid API key for organization", "code": "INVALID_API_KEY"}
```

### 403 Forbidden

**Cause:** The authenticated user is not a member of the organization

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{"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

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

### 422 Unprocessable Entity

**Cause:** Missing required query parameters or invalid JSON in `process_id_list`

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "detail": [
    {
      "loc": ["query", "process_id_list"],
      "msg": "field required",
      "type": "value_error.missing"
    }
  ]
}
```

## Related Endpoints

<CardGroup cols={2}>
  <Card title="Validate LCA" icon="circle-check" href="/api-reference/lca/validate">
    Validate before calculating impacts
  </Card>

  <Card title="Export to Excel" icon="file-excel" href="/api-reference/lca/export-xlsx">
    Export impact results as spreadsheet
  </Card>

  <Card title="LCA Dashboard" icon="chart-pie" href="/api-reference/lca/dashboard">
    View aggregated environmental impact results
  </Card>
</CardGroup>
