# Authentication, input and response

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

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

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

| Name                                            | Type    | Description                                                                                                                          |
| ----------------------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| post\_code<mark style="color:red;">\*</mark>    | String  | 1234AB                                                                                                                               |
| house\_number<mark style="color:red;">\*</mark> | Number  | 1                                                                                                                                    |
| house\_addition                                 | String  | A                                                                                                                                    |
| inner\_surface\_area                            | Number  | 100                                                                                                                                  |
| build\_year                                     | Number  | 2001                                                                                                                                 |
| house\_type                                     | Number  | current house-type: '2 onder 1 kap' = 1, 'hoekwoning' = 2, 'tussenwoning' = 3, 'vrijstaand' = 4 or 'appartment' = 5                  |
| installation                                    | Number  | current installation type - see [measures](/english/sustainability/sustainability-api/measures.md)                                   |
| wall\_insulation                                | Number  | current wall insulation - see [measures](/english/sustainability/sustainability-api/measures.md)                                     |
| roof\_insulation                                | Number  | current roof insulation - see [measures](/english/sustainability/sustainability-api/measures.md)                                     |
| floor\_insulation                               | Number  | current floor insulation - see [measures](/english/sustainability/sustainability-api/measures.md)                                    |
| living\_room\_windows                           | Number  | current living room windows - see [measures](/english/sustainability/sustainability-api/measures.md)                                 |
| bedroom\_windows                                | Number  | current bedroom windows - see [measures](/english/sustainability/sustainability-api/measures.md)                                     |
| shower                                          | Boolean | current shower WTW - see [measures](/english/sustainability/sustainability-api/measures.md)                                          |
| ventilation                                     | Number  | current ventilation - see [measures](/english/sustainability/sustainability-api/measures.md)                                         |
| solar\_panels                                   | Number  | current solar panels in m2 ot total watt-peak capacity in W - see [measures](/english/sustainability/sustainability-api/measures.md) |
| solarpanel\_watt\_peak                          | Number  | current solarpanel watt peak performance per m2                                                                                      |
| watt\_panels                                    | Boolean | assume solar\_panels input is in W (0) or m2 (1). Default = 1                                                                        |
| inhabitants                                     | Integer | number of people living in the house                                                                                                 |

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

```
{
	"Output": {
		"post_code": "2771DS",
		"house_number": 87,
		"house_addition": null,
		"build_year": 1961,
		"inner_surface_area": 151,
		"house_type": "vrijstaand",
		"installation": 4,
		"wall_insulation": 2,
		"roof_insulation": 2,
		"floor_insulation": 2,
		"living_room_windows": 2,
		"ventilation": 1,
		"bedroom_windows": 2,
		"shower": 0,
		"solar_panels": 15,
		"solarpanel_watt_peak": 300,
		"CO2": 3084,
		"definitive_energy_label": "C",
		"definitive_energy_label_type": "NEN7120",
		"definitive_energy_label_validity_date": "2030-12",
		"current_estimated_energy_label": "B",
		"current_estimated_BENG1_score": 146,
		"current_estimated_BENG2_score": 167,
		"estimated_gas_usage": 3108,
		"estimated_energy_usage": 760
	}
}
```

{% endtab %}

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

```
{
  "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 Unsuccessful response" %}

```
{ 
    "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 Apartment error" %}

