# Authentication, input and response

## Request a sustainability advice based on address.

<mark style="color:green;">`POST`</mark> `https://api.altum.ai/v2/sustainability`

This endpoint allows you to receive response from the Altum AI Sustainability API regarding sustainability and the Ecovalue, using the post code, house number and house addition.

#### Headers

<table><thead><tr><th width="200">Name</th><th width="136.9998779296875">Type</th><th>Description</th></tr></thead><tbody><tr><td>Content-Type</td><td>string</td><td>application/json</td></tr><tr><td>x-api-key<mark style="color:red;">*</mark></td><td>string</td><td>Unique API Key from Altum. Create one via Mopsus(https://mopsus.altum.ai)</td></tr></tbody></table>

#### Request Body

<table><thead><tr><th width="216">Field</th><th width="117.99993896484375">Type</th><th width="282.2220458984375">Description</th><th>Example/Default</th></tr></thead><tbody><tr><td>postcode<mark style="color:red;">*</mark></td><td>string</td><td>Six-character postcode format</td><td>1234AB</td></tr><tr><td>housenumber<mark style="color:red;">*</mark></td><td>integer</td><td>House number of the object</td><td>5</td></tr><tr><td>houseaddition</td><td>string</td><td>Addition to the house number</td><td>C</td></tr><tr><td>build_year</td><td>integer</td><td>Year the object was built</td><td>1956</td></tr><tr><td>roof_type</td><td>integer</td><td><p><code>1</code> = (mostly) sloped roof</p><p><code>2</code> = (mostly) flat roof</p><p><code>3</code> = part sloped, part flat roof</p><p>If either flat or sloped is > 25% it is type 3</p></td><td>Default: 1</td></tr><tr><td>house_type</td><td>integer</td><td><p><code>1</code> = Vrijstaand</p><p><code>2</code> = 2 onder 1 kap</p><p><code>3</code> = Hoekwoning</p><p><code>4</code> = Tussenwoning</p></td><td>2</td></tr><tr><td>inner_surface_area</td><td>float</td><td>inner surface area (m2)</td><td>70</td></tr><tr><td>wall_insulation</td><td>integer</td><td>see <a href="/pages/lTx2NHwgiCOJyDOD5owQ">Measures</a></td><td>2</td></tr><tr><td>floor_insulation</td><td>integer</td><td>see <a href="/pages/lTx2NHwgiCOJyDOD5owQ">Measures</a></td><td>2</td></tr><tr><td>sloped_roof_insulation</td><td>integer</td><td>see <a href="/pages/lTx2NHwgiCOJyDOD5owQ">Measures</a></td><td>2</td></tr><tr><td>flat_roof_insulation</td><td>integer</td><td>see <a href="/pages/lTx2NHwgiCOJyDOD5owQ">Measures</a></td><td>2</td></tr><tr><td>living_room_windows</td><td>integer</td><td>see <a href="/pages/lTx2NHwgiCOJyDOD5owQ">Measures</a></td><td>2</td></tr><tr><td>bedroom_windows</td><td>integer</td><td>see <a href="/pages/lTx2NHwgiCOJyDOD5owQ">Measures</a></td><td>2</td></tr><tr><td>installation</td><td>integer</td><td>see <a href="/pages/lTx2NHwgiCOJyDOD5owQ">Measures</a></td><td>Default: 4</td></tr><tr><td>shower</td><td>integer</td><td>see <a href="/pages/lTx2NHwgiCOJyDOD5owQ">Measures</a></td><td>Default: 1</td></tr><tr><td>cooling</td><td>integer</td><td><p>Is there a cooling system present?</p><p><code>1</code> = No cooling</p><p><code>2</code> = Air conditioning unit, direct air cooling</p></td><td><p>1</p><p><br></p></td></tr><tr><td>ventilation</td><td>integer</td><td>see <a href="/pages/lTx2NHwgiCOJyDOD5owQ">Measures</a></td><td></td></tr><tr><td>electric_cooking</td><td>integer</td><td><p>What is used for cooking?</p><p><code>1</code> = Gas stove</p><p><code>2</code> = Electric stove</p></td><td><p>Default: 2 if Installation in [6,7],</p><p>Else 1</p><p><br></p></td></tr><tr><td>inhabitants</td><td>integer</td><td>number of people living in the house</td><td>Default: 3</td></tr><tr><td>ev_charger</td><td>integer</td><td><p>Does the building have a EV charger?                  </p><p><code>0</code> = no charger</p><p><code>1</code> = EV charger</p></td><td>Default: 0</td></tr><tr><td>electricity_connection_type</td><td>integer</td><td><p>The connection type of the building</p><p><code>1</code> = 1-phase</p><p><code>2</code> = 3-phase</p></td><td>Default: 1</td></tr><tr><td>netting_enabled</td><td>integer</td><td><p>Whether the netting ruling (salderingsregeling) is applied</p><p><code>0</code> = No netting</p><p><code>1</code> = Netting applied</p></td><td>Default: 1</td></tr><tr><td>solar_panels </td><td>list</td><td>see <a href="/pages/lTx2NHwgiCOJyDOD5owQ">Measures</a></td><td></td></tr><tr><td>number_of_solar_panels</td><td>integer</td><td>see <a href="/pages/lTx2NHwgiCOJyDOD5owQ">Measures</a></td><td></td></tr><tr><td>battery_type</td><td>integer</td><td>see <a href="/pages/lTx2NHwgiCOJyDOD5owQ">Measures</a></td><td></td></tr><tr><td>battery_control_mode</td><td>integer</td><td>see <a href="/pages/lTx2NHwgiCOJyDOD5owQ">Measures</a></td><td></td></tr><tr><td>battery_system</td><td>integer</td><td>see <a href="/pages/lTx2NHwgiCOJyDOD5owQ">Measures</a></td><td></td></tr><tr><td>gas_usage</td><td>float</td><td>Overwrites estimated yearly  gas consumption (m3)</td><td>1000</td></tr><tr><td>heat_usage</td><td>float</td><td>Overwrites specified yearly heat consumption (GJ)</td><td>45</td></tr><tr><td>electricity_usage</td><td>float </td><td>Overwrites specified yearly electricity consumption (kWh)</td><td>2600</td></tr><tr><td>electricity_generation</td><td>float</td><td><p>Total yearly electricity yield of solar panels in kWh.</p><p>Net usage = consumption - yield</p></td><td>800</td></tr><tr><td>minimum_solar_panels</td><td>integer</td><td>The minimum number of new panels to be placed</td><td>4</td></tr><tr><td>search_criteria</td><td>integer</td><td><p><code>1</code> = lowest investment costs</p><p><code>2</code> = lowest energy costs</p><p><code>3</code> = highest return on investment</p><p><code>4</code> = lowest beng2 (highest label)</p></td><td>Default: 3</td></tr><tr><td>target_label</td><td>string</td><td>Desired target energy label</td><td>A+</td></tr><tr><td>max_investment</td><td>integer</td><td>The maximum amount (€) to be invested</td><td>25000</td></tr><tr><td>natural_gas</td><td>integer</td><td><code>1</code> = no filter<br><code>2</code> = natural gas mandatory<br><code>3</code> = natural gas free</td><td>Default: 1</td></tr><tr><td>district_heating_allowed</td><td>boolean</td><td><p><code>0</code> = not allowed</p><p><code>1</code> = allowed</p></td><td>Default: 0</td></tr><tr><td>heatpump_insulation_req</td><td>integer</td><td><p>Minimum requirement on insulation before heatpump is allowed</p><p><code>1</code> = no minimum requirement</p><p><code>2</code>  = envelope, including glass min level 2</p><p><code>3</code> = house meets “standaard”</p></td><td>Default: 1</td></tr><tr><td>exclude_vat</td><td>boolean</td><td><p>Prices are with or without VAT included.</p><p><code>0</code> = VAT included</p><p><code>1</code> = VAT excluded</p></td><td>Default: 0</td></tr><tr><td>cost_indicators</td><td>dict</td><td>see <a href="/pages/sFcPxlGY3ADE7Ar1mVqi">Cost indicators</a></td><td></td></tr><tr><td>wall_filters</td><td>dict</td><td>see <a href="/pages/9usKCNiw2x6VqOvQshSq">Measure filters</a></td><td></td></tr><tr><td>sloped_roof_filters</td><td>dict</td><td>see <a href="/pages/9usKCNiw2x6VqOvQshSq">Measure filters</a></td><td></td></tr><tr><td>flat_roof_filters</td><td>dict</td><td>see <a href="/pages/9usKCNiw2x6VqOvQshSq">Measure filters</a></td><td></td></tr><tr><td>floor_filters</td><td>dict</td><td>see <a href="/pages/9usKCNiw2x6VqOvQshSq">Measure filters</a></td><td></td></tr><tr><td>energylabel_strict</td><td>integer</td><td>enable strict search of results within target_label with 1</td><td>0</td></tr><tr><td>eco_delta</td><td>boolean</td><td><p>Fetching ecovalue</p><p><code>0</code> = Disable</p><p><code>1</code> = Enable</p></td><td>Default: 1</td></tr><tr><td>lock_measures</td><td>list</td><td>see <a href="/pages/DNlyyAZB1EcxY8GwHTts">Lock measures</a></td><td></td></tr><tr><td>exclude_measures</td><td>list</td><td>see <a href="/pages/O0tWjl9VcWo0TGlglbj0">Exclude measures</a></td><td></td></tr></tbody></table>

{% tabs %}
{% tab title="200: OK Successful response" %}

```
{
  "warnings": [
    {
      "code": "11",
      "description": "Current building with energy label A++ already meets default target_label A+."
    }
  ],
  "address": {
    "housenumber": 87,
    "postcode": "2771DS",
    "houseaddition": null,
    "street": "Zuidkade",
    "city": "Boskoop",
    "location": {
      "lat": 52.0683938167,
      "lon": 4.6580852695
    }
  },
  "building": {
    "build_year": 1961,
    "inner_surface": 131,
    "floor_surface": 80.8,
    "flat_roof_surface": 5.2,
    "pitched_roof_surface": 98.9,
    "wall_surface": 126.1,
    "glass_living_room_surface": 11.1,
    "glass_bedrooms_surface": 16.6,
    "number_of_doors": 6,
    "type": "Vrijstaand"
  },
  "label": {
    "current": "A++",
    "potential": "A++++"
  },
  "accuracy_indicator": 6,
  "provided_label": {
    "temporary": "F",
    "definitive": "A+++",
    "definitive_type": "NTA 8800:2024 (basisopname woningbouw)",
    "definitive_validity": "2036-1",
    "definitive_beng2": 49
  },
  "BENG2": {
    "current": 75,
    "potential": -27
  },
  "meta": null,
  "CO2": {
    "current": 2359,
    "potential": -758
  },
  "financial": {
    "total_investment": 11565,
    "total_saving": 1424,
    "months_to_pay_off": 97,
    "eco_value": 1728,
    "savings_monthly": 119,
    "energy_cost_monthly": {
      "current": 151,
      "potential": 32
    },
    "energy_cost_yearly": {
      "current": 1813,
      "potential": 389
    },
    "return_on_investment": "55.58%",
    "loan": {
      "monthly_payment": 48
    }
  },
  "gas_usage": {
    "current": 0,
    "potential": 0
  },
  "electricity_usage": {
    "current": 6938,
    "potential": 6938
  },
  "city_heating_usage": {
    "current": 0,
    "potential": 0
  },
  "solar_panel_yield": {
    "current": 0,
    "potential": 9168
  },
  "energy_prices": {
    "variable_gas_price": 1.359,
    "variable_electricity_price": 0.27,
    "solarpanel_watt_peak_per_m2": 250
  },
  "solar_panels": {
    "current": null,
    "potential": [
      {
        "roof_surface": 0,
        "roof_type": "sloped",
        "original_watt_peak_capacity": null,
        "total_watt_peak_capacity": null,
        "added_watt_peak_capacity": 10312,
        "specific_watt_peak_of_added_panels": null,
        "added_panels": 25,
        "inclination_angle": 45,
        "orientation": 180
      }
    ]
  },
  "measures": {
    "wall_insulation": {
      "before": {
        "desc": "Goed",
        "value": 3,
        "points": 5
      },
      "after": {
        "desc": "Goed",
        "value": 3,
        "points": 5
      },
      "investment": 0,
      "savings": 0,
      "co2_reduce": 0,
      "BENG2": "0",
      "gas_savings": 0,
      "electricity_savings": 0
    },
    "floor_insulation": {
      "before": {
        "desc": "Goed",
        "value": 3,
        "points": 7
      },
      "after": {
        "desc": "Goed",
        "value": 3,
        "points": 7
      },
      "investment": 0,
      "savings": 0,
      "co2_reduce": 0,
      "BENG2": "0",
      "gas_savings": 0,
      "electricity_savings": 0
    },
    "sloped_roof_insulation": {
      "before": {
        "desc": "Geen",
        "value": 1,
        "points": 0
      },
      "after": {
        "desc": "Geen",
        "value": 1,
        "points": 0
      },
      "investment": 0,
      "savings": 0,
      "co2_reduce": 0,
      "BENG2": "0",
      "gas_savings": 0,
      "electricity_savings": 0
    },
    "flat_roof_insulation": {
      "before": {
        "desc": "Geen",
        "value": 1,
        "points": 0
      },
      "after": {
        "desc": "Goed",
        "value": 3,
        "points": 3
      },
      "investment": 484,
      "savings": 0,
      "co2_reduce": 0,
      "BENG2": "0",
      "gas_savings": 0,
      "electricity_savings": 0
    },
    "living_room_windows": {
      "before": {
        "desc": "Dubbel glas",
        "value": 2,
        "points": 1
      },
      "after": {
        "desc": "Dubbel glas",
        "value": 2,
        "points": 1
      },
      "investment": 0,
      "savings": 0,
      "co2_reduce": 0,
      "BENG2": "0",
      "gas_savings": 0,
      "electricity_savings": 0
    },
    "bedroom_windows": {
      "before": {
        "desc": "Dubbel glas",
        "value": 2,
        "points": null
      },
      "after": {
        "desc": "Dubbel glas",
        "value": 2,
        "points": null
      },
      "investment": 0,
      "savings": 0,
      "co2_reduce": 0,
      "BENG2": "0",
      "gas_savings": 0,
      "electricity_savings": 0
    },
    "installation": {
      "before": {
        "desc": "Elektrishe lucht-water WP",
        "value": 6,
        "points": 15
      },
      "after": {
        "desc": "Elektrishe lucht-water WP",
        "value": 6,
        "points": 15
      },
      "investment": 0,
      "savings": 0,
      "co2_reduce": 0,
      "BENG2": "0",
      "gas_savings": 0,
      "electricity_savings": 0
    },
    "shower": {
      "before": {
        "desc": "Geen Douche WTW",
        "value": 1,
        "points": null
      },
      "after": {
        "desc": "Geen Douche WTW",
        "value": 1,
        "points": null
      },
      "investment": 0,
      "savings": 0,
      "co2_reduce": 0,
      "BENG2": "0",
      "gas_savings": 0,
      "electricity_savings": 0
    },
    "cooling": {
      "before": {
        "desc": "No cooling",
        "value": 1,
        "points": null
      },
      "after": {
        "desc": "No cooling",
        "value": 1,
        "points": null
      },
      "investment": 0,
      "savings": 0,
      "co2_reduce": 0,
      "BENG2": "0",
      "gas_savings": 0,
      "electricity_savings": 0
    },
    "ventilation": {
      "before": {
        "desc": "Decentrale balansventilatie",
        "value": 4,
        "points": 5
      },
      "after": {
        "desc": "Decentrale balansventilatie",
        "value": 4,
        "points": 5
      },
      "investment": 0,
      "savings": 0,
      "co2_reduce": 0,
      "BENG2": "0",
      "gas_savings": 0,
      "electricity_savings": 0
    },
    "solar_panels": {
      "before": {
        "desc": "0",
        "value": 0,
        "points": null
      },
      "after": {
        "desc": "25",
        "value": 25,
        "points": null
      },
      "investment": 11080,
      "savings": 1424,
      "co2_reduce": 3116,
      "BENG2": "99",
      "gas_savings": 0,
      "electricity_savings": 9167
    },
    "electric_cooking": {
      "before": {
        "desc": "Electric stove",
        "value": 2,
        "points": null
      },
      "after": {
        "desc": "Electric stove",
        "value": 2,
        "points": null
      },
      "investment": 0,
      "savings": 0,
      "co2_reduce": 0,
      "BENG2": "0",
      "gas_savings": 0,
      "electricity_savings": 0
    }
  },
  "response_meta": null
}
```

{% endtab %}

{% tab title="400: Bad Request Unsuccessful response" %}

```
{
  "detail": "There was an error parsing the body"
}

{
  "detail": "Address not found in database, combination of zip code and house number"
}

{
  "detail": "There are no measures to suggest for this combination of input."
}

{
  "detail": "No housing variant with the selected installation options found with which the goal can be reached within the investment limit. Try again with different inputs and/or different search criteria."
}
{
  "detail": "For a given custom cost make sure the parameter 'value' is provided."
}
{
  "detail": "For a given improvement cost make sure all four parameters: 'material', 'work', 'saving_material' and 'saving _work' are provided."
}
```

{% endtab %}

{% tab title="401: Unauthorized No access" %}

```
{
    'Output': 'Please use https://api.altum.ai or visit https://mopsus.altum.ai to make your request.'
}
```

{% endtab %}

{% tab title="422: Unprocessable Entity Wrong input format" %}

```
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}
```

{% endtab %}

{% tab title="500: Internal Server Error Service is not available and/or down" %}

```
{
	"message": "Internal server error"
}
```

{% endtab %}

{% tab title="403: Forbidden Forbidden" %}

```
{
	"message": "Missing Authentication Token"
}
```

{% endtab %}

{% tab title="301: Moved Permanently Apartment  error" %}

```
{
    "detail": "Unable to check apartment."
}
```

{% endtab %}

{% tab title="303: See Other house type error" %}

```
{ 
  "detail": "House type not found in database. Use house_type parameter instead." 
}
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="400: Bad Request Unsuccessful response" %}

```
{
  "detail": "There was an error parsing the body"
}

{
  "detail": "Address not found in database, combination of zip code and house number"
}

{
  "detail": "There are no measures to suggest for this combination of input."
}

{
  "detail": "No housing variant with the selected installation options found with which the goal can be reached within the investment limit. Try again with different inputs and/or different search criteria."
}
```

{% endtab %}

{% tab title="401: Unauthorized No access" %}

```
{
    'Output': 'Please use https://api.altum.ai or visit https://mopsus.altum.ai to make your request.'
}
```

{% endtab %}

{% tab title="422: Unprocessable Entity Wrong input format" %}

```
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}
```

{% endtab %}

{% tab title="500: Internal Server Error Service is not available and/or down" %}

```
{
	"message": "Internal server error"
}
```

{% endtab %}

{% tab title="403: Forbidden Forbidden" %}

```
{
	"message": "Missing Authentication Token"
}
```

{% endtab %}

{% tab title="301: Moved Permanently Apartment  error" %}

```
{
    "detail": "Unable to check apartment."
}
```

{% endtab %}

{% tab title="303: See Other house type error" %}

```
{ 
  "detail": "House type not found in database. Use house_type parameter instead." 
}
```

{% endtab %}
{% endtabs %}

## Request body

#### Example requests

```
{
    "post_code": "2771DS",
    "house_number": "87",
    "target_label": "A++++",
    "eco_delta": 0
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.altum.ai/english/sustainability/sustainability-api-v2/authentication-input-and-response.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
