# Authentication, input and response

## Determine the estimated current or potential NTA 8800 energy label

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

#### Headers

| Name                                        | Type   | Description                                                                 |
| ------------------------------------------- | ------ | --------------------------------------------------------------------------- |
| x-api-key<mark style="color:red;">\*</mark> | string | Unique API Key from Altum. Create one via Mopsus(<https://mopsus.altum.ai>) |
| Content-Type                                | string | application/json                                                            |

#### Request Body

<table><thead><tr><th>Field</th><th>Type</th><th width="187">Description</th><th>Example/Default</th></tr></thead><tbody><tr><td>postcode<mark style="color:red;">*</mark></td><td>string</td><td>zip code in six-character format</td><td>1234AB</td></tr><tr><td>housenumber<mark style="color:red;">*</mark></td><td>integer</td><td>house number</td><td>1</td></tr><tr><td>houseaddition</td><td>string</td><td>addition to the house number</td><td>A</td></tr><tr><td>build_year</td><td>integer</td><td>build year</td><td>1960</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="../../sustainability-api-v2/measures">Measures</a></td><td>2</td></tr><tr><td>floor_insulation</td><td>integer</td><td>see <a href="../../sustainability-api-v2/measures">Measures</a></td><td>2</td></tr><tr><td>sloped_roof_insulation</td><td>integer</td><td>see <a href="../../sustainability-api-v2/measures">Measures</a></td><td>2</td></tr><tr><td>flat_roof_insulation</td><td>integer</td><td>see <a href="../../sustainability-api-v2/measures">Measures</a></td><td>2</td></tr><tr><td>living_room_windows</td><td>integer</td><td>see <a href="../../sustainability-api-v2/measures">Measures</a></td><td>2</td></tr><tr><td>bedroom_windows</td><td>integer</td><td>see <a href="../../sustainability-api-v2/measures">Measures</a></td><td>2</td></tr><tr><td>installation</td><td>integer</td><td>see <a href="../../sustainability-api-v2/measures">Measures</a></td><td>Default: 4</td></tr><tr><td>shower</td><td>integer</td><td>see <a href="../../sustainability-api-v2/measures">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>Default: 1</td></tr><tr><td>ventilation</td><td>integer</td><td>see <a href="../../sustainability-api-v2/measures">Measures</a></td><td>1</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></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>solar_panels</td><td>list</td><td>see <a href="../../sustainability-api-v2/measures">Measures</a></td><td></td></tr><tr><td>number_of_solar_panels</td><td>integer</td><td>see <a href="../../sustainability-api-v2/measures">Measures</a></td><td></td></tr></tbody></table>

## Request body

<pre><code><strong>{
</strong>  "postcode": "2771DS",
  "housenumber": 87,
  "houseaddition": ""
}
</code></pre>

## Response Status Codes

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

```
{
	"Output": {
		"warnings": [],
		"postcode": "2771DS",
		"housenumber": 87,
		"houseaddition": null,
		"build_year": 1961,
		"inner_surface_area": 131,
		"house_type": "Vrijstaand",
		"installation": 6,
		"wall_insulation": 3,
		"sloped_roof_insulation": 4,
		"flat_roof_insulation": 3,
		"floor_insulation": 4,
		"living_room_windows": 3,
		"bedroom_windows": 3,
		"shower": 1,
		"ventilation": 4,
		"cooling": 1,
		"electric_cooking": 2,
		"solar_panels": null,
		"CO2": 2766,
		"definitive_energy_label": "A+++",
		"definitive_energy_label_type": "NTA 8800:2024 (basisopname woningbouw)",
		"definitive_energy_label_validity_date": "2036-1",
		"definitive_BENG2_score": 49,
		"current_estimated_energy_label": "A++",
		"current_estimated_BENG2_score": 63,
		"estimated_gas_usage": 0,
		"estimated_energy_usage": 8135,
		"estimated_city_heating_usage": 0,
		"measures_method": 1,
		"response_meta": null
	}
}
```

{% endtab %}

{% tab title="422: Unprocessable Entity" %}

```
{
  "detail": [
    {
      "loc": [
        "body",
        "postcode"
      ],
      "msg": "string does not match regex \"^(?!1000|1001|1002|1003|1004|1005|1006|1007|1008|1009|1010)[1-9][0-9]{3}[A-Z]{2}$\"",
      "type": "value_error.str.regex",
      "ctx": {
        "pattern": "^(?!1000|1001|1002|1003|1004|1005|1006|1007|1008|1009|1010)[1-9][0-9]{3}[A-Z]{2}$"
      }
    }
  ]
}
```

{% endtab %}

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

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

```
{
     "detail": "No measures suggested for this combination of input."
}
```

```
{
     "detail": "Code used in exclude_measure parameter is invalid"
}
```

```
{
     "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": "Gevelisolatie code ongeldig"
}
```

{% endtab %}

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

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

{% endtab %}

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

```
{ 
    "detail": "The house type of the given house was not found in database. Use house_type parameter instead."
}
```

{% endtab %}

{% tab title="500: Internal Server Error" %}

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

{% 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="403: Forbidden Forbidden" %}

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

{% endtab %}
{% endtabs %}
