> 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/financing/mortgage-calculation-api/authentication-input-and-response.md).

# Authentication, input and response

### Calculate Mortgage for a Dutch Residential Property

{% tabs %}
{% tab title="v1" %} <mark style="color:$success;">**`POST`**</mark> `https://api.altum.ai/v1/mortgage-calculator`

#### Headers

<table><thead><tr><th width="258.1484375">Name</th><th width="199.80078125">Type</th><th>Description</th></tr></thead><tbody><tr><td>x-api-key<mark style="color:red;">*</mark></td><td>string</td><td>Unique API Key from Altum. Create one on <a href="https://platform.altum.ai/auth">https://platform.altum.ai</a></td></tr><tr><td>Content-Type</td><td>string</td><td>application/json</td></tr></tbody></table>

#### Request Body

Note on required fields: A request must provide at least one of: either gross\_annual\_income (for mortgage calculation) OR loan\_amount and nominal\_interest\_rate (for standalone APR calculation)

<table><thead><tr><th width="252.66796875">Name</th><th width="199.78125">Type</th><th>Description</th></tr></thead><tbody><tr><td>postcode</td><td>string</td><td>Zipcode of the object in 4-digit + 2-letter format (e.g. "1234AB")</td></tr><tr><td>housenumber</td><td>number</td><td>House number of the object</td></tr><tr><td>houseaddition</td><td>string</td><td>House letter and addition of the object</td></tr><tr><td>loan_amount<mark style="color:red;">*</mark></td><td>number</td><td>Principal loan amount in € for APR calculation. Must be greater than initial costs</td></tr><tr><td>nominal_interest_rate<mark style="color:red;">*</mark></td><td>number</td><td>Nominal annual interest rate in %</td></tr><tr><td>initial_costs</td><td>number</td><td>Total upfront costs at start</td></tr><tr><td>gross_annual_income<mark style="color:red;">*</mark></td><td>number</td><td>Primary applicant's gross annual income (in €)</td></tr><tr><td>partner_gross_income</td><td>number</td><td>Partner's gross annual income (in €). Defaults to 0</td></tr><tr><td>applicant_type</td><td>string</td><td>"single" or "couple". Affects the €17,000 single-applicant bonus. Defaults to "single"</td></tr><tr><td>existing_debts</td><td>number</td><td>Monthly existing debt obligations (in €). Reduces borrowable amount. Defaults to 0</td></tr><tr><td>student_loan</td><td>number</td><td>Monthly student loan payment (in €). Reduces borrowable amount. Defaults to 0</td></tr><tr><td>interest_rate</td><td>number</td><td>Annual interest rate as a percentage (e.g. 3.5 for 3.5%)</td></tr><tr><td>mortgage_type</td><td>string</td><td>"annuity" or "linear"</td></tr><tr><td>loan_term_years</td><td>number</td><td>Loan term in years. Maximum is 30</td></tr><tr><td>purchase_price</td><td>number</td><td>Purchase price (in €). Used as market value if address enrichment cannot find a WOZ value.p</td></tr><tr><td>down_payment</td><td>number</td><td>Own funds to reduce principal (in €). Defaults to 0</td></tr><tr><td>fixed_rate_period</td><td>number</td><td>Years the interest rate is fixed</td></tr><tr><td>nhg_eligible</td><td>boolean</td><td>Whether NHG applies. If omitted, derived automatically: true when purchase price ≤ €470,000</td></tr><tr><td>first_time_buyer</td><td>boolean</td><td>True if the primary applicant is a first-time buyer. Affects transfer tax. Defaults to false</td></tr><tr><td>applicant_age</td><td>number</td><td>Primary applicant age. Required for first-time buyer transfer tax exemption</td></tr><tr><td>partner_age</td><td>number</td><td>Partner age, Required for first-time buyer transfer tax exemption if it's couple </td></tr><tr><td>energy_label</td><td>string</td><td>Energy label of the property (E/F/G/C/D/A/B/A+/A++/A+++/A++++/A++++_warranty). Affects extra mortgage amount and NHG limit</td></tr><tr><td>sustainability_measures</td><td>boolean</td><td>True if sustainability measures from the TRHK list are included in the mortgage. Affects renovation bonus and NHG limit. Defaults to false</td></tr><tr><td>table_type</td><td>string</td><td>Nibud DSTI table to use. One of: "non_aow_box1" (default), "aow_box1", "non_aow_box3", "aow_box3"</td></tr></tbody></table>

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