```
{ 
    "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 Service is not available and/or down" %}

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

{% endtab %}

{% tab title="404: Not Found If BagId is used instead of Address" %}

<pre><code><strong>{
</strong>     "detail": "Could not find any object with your BAG ID." 
}
</code></pre>

{% 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 %}

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

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

Use **BAG\_id** as alternative to **post\_code, house\_number** and **house\_addition**. All other inputs and outputs are similar.

#### Headers

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

#### Request Body

| Name                                      | Type    | Description                                                                                                                          |
| ----------------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| bag\_id<mark style="color:red;">\*</mark> | string  | 16 digits BAG\_ID                                                                                                                    |
| inner\_surface\_area                      | Number  | 100                                                                                                                                  |
| build\_year                               | Number  | 2001                                                                                                                                 |
| house\_type                               | Number  | current house-type: '2 onder 1 kap' = 1, 'hoekwoning' = 2, 'tussenwoning' = 3, 'vrijstaand' = 4 or 'appartment' = 5                  |
| installation                              | Number  | current installation type - see [measures](/english/sustainability/sustainability-api/measures.md)                                   |
| wall\_insulation                          | Number  | current wall insulation - see [measures](/english/sustainability/sustainability-api/measures.md)                                     |
| roof\_insulation                          | Number  | current roof insulation - see [measures](/english/sustainability/sustainability-api/measures.md)                                     |
| floor\_insulation                         | Number  | current floor insulation - see [measures](/english/sustainability/sustainability-api/measures.md)                                    |
| living\_room\_windows                     | Number  | current living room windows - see [measures](/english/sustainability/sustainability-api/measures.md)                                 |
| bedroom\_windows                          | Number  | current bedroom windows - see [measures](/english/sustainability/sustainability-api/measures.md)                                     |
| shower                                    | Boolean | current shower WTW - see [measures](/english/sustainability/sustainability-api/measures.md)                                          |
| ventilation                               | Number  | current ventilation - see [measures](/english/sustainability/sustainability-api/measures.md)                                         |
| solar\_panels                             | Number  | current solar panels in m2 ot total watt-peak capacity in W - see [measures](/english/sustainability/sustainability-api/measures.md) |
| solarpanel\_watt\_peak                    | Number  | current solarpanel watt peak performance per m2                                                                                      |
| watt\_panels                              | Boolean | assume solar\_panels input is in W (0) or m2 (1). Default = 1                                                                        |
| inhabitants                               | Integer | number of people living in the house                                                                                                 |

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

```javascript
{
	"Output": {
		"post_code": "2771DS",
		"house_number": 87,
		"house_addition": null,
		"build_year": 1961,
		"inner_surface_area": 151,
		"house_type": "vrijstaand",
		"installation": 4,
		"wall_insulation": 2,
		"roof_insulation": 2,
		"floor_insulation": 2,
		"living_room_windows": 2,
		"ventilation": 1,
		"bedroom_windows": 2,
		"shower": 0,
		"solar_panels": 15,
		"solarpanel_watt_peak": 300,
		"CO2": 3084,
		"definitive_energy_label": "C",
		"definitive_energy_label_type": "NEN7120",
		"definitive_energy_label_validity_date": "2030-12",
		"current_estimated_energy_label": "B",
		"current_estimated_BENG2_score": 167,
		"estimated_gas_usage": 3108,
		"estimated_energy_usage": 760
	}
}
```

{% endtab %}

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

```
{
  "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 Unsuccessful response" %}

```
{ 
    "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 Apartment error" %}

```
{ 
    "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 Service is not available and/or down" %}

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

{% endtab %}

{% tab title="404: Not Found If BagId is used instead of Address" %}

<pre><code><strong>{
</strong>     "detail": "Could not find any object with your BAG ID." 
}
</code></pre>

{% 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 %}

## Request body

#### Example requests

<pre><code><strong>{
</strong>  "post_code": "4709BM",
  "house_number": 1,
  "house_addition": "g",
  "installation": 1,
  "wall_insulation": 3,
  "roof_insulation": 2,
  "floor_insulation": 2,
  "living_room_windows": 3
}
</code></pre>

<pre><code><strong>{
</strong>  "bag_id": "0637010000264937",
  "installation": 1,
  "wall_insulation": 3,
  "roof_insulation": 2,
  "floor_insulation": 2,
  "living_room_windows": 3
}
</code></pre>


---

# 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/nta-8800-energylabel-api/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.
