# Authentication, input and response

### Headers

<table><thead><tr><th width="152">Name</th><th width="145">Type</th><th>Description</th></tr></thead><tbody><tr><td>Content-Type</td><td>string</td><td>application/json</td></tr><tr><td>x-api-key<mark style="color:red;">*</mark></td><td>string</td><td>Unique API key from Altum. Obtain one via Mopsus (https://mopsus.altum.ai)</td></tr></tbody></table>

This is the main endpoint of the API. It retrieves a list of subsidies based on a user's postcode and, if provided, their personal and financial details for loan eligibility checking.

<mark style="color:green;">**`GET`**</mark>   `https://api.altum.ai/market-trend?postcode=??`

### Request body

**Market Trend Request Model**

| **Field**                                  | **Type** | **Description**                                     |
| ------------------------------------------ | -------- | --------------------------------------------------- |
| postcode<mark style="color:red;">\*</mark> | string   | **Required**. The Dutch postcode (e.g., "3511 AA"). |

**Example Complete Input**

```
https://api.altum.ai/market-trend?postcode=5258BB
```

Upon a successful `GET` request, the API returns a `200 OK` status with a JSON object containing the results.

### Market Trend API Response Model

| **Field**                       | **Type** | **Description**                                                                                                                 |
| ------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------- |
| postcode                        | String   | The normalized Dutch postcode (e.g., "1011AB") used for the query.                                                              |
| city                            | String   | The city name derived from the master address database.                                                                         |
| neighbourhood                   | String   | The specific neighborhood name (if available in Dataland source).                                                               |
| municipality                    | String   | The administrative municipality governing the area.                                                                             |
| averagePriceSingleFamilyHomes   | Float    | The average transaction price for single-family properties (detached, semi-detached, terraced).                                 |
| averagePriceMultiFamilyHomes    | Float    | The average transaction price for multi-family properties (apartments/flats).                                                   |
| pricePerSquareMeterSingleFamily | Float    | The average price per square meter (€/m²) for single-family homes.                                                              |
| pricePerSquareMeterMultiFamily  | Float    | The average price per square meter (€/m²) for apartments.                                                                       |
| annualPriceChange               | Float    | The annualized percentage growth (CAGR) of property values compared to the previous recorded year.                              |
| fiveYearPriceChange             | Float    | The projected percentage change in value over a 5-year period based on historical growth trends.                                |
| totalSalesLast12Months          | Integer  | The total count of property transactions recorded in this postcode over the last 365 days.                                      |
| priceDistribution               | Object   | A dictionary serving as a histogram, mapping price ranges (e.g., "250-500k") to the number of properties sold in that bracket.  |
| pricePerSquareMeterDistribution | Object   | A dictionary serving as a histogram, mapping price-per-m² ranges (e.g., "3000-3500") to the frequency of sales in that bracket. |

### Output <a href="#id-5.-output" id="id-5.-output"></a>

Upon a successful `GET` request, the API returns a `200 OK` status with a JSON object containing the results.

**Example Complete Output**

```
{
  "region": {
    "postcode": "5258BB",
    "city": "BERLICUM NB",
    "neighbourhood": "Berlicum",
    "municipality": "Sint-Michielsgestel"
  },
  "averagePriceSingleFamilyHomes": 681870.58,
  "averagePriceMultiFamilyHomes": null,
  "pricePerSquareMeterSingleFamily": 1035.61,
  "pricePerSquareMeterMultiFamily": null,
  "annualPriceChange": 6.67,
  "fiveYearPriceChange": 38.09,
  "transactionData": {
    "totalSalesLast12Months": 0
  },
  "priceDistribution": {
    "250-500k": 2,
    "500-750k": 4,
    "1M+": 2
  },
  "pricePerSquareMeterDistribution": {
    "0-2500": 8
  }
}
```

**Explanation**

🏘️ **Region**

```
"region": {
  "postcode": "5258BB",
  "city": "BERLICUM NB",
  "neighbourhood": "Berlicum",
  "municipality": "Sint-Michielsgestel"
}
```

{% hint style="info" %}
All the data and KPIs are calculated for postcode 5258BB, providing context at the city **BERLICUM NB**, neighborhood **Berlicum**, and municipality **Sint-Michielsgestel**.
{% endhint %}

💰 **Average Property Prices**

```
"averagePriceSingleFamilyHomes": 681870.58,
"averagePriceMultiFamilyHomes": null
```

{% hint style="info" %}

* **Single-family homes:** €681,870 on average.
* **Multi-family homes / apartments:** No data available for this area.

This tells us that houses in this postcode are relatively expensive, and the market for apartments is either very small or not recorded.
{% endhint %}

📏 **Price Per Square Meter**

```
"pricePerSquareMeterSingleFamily": 1035.61,
"pricePerSquareMeterMultiFamily": null
```

{% hint style="info" %}

* **Single-family homes:** €1,035 per m².
* **Multi-family homes:** No data available.

This gives a way to compare house prices fairly, even if the sizes of the houses differ.
{% endhint %}

📈 **Price Trends**

```
"annualPriceChange": 6.67,
"fiveYearPriceChange": 38.09
```

{% hint style="info" %}

* **Annual price change:** +6.7% → prices increased over the last year.
* **Five-year price change:** +38.1% → prices increased significantly over the last 5 years.

This shows that house prices are rising in both the short term and long term.
{% endhint %}

🏷️ **Transaction Activity**

```
"transactionData": {
  "totalSalesLast12Months": 0
}
```

{% hint style="info" %}

* **Number of sales in the last 12 months:** 0

This means **no houses were sold in this area over the past year**, so the market is currently inactive.
{% endhint %}

💵 **Price Distribution**

```
  "priceDistribution": {
    "250-500k": 2,
    "500-750k": 4,
    "1M+": 2
  }
```

{% hint style="info" %}

* How many houses were sold in each price range (all-time, not just last 12 months):

  * €250k–€500k → 2 houses
  * €500k–€750k → 4 houses
  * €1M+ → 2 houses

  Most houses sold in this postcode fall in the **€500k–€750k range**, with a few high-end sales over €1M.
  {% endhint %}

🏠 **Price Per Square Meter Distribution**

```
"pricePerSquareMeterDistribution": {
  "0-2500": 8
}
```

{% hint style="info" %}

* All 8 recorded sales are in the **0–2,500 €/m² range**.

This tells us that even expensive houses are relatively modest in €/m² compared to very high-end markets.
{% endhint %}

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

```
Request processed and data returned.
```

{% endtab %}

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

```
The postcode exists, but there is insufficient data (e.g., missing dates or prices) to calculate KPIs.
```

{% endtab %}

{% tab title="404 Not Found" %}

```
No transactions or master data exist for the provided postcode.
```

{% endtab %}

{% tab title="422 Validation Error" %}
The postcode format was incorrect (e.g., "12345").
{% endtab %}

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

```
Database connection failure or unhandled exception in calculation logic.
```

{% endtab %}
{% endtabs %}


---

# 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/property-valuation-and-market/market-trend-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.
