> For the complete documentation index, see [llms.txt](https://docs.altum.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.altum.ai/english/sustainability/energylabel-insights-api/authentication-input-and-response.md).

# Authentication, input and response

## Returns the impact of an Energylabel change on sale duration and difference in expected transaction price vs. asking price

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

#### Headers

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

#### Request Body

| Name                                                    | Type    | Description                        |
| ------------------------------------------------------- | ------- | ---------------------------------- |
| postcode<mark style="color:red;">\*</mark>              | string  | 1234AB                             |
| housenumber<mark style="color:red;">\*</mark>           | integer | 1                                  |
| houseaddition                                           | string  | A                                  |
| current\_energy\_label                                  | string  | B                                  |
| target\_energy\_label<mark style="color:red;">\*</mark> | string  | A+++                               |
| ecovalue                                                | boolean | 1 to receive Ecovalue, default = 0 |

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

```
{
	"current_insights": {
		"stratification": "('B', 'Dorpskern', 'vrijstaand', '1990-2004', '>150')",
		"mean_sales_duration": "124.0",
		"median_sales_duration": "144.0",
		"mean_diff_price": "28733.0",
		"median_diff_price": "42000.0"
	},
	"target_insights": {
		"stratification": "('A', 'Dorpskern', 'vrijstaand', '1990-2004', '>150')",
		"mean_sales_duration": "118.0",
		"median_sales_duration": "118.0",
		"mean_diff_price": "-12375.0",
		"median_diff_price": "-17250.0"
	},
	"delta": {
		"mean_sales_duration": "6.0",
		"median_sales_duration": "26.0",
		"mean_diff_price": "41108.0",
		"median_diff_price": "59250.0",
		"mean_diff_price_percentage": "143.1",
		"median_diff_price_percentage": "141.1",
		"ecovalue": "12872"
	}
}
```

{% endtab %}

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

```
{
   "Output": "The given house address not found in database, the combination of Post Code, House Number and House Addition does not exist."
}


{
   "Output": "The current energy label for the given house address not found in database. Please provide the current energy label."
}


{
   "Output": "We are not able to provide insights at the moment."
}
```

{% endtab %}

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

```
{
	"detail": [
		{
			"loc": [
				"body",
				101
			],
			"msg": "Expecting ',' delimiter: line 6 column 3 (char 101)",
			"type": "value_error.jsondecode",
			"ctx": {
				"msg": "Expecting ',' delimiter",
				"doc": "{\n  \"postcode\": \"2201PZ\",\n  \"housenumber\": 11,\n  \"houseaddition\": \"\",\n\t\"current_energy_label\": \"A\"\n  \"target_energy_label\": \"A\",\n\t\"ecovalue\": 1\n}",
				"pos": 101,
				"lineno": 6,
				"colno": 3
			}
		}
	]
}
```

{% 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="401: Unauthorized No access" %}

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

{% endtab %}
{% endtabs %}

## Request body

#### Example request

```
{
  "postcode": "1015GS",
  "housenumber":58,
  "houseaddition": "A1",
  "target_energy_label": "A",
  "ecovalue": 1
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
