Mortgage Mate Enhanced

Mortgage Mate Enhanced · GPT-Aktionen

Mortgage Rate API

API for fetching current mortgage rates.

  • GET /ratesFetch current mortgage rates
Ursprüngliches API-Schema
{
  "openapi": "3.0.0",
  "info": {
    "title": "Mortgage Rate API",
    "description": "API for fetching current mortgage rates.",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://api.mortgagerate.app/v1",
      "description": "Main API server"
    }
  ],
  "paths": {
    "/rates": {
      "get": {
        "operationId": "getMortgageRates",
        "summary": "Fetch current mortgage rates",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response with current mortgage rates",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": null
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized access due to missing or invalid token"
          },
          "default": {
            "description": "Unexpected error"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    },
    "schemas": {}
  }
}

Mortgage Calculator API

API for calculating mortgage payments.

  • GET /mortgagecalculatorCalculate mortgage payments based on loan parameters.
Ursprüngliches API-Schema
{
  "openapi": "3.0.0",
  "info": {
    "title": "Mortgage Calculator API",
    "description": "API for calculating mortgage payments.",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://api.api-ninjas.com/v1",
      "description": "Main API server"
    }
  ],
  "paths": {
    "/mortgagecalculator": {
      "get": {
        "operationId": "calculateMortgage",
        "summary": "Calculate mortgage payments based on loan parameters.",
        "parameters": [
          {
            "name": "loan_amount",
            "in": "query",
            "required": false,
            "description": "Principle loan amount",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "home_value",
            "in": "query",
            "required": false,
            "description": "Total value of the home",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "downpayment",
            "in": "query",
            "required": false,
            "description": "Downpayment on the home",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "interest_rate",
            "in": "query",
            "required": true,
            "description": "Annual interest rate (in %)",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "duration_years",
            "in": "query",
            "required": false,
            "description": "Duration of the loan in years",
            "schema": {
              "type": "integer",
              "default": 30
            }
          },
          {
            "name": "monthly_hoa",
            "in": "query",
            "required": false,
            "description": "Monthly homeowner association fees",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "annual_property_tax",
            "in": "query",
            "required": false,
            "description": "Annual property tax",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "annual_home_insurance",
            "in": "query",
            "required": false,
            "description": "Annual homeowner's insurance",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Mortgage calculation results",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MortgageCalculationResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request - Invalid input"
          },
          "404": {
            "description": "Not found - Calculation not possible with provided parameters"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Api-Key"
      }
    },
    "schemas": {
      "MortgageCalculationResponse": {
        "type": "object",
        "properties": {
          "monthly_payment": {
            "type": "object",
            "properties": {
              "total": {
                "type": "integer"
              },
              "mortgage": {
                "type": "integer"
              },
              "property_tax": {
                "type": "integer"
              },
              "hoa": {
                "type": "integer"
              },
              "annual_home_ins": {
                "type": "integer"
              }
            }
          },
          "annual_payment": {
            "type": "object",
            "properties": {
              "total": {
                "type": "integer"
              },
              "mortgage": {
                "type": "integer"
              },
              "property_tax": {
                "type": "integer"
              },
              "hoa": {
                "type": "integer"
              },
              "home_insurance": {
                "type": "integer"
              }
            }
          },
          "total_interest_paid": {
            "type": "integer"
          }
        }
      }
    }
  }
}