{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/canopyservicing-com/json-schema/canopyservicing-com-calculate-apr-input-schema.json",
  "title": "CalculateAprInput",
  "description": "Schema for input parameters to calculate the APR and APY for a loan.",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/canopyservicing-com-calculations-api-openapi.yml#/components/schemas/CalculateAprInput",
  "properties": {
    "loan_amount": {
      "type": "integer",
      "title": "Loan Amount",
      "description": "The loan principal amount in cents",
      "hidden": false
    },
    "interest_is_amortized": {
      "type": "boolean",
      "title": "Interest Is Amortized",
      "description": "Whether the interest is amortized. If set to False, interest is based on the original principal balance and follows a simple interest model.",
      "default": false,
      "hidden": false
    },
    "interest_rate_percent": {
      "type": "number",
      "title": "Interest Rate Percent",
      "description": "The nominal annual interest rate as a percentage (e.g., 5.0 for 5%)",
      "hidden": false
    },
    "term_length": {
      "type": "integer",
      "title": "Term Length",
      "description": "Number of periods in loan term",
      "hidden": false
    },
    "period_interval": {
      "type": "string",
      "enum": [
        "monthly",
        "biweekly",
        "weekly",
        "daily",
        "annually"
      ],
      "title": "Period Interval",
      "description": "The interval at which payments are made (e.g., monthly, biweekly, weekly, daily, annually)",
      "default": "monthly",
      "hidden": false
    }
  },
  "type": "object",
  "required": [
    "loan_amount",
    "interest_rate_percent",
    "term_length"
  ]
}