{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://schema.traceoriginal.com/trace-original-business-loan-en-schema-v1.1.json",
  "title": "trace:original Business Loan Content Schema v1.1",
  "allOf": [{"$ref": "https://schema.traceoriginal.com/trace-original-agreement-en-schema-v1.1.json"}],
  "definitions": {
    "BusinessLoan": {
      "type": "object",
      "properties": {
        "Loan amount": {
          "type": "object",
          "properties": {
            "Loan amount (with letters)": {
              "type": "string"
            }
          },
          "additionalItems": false,
          "position": 1
        },
        "Interest rate per year": {
          "type": "object",
          "properties": {
            "Interest rate": {
              "oneOf": [{"type": "string"}, {"type": "number"}],
              "position": 1
            },
            "Administration fee": {
              "oneOf": [{"type": "string"}, {"type": "number"}],
              "position": 2
            }
          },
          "additionalItems": false,
          "position": 2
        },
        "Amortisation length / amount": {
          "type": "object",
          "properties": {
            "Amortisation length, number of months": {
              "oneOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                }
              ],
              "position": 1
            },
            "Amortisation, monthly cost": {
              "oneOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                }
              ],
              "position": 2
            }
          },
          "additionalItems": false,
          "position": 3
        },
        "Due dates": {
          "type": "object",
          "properties": {
            "First due date, interest": {
              "oneOf": [{"type": "string"}, {"type": "number"}],
              "position": 1
            },
            "First due date, amortisation": {
              "oneOf": [{"type": "string"}, {"type": "number"}],
              "position": 2
            },
            "Following due date for interest and amortisation": {
              "oneOf": [{"type": "string"}, {"type": "number"}],
              "position": 3
            }
          },
          "additionalItems": false,
          "position": 4
        },
        "Payment commitment": {
          "type": "string",
          "position": 5
        },
        "Purpose of the loan": {
          "type": "string",
          "position": 6
        },
        "Special terms": {
          "type": "string",
          "position": 7
        },
        "additionalItems": false
      },
      "additionalItems": false,
      "minProperties": 1
    }
  },
  "properties": {
    "Content": {
      "type": "object",
      "properties": {
        "Agreement terms": {
          "$ref": "#/definitions/BusinessLoan"
        }
      }
    },
    "Amendments": {
      "type": "array",
      "items": {
        "Content": {
          "anyOf": [
            {
              "$ref": "#/definitions/BusinessLoan"
            },
            {
              "type": "string"
            }
          ]
        }
      }
    }
  }
}
