# Authentication, input and response

## Request a sustainability advice based on address.

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

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">Name</th><th width="117.99993896484375">Type</th><th width="282.2220458984375">Description</th><th>Default</th></tr></thead><tbody><tr><td>postcode<mark style="color:red;">*</mark></td><td>string</td><td>zip code in six character format e.g. 1234AB</td><td></td></tr><tr><td>housenumber<mark style="color:red;">*</mark></td><td>integer</td><td>house number of the object e.g. 1</td><td></td></tr><tr><td>houseaddition</td><td>string</td><td>addition to the house number e.g. A</td><td></td></tr><tr><td>position</td><td>integer</td><td>1 = 'Corner ground floor'<br>2 = 'In between ground floor'<br>3 = 'Corner mid floor'<br>4 = 'In between mid floor'<br>5 = 'Corner top floor'<br>6 = 'In between top floor'<br>7 = 'Entire top floor'</td><td>1</td></tr><tr><td>floors</td><td>integer</td><td><p>Does the unit has one or more floors?</p><p>1 = 'Single'</p><p>2 = 'Multiple'              </p></td><td>1</td></tr><tr><td>back_facade</td><td>boolean</td><td><p>Does the unit has as back facade?</p><p>false = no</p><p>true = yes</p></td><td>false</td></tr><tr><td>build_year</td><td>integer</td><td>build year of the property</td><td></td></tr><tr><td>inner_surface_area</td><td>float</td><td>square meter surface area</td><td></td></tr><tr><td>apartment_type</td><td>integer</td><td>1 = 'Galerijflat'<br>2 = 'Portiekflat'<br>3 = 'Corridorflat'<br>4 = 'Maisonnette'<br>5 = 'Benedenwoning'<br>6 = 'Bovenwoning'<br>7 = 'Portiekwoning</td><td></td></tr><tr><td>wall_insulation</td><td>integer</td><td>see <a href="/pages/DTplmmMlP75yYyVJdcVZ">Measures</a></td><td></td></tr><tr><td>floor_insulation</td><td>integer</td><td>see <a href="/pages/DTplmmMlP75yYyVJdcVZ">Measures</a></td><td></td></tr><tr><td>roof_insulation</td><td>integer</td><td>see <a href="/pages/DTplmmMlP75yYyVJdcVZ">Measures</a></td><td></td></tr><tr><td>living_room_windows</td><td>integer</td><td>see <a href="/pages/DTplmmMlP75yYyVJdcVZ">Measures</a></td><td></td></tr><tr><td>installation</td><td>integer</td><td>see <a href="/pages/DTplmmMlP75yYyVJdcVZ">Measures</a></td><td>4</td></tr><tr><td>shower</td><td>integer</td><td>see <a href="/pages/DTplmmMlP75yYyVJdcVZ">Measures</a></td><td></td></tr><tr><td>ventilation</td><td>integer</td><td>see <a href="/pages/DTplmmMlP75yYyVJdcVZ">Measures</a></td><td></td></tr><tr><td>solar_panels </td><td>list</td><td>see <a href="/pages/DTplmmMlP75yYyVJdcVZ">Measures</a></td><td><br></td></tr><tr><td>number_of_solar_panels</td><td>integer</td><td>see <a href="/pages/DTplmmMlP75yYyVJdcVZ">Measures</a></td><td></td></tr><tr><td>cooling</td><td>integer</td><td><p>Is there a cooling system present?</p><p>1 = No cooling</p><p>2 = Air conditioning unit, direct air cooling     </p><p>Default</p></td><td>1</td></tr><tr><td>electric_cooking</td><td>integer</td><td><p>What is used for cooking?</p><p>1 = Gas stove</p><p>2 = Electric stove</p></td><td><p>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></td></tr><tr><td>gas_usage</td><td>float</td><td>overwrites estimated yearly  gas consumption in m3</td><td></td></tr><tr><td>heat_usage</td><td>float</td><td>overwrites specified yearly heat consumption in GJ.</td><td></td></tr><tr><td>electricity_usage</td><td>float </td><td>overwrites specified yearly electricity consumption in KWh</td><td></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></td></tr><tr><td>minimum_solar_panels</td><td>integer</td><td>The minimum number of new panels to be placed</td><td></td></tr><tr><td>search_criteria</td><td>integer</td><td><p>1 = lowest investment costs</p><p>2 = lowest energy costs</p><p>3 = highest return on investment</p><p>4 = lowest beng2 (highest label)</p></td><td>3</td></tr><tr><td>max_investment</td><td>integer</td><td>maximum investment, use 0 for unlimited</td><td></td></tr><tr><td>target_label</td><td>string</td><td>desired target energy label</td><td>A+</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>natural_gas</td><td>integer</td><td>1 = no filter<br>2 = natural gas mandatory<br>3 = natural gas free</td><td></td></tr><tr><td>heat_pump_allowed</td><td>boolean</td><td><p>false = not allowed</p><p>true = allowed</p></td><td>false</td></tr><tr><td>district_heating_allowed</td><td>boolean</td><td><p>false = not allowed</p><p>true = allowed</p></td><td>false</td></tr><tr><td>heatpump_insulation_req</td><td>integer</td><td><p>1 = no minimum requirement</p><p>2 = envelope, including glass min 2</p><p>3 = house meets “standaard”</p></td><td>1</td></tr><tr><td>exclude_vat</td><td>boolean</td><td><p>Prices are with or without VAT included.</p><p>false = VAT included</p><p>true = VAT excluded</p></td><td>false</td></tr><tr><td>cost_indicators</td><td>dict</td><td>see <a href="/pages/9l1MUydr0BJk40TYC4fR">Cost indicators</a></td><td></td></tr><tr><td>wall_filters</td><td>dict</td><td>see <a href="/pages/YhaDttRsnFMNkGO4mioe">Measure filters</a></td><td></td></tr><tr><td>roof_filters</td><td>dict</td><td>see <a href="/pages/YhaDttRsnFMNkGO4mioe">Measure filters</a></td><td></td></tr><tr><td>floor_filters</td><td>dict</td><td>see <a href="/pages/YhaDttRsnFMNkGO4mioe">Measure filters</a></td><td></td></tr><tr><td>eco_delta</td><td>boolean</td><td>disable fetching of ecovalue with 0</td><td>1</td></tr><tr><td>lock_measures</td><td>list</td><td>see <a href="/pages/zxKQstGTf4Zrgoz1du9U">Lock measures</a></td><td></td></tr><tr><td>exclude_measures</td><td>list </td><td>see <a href="/pages/n9kSfo41hANAkqslIiVp">Exclude measures</a></td><td></td></tr></tbody></table>

