Run a calculator
POST
/v1/calculate/:slugRuns any of the MortgageMeter calculators against a fresh input set. Returns the computed result plus the qualifying rate used (when applicable). Rate limited to 100 req/hour per API key — see Rate limits.
Request#
| Field | Type | Required | Description |
|---|---|---|---|
| slug | string | yes | Calculator slug, e.g. "maximum-mortgage". |
| inputs | object | yes | Calculator-specific inputs. |
| rates | array<object> | no | Optional rate-tier override. |
Response#
| Field | Type | Required | Description |
|---|---|---|---|
| slug | string | yes | Echoes the requested calculator. |
| result | object | yes | Computed result. |
| qualifyingRate | number | no | OSFI B-20 qualifying rate when applicable. |
Example#
curl -X POST https://app.mortgagemeter.ca/api/v1/calculate/maximum-mortgage \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "inputs": { "grossAnnualIncome": 120000, "downPayment": 100000, "debts": [], "rentalIncome": { "rentalIncome": 0 }, "annualPropertyTax": 4800, "monthlyHeating": 100, "monthlyCondoFees": 0, "contractRate": 5.39, "amortYears": 25, "gdsCap": 0.39, "tdsCap": 0.44 } }'