# Authentication, input and response

## Request a sustainability advice based on address.

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

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

#### Headers

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

#### Request Body

| Name                                          | Type    | Description                                                                                                     | Example                                                                                                 |
| --------------------------------------------- | ------- | --------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
| postcode<mark style="color:red;">\*</mark>    | string  | Six-character postcode format                                                                                   | 1234AB                                                                                                  |
| housenumber<mark style="color:red;">\*</mark> | int     | House number of the object                                                                                      | 5                                                                                                       |
| houseaddition                                 | string  | Addition to the house number                                                                                    | C                                                                                                       |
| build\_year                                   | int     | Year the object was built                                                                                       | 1956                                                                                                    |
| roof\_type                                    | int     | The type of the roof                                                                                            | <p>1 = (mostly) sloped roof</p><p>2 = (mostly) flat roof</p><p>3 = part sloped, part flat roof</p>      |
| inner\_surface\_area                          | float   | The total living surface area (m2)                                                                              | 90                                                                                                      |
| house\_type                                   | int     | The type of the house                                                                                           | <p>1 = vrijstaande woning</p><p>2 = 2-onder-1-kapwoning</p><p>3 = hoekwoning</p><p>4 = tussenwoning</p> |
| wall\_insulation                              | int     | see [Measures](https://docs.altum.ai/english/sustainability/sustainability-api-v2-delta/measures)               | 2                                                                                                       |
| target\_wall\_insulation                      | int     | see [Measures](https://docs.altum.ai/english/sustainability/sustainability-api-v2-delta/measures)               | 4                                                                                                       |
| floor\_insulation                             | int     | see [Measures](https://docs.altum.ai/english/sustainability/sustainability-api-v2-delta/measures)               | 1                                                                                                       |
| target\_floor\_insulation                     | int     | see [Measures](https://docs.altum.ai/english/sustainability/sustainability-api-v2-delta/measures)               | 4                                                                                                       |
| sloped\_roof\_insulation                      | int     | see [Measures](https://docs.altum.ai/english/sustainability/sustainability-api-v2-delta/measures)               | 2                                                                                                       |
| target\_sloped\_roof\_insulation              | int     | see [Measures](https://docs.altum.ai/english/sustainability/sustainability-api-v2-delta/measures)               | 4                                                                                                       |
| flat\_roof\_insulation                        | int     | see [Measures](https://docs.altum.ai/english/sustainability/sustainability-api-v2-delta/measures)               | 2                                                                                                       |
| target\_flat\_roof\_insulation                | int     | see [Measures](https://docs.altum.ai/english/sustainability/sustainability-api-v2-delta/measures)               | 4                                                                                                       |
| living\_room\_windows                         | int     | see [Measures](https://docs.altum.ai/english/sustainability/sustainability-api-v2-delta/measures)               | 1                                                                                                       |
| target\_living\_room\_windows                 | int     | see [Measures](https://docs.altum.ai/english/sustainability/sustainability-api-v2-delta/measures)               | 3                                                                                                       |
| bedroom\_windows                              | int     | see [Measures](https://docs.altum.ai/english/sustainability/sustainability-api-v2-delta/measures)               | 1                                                                                                       |
| target\_bedroom\_windows                      | int     | see [Measures](https://docs.altum.ai/english/sustainability/sustainability-api-v2-delta/measures)               | 4                                                                                                       |
| installation                                  | int     | see [Measures](https://docs.altum.ai/english/sustainability/sustainability-api-v2-delta/measures)               | 4                                                                                                       |
| target\_installation                          | int     | see [Measures](https://docs.altum.ai/english/sustainability/sustainability-api-v2-delta/measures)               | 4                                                                                                       |
| shower                                        | int     | see [Measures](https://docs.altum.ai/english/sustainability/sustainability-api-v2-delta/measures)               | 1                                                                                                       |
| target\_shower                                | int     | see [Measures](https://docs.altum.ai/english/sustainability/sustainability-api-v2-delta/measures)               | 2                                                                                                       |
| ventilation                                   | int     | see [Measures](https://docs.altum.ai/english/sustainability/sustainability-api-v2-delta/measures)               | 2                                                                                                       |
| target\_ventilation                           | int     | see [Measures](https://docs.altum.ai/english/sustainability/sustainability-api-v2-delta/measures)               | 3                                                                                                       |
| solar\_panels                                 | list    | see [Measures](https://docs.altum.ai/english/sustainability/sustainability-api-v2-delta/measures)               |                                                                                                         |
| cooling                                       | int     | Is there a cooling system present?                                                                              | <p>1 = No cooling</p><p>2 = Air conditioning unit, direct air cooling</p>                               |
| target\_cooling                               | int     | Is there a cooling system present?                                                                              | <p>1 = No cooling</p><p>2 = Air conditioning unit, direct air cooling</p>                               |
| electric\_cooking                             | int     | What is used for cooking?                                                                                       | <p>1 = Gas stove</p><p>2 = Electric stove</p><p><em>If installation in \[6,7] -> 2 else 1</em></p>      |
| target\_electric\_cooking                     | int     | What is used for cooking?                                                                                       | <p>1 = Gas stove</p><p>2 = Electric stove</p><p><em>If installation in \[6,7] -> 2 else 1</em></p>      |
| inhabitants                                   | int     | The number of people living in the house                                                                        | 4                                                                                                       |
| gas\_usage                                    | float   | Overwrites the estimated yearly  gas consumption (m3)                                                           | 1000                                                                                                    |
| heat\_usage                                   | float   | Overwrites specified yearly heat consumption in (GJ)                                                            | 45                                                                                                      |
| electricity\_usage                            | float   | Overwrites specified yearly electricity consumption (KWh)                                                       | 2600                                                                                                    |
| electricity\_generation                       | float   | <p>Total yearly electricity yield of solar panels (kWh)</p><p>Net usage = consumption - yield</p>               | 800                                                                                                     |
| exclude\_vat                                  | boolean | Prices are with or without VAT included.                                                                        | <p>0 = VAT included</p><p>1 = VAT excluded</p><p><em>Default: 0</em></p>                                |
| cost\_indicators                              | dict    | see [Costs](https://docs.altum.ai/english/sustainability/sustainability-api-v2-delta/cost-table-input)          |                                                                                                         |
| wall\_filters                                 | dict    | see [Measure filters](https://docs.altum.ai/english/sustainability/sustainability-api-v2-delta/measure-filters) |                                                                                                         |
| sloped\_roof\_filters                         | dict    | see [Measure filters](https://docs.altum.ai/english/sustainability/sustainability-api-v2-delta/measure-filters) |                                                                                                         |
| flat\_roof\_filters                           | dict    | see [Measure filters](https://docs.altum.ai/english/sustainability/sustainability-api-v2-delta/measure-filters) |                                                                                                         |
| floor\_filters                                | dict    | see [Measure filters](https://docs.altum.ai/english/sustainability/sustainability-api-v2-delta/measure-filters) |                                                                                                         |
| fetch\_definitive\_label                      | int     | Fetching of definitive label from EP-online                                                                     | <p>0 = Disable</p><p>1 = Enable</p><p><em>Default: 0</em></p>                                           |
| eco\_delta                                    | boolean | Fetching ecovalue                                                                                               | <p>0 = Disable</p><p>1 = Enable</p><p><em>Default: 1</em></p>                                           |

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

```
{
  "warnings": [],
  "address": {
    "housenumber": 87,
    "postcode": "2771DS",
    "houseaddition": null,
    "street": "Zuidkade",
    "city": "Boskoop",
    "location": {
      "lat": 52.06839381665532,
      "lon": 4.65808526945334
    }
  },
  "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": "D",
    "potential": "D"
  },
  "provided_label": {
    "temporary": "F",
    "definitive": "C",
    "definitive_type": null,
    "definitive_validity": null
  },
  "BENG1": {
    "current": null,
    "potential": null
  },
  "BENG2": {
    "current": 265,
    "potential": 251
  },
  "meta": null,
  "energyindex": {
    "current": null,
    "potential": null
  },
  "ELG": {
    "current": null,
    "potential": null
  },
  "comfortscore": {
    "current": null,
    "potential": null
  },
  "CO2": {
    "current": 2633,
    "potential": 2179
  },
  "financial": {
    "total_investment": 1554,
    "total_saving": 69,
    "months_to_pay_off": 270,
    "eco_value": 0,
    "savings_monthly": 6,
    "energy_cost_monthly": {
      "current": 232,
      "potential": 227
    },
    "energy_cost_yearly": {
      "current": 2789,
      "potential": 2720
    },
    "return_on_investment": "-0.14%",
    "loan": {
      "monthly_payment": 6
    }
  },
  "gas_usage": {
    "current": 1697,
    "potential": 1697
  },
  "electricity_usage": {
    "current": 3262,
    "potential": 3262
  },
  "city_heating_usage": {
    "current": 0,
    "potential": 0
  },
  "solar_panel_yield": {
    "current": 4445,
    "potential": 5778
  },
  "energy_prices": {
    "variable_gas_price": null,
    "variable_electricity_price": null,
    "solarpanel_watt_peak_per_m2": null
  },
  "solar_panels": {
    "current": [
      {
        "roof_surface": 0,
        "roof_type": null,
        "original_watt_peak_capacity": null,
        "total_watt_peak_capacity": 2000,
        "current_specific_watt_peak": 250,
        "added_watt_peak_capacity": null,
        "specific_watt_peak_of_added_panels": null,
        "added_panels": null,
        "inclination_angle": 45,
        "orientation": 180
      },
      {
        "roof_surface": 1,
        "roof_type": null,
        "original_watt_peak_capacity": null,
        "total_watt_peak_capacity": 3000,
        "current_specific_watt_peak": 150,
        "added_watt_peak_capacity": null,
        "specific_watt_peak_of_added_panels": null,
        "added_panels": null,
        "inclination_angle": 45,
        "orientation": 180
      }
    ],
    "potential": [
      {
        "roof_surface": 0,
        "roof_type": null,
        "original_watt_peak_capacity": null,
        "total_watt_peak_capacity": 2500,
        "current_specific_watt_peak": null,
        "added_watt_peak_capacity": null,
        "specific_watt_peak_of_added_panels": 250,
        "added_panels": 1,
        "inclination_angle": 45,
        "orientation": 180
      },
      {
        "roof_surface": 1,
        "roof_type": null,
        "original_watt_peak_capacity": null,
        "total_watt_peak_capacity": 4000,
        "current_specific_watt_peak": null,
        "added_watt_peak_capacity": null,
        "specific_watt_peak_of_added_panels": 200,
        "added_panels": 3,
        "inclination_angle": 45,
        "orientation": 180
      }
    ]
  },
  "measures": {
    "wall_insulation": {
      "before": {
        "desc": "Geen",
        "value": 1,
        "points": 2
      },
      "after": {
        "desc": "Geen",
        "value": 1,
        "points": 2
      },
      "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": "Geen",
        "value": 1,
        "points": 0
      },
      "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": "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
    },
    "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": "HR-combi ketel",
        "value": 4,
        "points": 15
      },
      "after": {
        "desc": "HR-combi ketel",
        "value": 4,
        "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": "Natuurlijk",
        "value": 1,
        "points": 0
      },
      "after": {
        "desc": "Natuurlijk",
        "value": 1,
        "points": 0
      },
      "investment": 0,
      "savings": 0,
      "co2_reduce": 0,
      "BENG2": "0",
      "gas_savings": 0,
      "electricity_savings": 0
    },
    "solar_panels": {
      "before": {
        "desc": "5000",
        "value": 5000,
        "points": null
      },
      "after": {
        "desc": "6500",
        "value": 6500,
        "points": null
      },
      "investment": 1554,
      "savings": 69,
      "co2_reduce": 453,
      "BENG2": "99",
      "gas_savings": 0,
      "electricity_savings": 1334
    },
    "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 apartment."
}
```

{% endtab %}

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

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

{% endtab %}
{% endtabs %}