{% hint style="info" %}
*<mark style="color:red;">**Specifying both the position and the floors of the apartment is recommended for optimal results.**</mark>*
{% endhint %}

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

```
{
  "warnings": [],
  "address": {
    "housenumber": 227,
    "postcode": "3024XL",
    "houseaddition": "B",
    "street": "Willem Buytewechstraat",
    "city": "Rotterdam",
    "location": {
      "lat": 51.9076115229,
      "lon": 4.4513985382
    }
  },
  "building": {
    "build_year": 1927,
    "inner_surface": 74,
    "floor_surface": 74,
    "flat_roof_surface": null,
    "pitched_roof_surface": null,
    "wall_surface": 50.2,
    "glass_living_room_surface": 13.4,
    "glass_bedrooms_surface": null,
    "number_of_doors": 5,
    "apartment_type": "Portiekwoning"
  },
  "label": {
    "current": "C",
    "potential": "A+"
  },
  "accuracy_indicator": 3,
  "provided_label": {
    "temporary": "G",
    "definitive": null,
    "definitive_type": null,
    "definitive_validity": null,
    "definitive_beng2": null
  },
  "BENG2": {
    "current": 191,
    "potential": 87
  },
  "meta": null,
  "CO2": {
    "current": 2095,
    "potential": 2022
  },
  "financial": {
    "total_investment": 17400,
    "total_saving": 32,
    "months_to_pay_off": 6516,
    "eco_value": 39246,
    "savings_monthly": 3,
    "energy_cost_monthly": {
      "current": 158,
      "potential": 155
    },
    "energy_cost_yearly": {
      "current": 1896,
      "potential": 1864
    },
    "return_on_investment": "-0.89%",
    "loan": {
      "monthly_payment": 72
    }
  },
  "gas_usage": {
    "current": 741,
    "potential": 321
  },
  "electricity_usage": {
    "current": 2262,
    "potential": 4262
  },
  "city_heating_usage": {
    "current": 0,
    "potential": 0
  },
  "solar_panel_yield": {
    "current": 0,
    "potential": 0
  },
  "energy_prices": {
    "variable_gas_price": 1.359,
    "variable_electricity_price": 0.27,
    "solarpanel_watt_peak_per_m2": 250
  },
  "solar_panels": {
    "current": null,
    "potential": null
  },
  "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": "Geen",
        "value": 1,
        "points": 0
      },
      "after": {
        "desc": "Goed",
        "value": 3,
        "points": 7
      },
      "investment": 2553,
      "savings": 51,
      "co2_reduce": 67,
      "BENG2": "17",
      "gas_savings": 37,
      "electricity_savings": 0
    },
    "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
    },
    "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
    },
    "installation": {
      "before": {
        "desc": "HR combi ketel",
        "value": 4,
        "points": 15
      },
      "after": {
        "desc": "Hybride WP",
        "value": 8,
        "points": 20
      },
      "investment": 6621,
      "savings": -38,
      "co2_reduce": -20,
      "BENG2": "80",
      "gas_savings": 368,
      "electricity_savings": -2000
    },
    "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": "Natuurlijke ventilatie",
        "value": 1,
        "points": 0
      },
      "after": {
        "desc": "Decentrale balansventilatie",
        "value": 4,
        "points": 5
      },
      "investment": 8226,
      "savings": 116,
      "co2_reduce": 152,
      "BENG2": "34",
      "gas_savings": 85,
      "electricity_savings": 0
    },
    "solar_panels": {
      "before": {
        "desc": "0",
        "value": 0,
        "points": null
      },
      "after": {
        "desc": "0",
        "value": 0,
        "points": null
      },
      "investment": 0,
      "savings": 0,
      "co2_reduce": 0,
      "BENG2": "0",
      "gas_savings": 0,
      "electricity_savings": 0
    },
    "electric_cooking": {
      "before": {
        "desc": "Gas stove",
        "value": 1,
        "points": null
      },
      "after": {
        "desc": "Gas stove",
        "value": 1,
        "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 house."
}
```

{% endtab %}
{% endtabs %}

## Request body

#### Example requests

```
{
  "postcode": "3024XL",
  "housenumber":227,
  "houseaddition": "B",
  "position": 3,
  "floors": 1
}
```


---

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