{
  "$id": "https://vendia.net/schemas/demos/loans.schema.json",
  "$schema": "https://json-schema.org/draft-07/schema#",
  "description": "Single Source of Loan Truth",
  "properties": {
    "Loan": {
      "description": "Information about a Loan that was recently extended",
      "items": {
        "properties": {
          "borrowerCreditScore": {
            "description": "Credit score of borrower",
            "type": "integer"
          },
          "loanIdentifier": {
            "description": "Unique loan identifier",
            "type": "string"
          },
          "numberOfUnits": {
            "description": "Number of units in the property",
            "type": "integer"
          },
          "originalInterestRate": {
            "description": "Original loan interest rate",
            "type": "number"
          },
          "originalLoanToValue": {
            "description": "Original Loan to Value (LTV)",
            "type": "number"
          },
          "originalUnpaidPrincipalBalance": {
            "description": "Original loan balance",
            "type": "number"
          },
          "originationDate": {
            "description": "Date loan originated",
            "format": "date",
            "type": "string"
          }
        },
        "required": [
          "loanIdentifier",
          "originationDate",
          "originalInterestRate"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "LoanPerformance": {
      "description": "Information about the performance of a Loan",
      "items": {
        "properties": {
          "currentInterestRate": {
            "description": "Current loan interest rate",
            "type": "number"
          },
          "currentUnpaidPrincipalBalance": {
            "description": "Current loan balance",
            "type": "number"
          },
          "lastPaidInstallmentDate": {
            "description": "Date of last loan payment",
            "format": "date",
            "type": "string"
          },
          "loanDelinquencyStatus": {
            "description": "Current delinquency status of the loan",
            "enum": [
              "current",
              "late",
              "delinquent"
            ],
            "type": "string"
          },
          "loanIdentifier": {
            "description": "Unique loan identifier",
            "type": "string"
          },
          "monthlyReportingPeriod": {
            "description": "Reporting period for which this performance information applies",
            "format": "date",
            "type": "string"
          },
          "servicerId": {
            "description": "Unique identifier for the loan Servicer",
            "type": "string"
          }
        },
        "required": [
          "loanIdentifier",
          "monthlyReportingPeriod",
          "servicerId",
          "lastPaidInstallmentDate"
        ],
        "type": "object"
      },
      "type": "array"
    }
  },
  "title": "Loan Marketplace",
  "type": "object"
}