# Authentication, input and response

## Post object data to receive an accurate automated model valuation

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

This endpoint allows you to receive response from the Altum AI AVM model.

#### 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                               |
| --------------------------------------------- | ------- | ----------------------------------------- |
| housetype                                     | string  | House type of the object                  |
| valuationdate                                 | string  | Valuation date (default is date of entry) |
| houseaddition                                 | string  | House letters and/or addition             |
| housenumber<mark style="color:red;">\*</mark> | number  | House number                              |
| postcode<mark style="color:red;">\*</mark>    | string  | Zipcode of the object                     |
| image                                         | boolean | Fetching image of object,  0 or 1         |
| buildyear                                     | integer | Year of construction                      |
| innersurfacearea                              | integer | Square meter (m2) inner surface area      |
| outersurfacecarea                             | integer | Square meter (m2) outer surface area      |
| energylabel                                   | string  | Energy label A till G                     |

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

{% tab title="429: Too Many Requests API key limit exceeded" %}

{% endtab %}

{% tab title="500: Internal Server Error Service is not available and/or down" %}

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

{% endtab %}

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

```
{
    "Output": {
        "BagID": "0637010021364937",
        "PostCode": "1234AB",
        "HouseNumber": "1",
        "HouseAddition": null,
        "City": "Woonplaats",
        "Street": "Straatnaam",
        "HouseType": "Tussenwoning",
        "BuildYear": "2001",
        "InnerSurfaceArea": "121",
        "OuterSurfaceArea": "136",
        "Volume": "429",
        "EnergyLabel": null,
        "Longitude": "4.524624609",
        "Latitude": "52.070925901563704",
        "Rooms": null,
        "Image": null,
        "ValuationDate": "20200326",
        "PriceEstimation": "355012",
        "Confidence": "90% Confidence Interval is 327363-429880."
    }
}
```

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

{
  'Unsupported evaluation date format, it should be YYYYMMDD.'
}

{
  'The evaluation date range should be from {} and until {}.'
}

{
  'Output': 'The given house type is unsupported or unknown.'
}

{
  'Output': 'The prediction is too low.'
}
```

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

{% hint style="info" %}
Key: distributed via e-mail&#x20;
{% endhint %}

## Request body

#### Example request

```
{
   "postcode" : "1234AB",
   "housenumber" : "5",
   "houseaddition" : "",
   "valuationdate" : "20200326",
   "image": 1,
   "buildyear": 2000,
   "innersurfacearea": 150,
   "outersurfacearea": 100,
   "energylabel": "B",
   "housetype": "Vrijstaande woning"
}
```

## &#x20;Up next:

{% content-ref url="variables" %}
[variables](https://docs.altum.ai/english/property-valuation-and-market/avm-api/variables)
{% endcontent-ref %}