```json
{
	"postcode": "9636AA",
	"housenumber": 5,
	"houseaddition": null,
	"max_mortgage_amount": 378000.0,
	"max_mortgage_by_income": 400881.24,
	"principal": 378000.0,
	"monthly_payment_gross": 1778.58,
	"monthly_payment_net": 1320.5,
	"total_interest_paid": 262287.87,
	"total_costs": 650047.87,
	"transfer_tax": 7560.0,
	"transfer_tax_rate_used": 0.02,
	"affordability_ratio": 0.2511,
	"nhg_compliance": true,
	"annual_percentage_rate": "4.09%",
	"term_months": 360,
	"total_initial_costs": 3000.0,
	"net_credit_amount": 34542.0,
	"monthly_payment": 165.25,
	"rate_used": 3.88,
	"rate_fetched_from": "dnb",
	"effective_rate_used": 3.88,
	"loan_term_years": 30,
	"mortgage_type": "annuity",
	"dsti_ratio_used": 0.255,
	"table_type_used": "non_aow_box1",
	"single_bonus_applied": 17000.0,
	"energy_label_bonus": 0.0,
	"renovation_bonus": 0.0,
	"debt_deduction_applied": 0.0,
	"data_enrichment_status": "enriched",
	"enrichment_data": {
		"found": true,
		"woz_latest": 378000.0,
		"woz_latest_year": 2024,
		"energy_label": "F"
	},
	"warnings": [
		"Income allows a higher mortgage, but you are capped at the NHG mortgage cap of €450,000."
	],
	"metadata": {
		"table_type": "non_aow_box1",
		"dsti_ratio_used": 0.255,
		"effective_rate_used": 3.88,
		"nhg_price_limit": 470000,
		"nhg_mortgage_cap": 450000.0,
		"energy_label_bonus": 0.0,
		"renovation_bonus": 0.0,
		"single_bonus_applied": 17000.0,
		"mortgage_interest_deduction_rate": 0.3748,
		"notary_cost": 1500.0,
		"appraisal_cost": 700.0,
		"market_value_source": "woz",
		"market_value_used": 378000.0,
		"market_value_note": "WOZ used — no purchase_price provided",
		"evaluation_date": "20260930"
	}
}
```

{% endtab %}

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

```json
{
  "error": "Unable to process mortgage calculation at this time."
}
```

{% endtab %}

{% tab title="401: Unauthorized" %}

```json
{
  "output": "Please use https://api.altum.ai or visit https://mopsus.altum.ai to make your request."
}
```

{% endtab %}

{% tab title="403: Forbidden" %}

```json
{
  "message": "Forbidden"
}
```

{% endtab %}

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

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

{% endtab %}

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

```json
{
  "detail": [
    {
      "type": "value_error",
      "msg": "applicant_type must be \"single\" or \"couple\"."
    }
  ]
}
```

{% endtab %}
{% endtabs %}

### Request body

#### Example Request

```json
{
  "postcode": "9636AA",
  "housenumber": 5,
  "gross_annual_income": 85000,
  "mortgage_type": "annuity",
  "loan_term_years": 30,
	"loan_amount": 37542, 
 	"nominal_interest_rate": 3.34 
}
```

{% endtab %}
{% endtabs %}


---

# 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/financing/mortgage-calculation-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.
