Documentation

API URL


GET /api/v1/mortgage-calculator/payment

Headers
Code
Content-Type: application/json
Query Parameters


Example GET Request

Code
GET https://datpaq.com/api/v1/mortgage-calculator/payment?api_key=your-api-key&loan_amount=350000&interest_rate=6.5&duration_years=30

Successful Response

Status
HTML
200 OK
Body
Code
{
  "success": true,
  "data": {
    "monthly_loan_payment": 2212.24,
    "monthly_escrow_estimate": 0,
    "total_monthly_payment": 2212.24,
    "total_interest_paid": 446405.71,
    "total_loan_cost": 796405.71,
    "early_payoff_months_saved": 0,
    "interest_savings_with_extra_payment": 0
  },
  "metadata": {
    "correlationId": "request-id",
    "api_token_name": null,
    "processingTime": "4ms",
    "timestamp": "2026-10-11T12:00:00.000Z",
    "rate_limit": null
  }
}

Error Response

Example
Code
HTTP 400 ValidationError: Missing or invalid calculation input — Returned when a calculation parameter is missing or outside accepted constraints; HTTP 401 Unauthorized: Missing or invalid API key at the gateway — Returned when gateway authentication fails; HTTP 404 NotFound: Request path is not recognized — Service returns an endpoint-not-found response; HTTP 429 RateLimited: Request volume exceeds the configured per-IP window — Returned after the API rate limit is exceeded; HTTP 500 InternalError: Metrics generation or an unhandled service error fails — Metrics generation returns an empty 500 response; other unhandled errors use standardized error handling; HTTP 502 UpstreamError: All FRED series requests fail or return unusable data — Returned when no rate observation can be retrieved; HTTP 503 FeatureGated: /current-rates is called without FRED_API_KEY — Returns available=false while calculation endpoints remain available

Last Updated:  May 4, 2026